ja.son-williams.ca/www/themes/jason-williamsca/partials/mainmenu.htm

44 lines
2.2 KiB
HTML
Raw Normal View History

description = "Main Site Menu"
==
<?php
function onStart()
{
// Determine the acive section of the site in order to customize the navigation
$this['activeSection'] = explode('/', $_SERVER['REQUEST_URI'])[1];
}
?>
==
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item {% if activeSection == '' %}active{% endif %}">
<a class="nav-link" href="/">Home {% if activeSection == '' %}<span class="sr-only">(current)</span>{% endif %}</a>
</li>
<li class="nav-item {% if activeSection == 'feed' %}active{% endif %}">
<a class="nav-link" href="/feed">Feed {% if activeSection == 'feed' %}<span class="sr-only">(current)</span>{% endif %}</a>
</li>
{% if activeSection != 'resume' %}
<li class="nav-item">
<a class="nav-link" href="/resume">Résumé</a>
</li>
{% else %}
<li class="nav-item active d-none d-lg-inline-block">
<a class="nav-link" href="/resume">Résumé</a>
</li>
<li class="nav-item dropdown active d-lg-none show">
<a class="nav-link dropdown-toggle" href="/resume" id="resumeDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Résumé</a>
<ul class="navbar-nav" aria-labelledby="resumeDropdown">
<li class="nav-item"><a class="dropdown-item" href="#">Summary</a></li>
<li class="nav-item"><a class="dropdown-item" href="#">Skills &amp; Expertise</a></li>
<li class="nav-item"><a class="dropdown-item" href="#">Experience</a></li>
<li class="nav-item"><a class="dropdown-item" href="#">Education</a></li>
<li class="nav-item"><a class="dropdown-item" href="#">Certifications</a></li>
</ul>
</li>
{% endif %}
</ul>
</div>