source: tanzpartie-hugo/themes/bilberry-hugo-theme/layouts/partials/topnav.html

Last change on this file was 16971, checked in by Henrik Bettermann, 3 years ago
File size: 1.1 KB
Line 
1{{ if and .Site.Params.permanentTopNav .Site.Params.stickyNav }}
2    <nav class="permanentTopNav sticky">
3{{ else if eq .Site.Params.permanentTopNav true }}
4    <nav class="permanentTopNav">
5{{ else }}
6    <nav>
7{{ end }}
8    <div class="container">
9        <ul class="topnav">
10            {{ range where (where .Site.Pages.ByWeight ".Type" "page") ".IsPage" true }}
11                {{ if .Params.excludeFromTopNav }}
12                    {{/* Do nothing */}}
13                {{ else if and (isset .Params "link") (ne .Params.link "") }}
14                    <li><a href="{{ .Params.link | relURL }}" target="{{ .Params.target }}">{{ .Title }}</a></li>
15                {{ else }}
16                    <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
17                {{ end }}
18            {{ end }}
19        </ul>
20
21        {{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }}
22            <div id="search-box" class="search">
23                <i class="fas fa-search"></i>
24                <input id="search" type="text" placeholder="{{ i18n "search" }}">
25            </div>
26        {{ end }}
27    </div>
28</nav>
Note: See TracBrowser for help on using the repository browser.