Move site navigation to a partial

It can now be shared between the index and site header templates.
This commit is contained in:
Eryn Wells 2023-05-20 08:27:55 -07:00
parent 52a79500c0
commit 1713d5f849
4 changed files with 11 additions and 19 deletions

View file

@ -5,14 +5,5 @@
<div id="content">
{{ .Content }}
</div>
{{- with site.Menus.main -}}
{{- $url := $.RelPermalink -}}
<nav class="site bulleted">
{{- range . -}}
<li><a class="{{ if eq .URL $url }}active{{ end }}" href="{{ .URL }}"><span>{{ i18n .Identifier | default .Name }}</span></a></li>
{{- end -}}
</nav>
{{ end }}
</div>
</main>
{{ partial "site_nav.html" . }}
{{ end }}