mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
23.24.2020 68e6850b6bc0e7e42e8b5070e5d22b27a52b5d3e
Update navbar.html

Please notice that your menu items in the config.toml should have a trailing slash. Such as:

```
[[menu.main]]
name = 'Uses'
url = '/uses/'
weight = 3
```
1 files modified
15 ■■■■ changed files
layouts/partials/navbar.html 15 ●●●● patch | view | raw | blame | history
layouts/partials/navbar.html
@@ -1,12 +1,11 @@
<div class="page-top animated fadeInDown">
        <ul class="nav">
            {{ $currentPage := . }}
            {{ range .Site.Menus.main }}
            {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
            <li><a {{if $active }}class="current"{{end}} href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
            {{ end }}
        </ul>
    <ul class="nav">
        {{ $url := .URL }}
        {{ range .Site.Menus.main }}
        {{ $active := eq $url .URL }}
        <li><a {{if $active }}class="current"{{end}} href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
        {{ end }}
    </ul>
    <div class="themeswitcher">
        <a class="theme-switch" title="Switch Theme">
            <i class="fa fa-adjust fa-fw" aria-hidden="true"></i>