Hugo Bilberry First commit to gitea@cowbay.org
This commit is contained in:
26
themes/bilberry-hugo-theme/layouts/partials/topnav.html
Normal file
26
themes/bilberry-hugo-theme/layouts/partials/topnav.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ if eq .Site.Params.permanentTopNav true}}
|
||||
<nav class="permanentTopNav">
|
||||
{{ else }}
|
||||
<nav>
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<ul class="topnav">
|
||||
{{ range where (where .Site.Pages.ByWeight ".Type" "page") ".IsPage" true }}
|
||||
{{ if .Params.excludeFromTopNav }}
|
||||
{{/* Do nothing */}}
|
||||
{{ else if and (isset .Params "link") (ne .Params.link "") }}
|
||||
<li><a href="{{ .Params.link | relURL }}" target="{{ .Params.target }}">{{ .Title }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ .URL }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }}
|
||||
<div id="search-box" class="search">
|
||||
<i class="fa fa-search"></i>
|
||||
<input id="search" type="text" placeholder="{{ i18n "search" }}">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user