mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 09:42:09 +00:00
b1efab7def
- Decrease the article dom depth by 1 by replacing <main><div> with just <main>. - Fix some whitespace so the HTML output looks better.
32 lines
1.2 KiB
HTML
32 lines
1.2 KiB
HTML
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
|
<nav aria-label="Global">
|
|
<ul class="unstyled-list">
|
|
{{- $currentPage := . -}}
|
|
{{- $isHome := false -}}
|
|
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
|
{{- $isHome = true -}}
|
|
{{- end }}
|
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
|
<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>
|
|
</li>
|
|
{{ range .Site.Menus.main -}}
|
|
{{ $isCurrent := false }}
|
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
|
<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>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
</nav>
|
|
</header>
|