1
Fork 0
theorangeone.net-legacy/layouts/partials/navbar.html

28 lines
1 KiB
HTML

<header id="header" {{ if .IsHome }}class="alt"{{ end }}>
<h1><a href="/">{{ title .Site.Title }}</a></h1>
<nav id="nav">
<ul>
{{ range where .Site.Pages.ByTitle "Kind" "section" }}
<li class="top-level">
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ if .Pages }}
<ul>
{{ range first .Site.Params.nav_items (where .Pages.ByDate "Params.show_in_nav" "!=" "false") }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
{{ if ge (len .Pages) .Site.Params.nav_items }}
<li><a href="{{ .Permalink }}"><i>See more</i></a></li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
{{ range where .Site.Pages.ByTitle "Kind" "page" }}
{{ if eq .Section "" }}
<li class="top-level"><a href="{{ .Permalink }}">{{ title .LinkTitle }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>
</header>