website/layouts/partials/nav.html

48 lines
1.2 KiB
HTML
Raw Normal View History

2020-10-05 09:57:10 +02:00
{{ $currentPage := . }}
2020-09-14 16:24:02 +02:00
<nav>
<div class="container">
<section class="website-name">
2020-10-05 09:57:10 +02:00
{{ range .Site.Menus.name }}
{{ if $currentPage.IsMenuCurrent "name" . }}
<a href="{{ .URL }}" class="active">{{ .Name }}</a>
{{ else }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{ end }}
2020-09-14 16:24:02 +02:00
</section>
<span class="seperator">/</span>
<section class="website-mainmenu">
2020-09-14 16:24:02 +02:00
<ul>
{{ range .Site.Menus.main }}
2020-10-05 09:57:10 +02:00
{{ if $currentPage.IsMenuCurrent "main" . }}
<li class="active">
<a href="{{ .URL }}">
<span>{{ .Name }}</span>
</a>
</li>
{{ else }}
<li>
<a href="{{ .URL }}">
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
2020-09-14 16:24:02 +02:00
{{ end }}
</ul>
</section>
<section class="website-externallinks">
<ul>
{{ range .Site.Menus.externallinks }}
2020-09-23 18:17:31 +02:00
<li>
<a title="{{ .URL }}" href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
2020-09-23 18:17:31 +02:00
</li>
2020-09-14 16:24:02 +02:00
{{ end }}
</ul>
</section>
</div>
</nav>