portfoligor/layouts/partials/header.html

48 lines
1.5 KiB
HTML
Raw Normal View History

<header class="container main-header">
<nav class="no-print" role="navigation" aria-label="Primary">
<ul>
<li>
<a href="{{ .Site.BaseURL }}" class="title no-reformat">
<img class="avatar no-print"
src="{{ .Site.BaseURL }}images/avatar.png">
<h1>{{ .Site.Title }}</h1>
</a>
</li>
</ul>
2021-10-29 22:34:24 +02:00
<ul>
{{ $currentPage := . -}}
{{ range sort .Site.Menus.main -}}
<li class="nav-item secondary">
<a class="nav-item-link{{if or (
$currentPage.IsMenuCurrent "main" .
) (
$currentPage.HasMenuCurrent "main" .
) }} active{{end}}"
2021-10-29 22:34:24 +02:00
href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end -}}
<li class="nav-item secondary">
{{ if .IsPage -}}
2021-10-29 22:34:24 +02:00
<a class="nav-item-link"
href="{{ .Site.BaseURL }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toWebsite" }}">
{{ i18n "subscribe" }}
2021-10-29 22:34:24 +02:00
</a>
{{ else if .IsHome -}}
2021-10-29 22:34:24 +02:00
<a class="nav-item-link"
href="{{ .Site.BaseURL }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toWebsite" }}">
{{ i18n "subscribe" }}
2021-10-29 22:34:24 +02:00
</a>
{{ else if .IsNode -}}
2021-10-29 22:34:24 +02:00
<a class="nav-item-link"
href="{{ .Permalink }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toSection" }}">
{{ i18n "subscribe" }}
2021-10-29 22:34:24 +02:00
</a>
{{ end -}}
2021-10-29 22:34:24 +02:00
</li>
</ul>
</nav>
</header>