2022-04-02 05:21:00 +00:00
|
|
|
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
2022-04-22 15:49:27 +00:00
|
|
|
<nav aria-label="Global">
|
2022-04-02 05:21:00 +00:00
|
|
|
<ul class="unstyled-list">
|
|
|
|
{{- $currentPage := . -}}
|
2022-04-20 03:16:20 +00:00
|
|
|
{{- $isHome := false -}}
|
|
|
|
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
|
|
|
{{- $isHome = true -}}
|
|
|
|
{{- end -}}
|
2022-04-02 05:21:00 +00:00
|
|
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
2022-04-20 03:16:20 +00:00
|
|
|
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"{{- if $isHome -}} aria-current="page"{{- end -}}>
|
|
|
|
{{- if $isHome -}}
|
|
|
|
<strong itemprop="name">{{ .Site.Title }}</strong>
|
|
|
|
{{- else -}}
|
|
|
|
<span itemprop="name">{{ .Site.Title }}</span>
|
|
|
|
{{- end -}}
|
|
|
|
</a>
|
2022-04-02 05:21:00 +00:00
|
|
|
</li>
|
|
|
|
{{ range .Site.Menus.main -}}
|
2022-04-19 02:54:40 +00:00
|
|
|
{{ $isCurrent := false }}
|
2022-04-02 05:21:00 +00:00
|
|
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
2022-04-19 02:54:40 +00:00
|
|
|
<a href="{{ .URL }}" itemprop="url" {{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}}{{- $isCurrent = true -}} aria-current="page"{{- end -}}>
|
|
|
|
{{- if or $isCurrent (eq $currentPage.Section .Title) -}}
|
|
|
|
<strong itemprop="name">{{- .Name -}}</strong>
|
|
|
|
{{- else -}}
|
|
|
|
<span itemprop="name">{{- .Name -}}</span>
|
|
|
|
{{- end -}}
|
|
|
|
</a>
|
2022-04-02 05:21:00 +00:00
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</header>
|