mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Aria-current, shorter titles
This commit is contained in:
parent
1ecf099145
commit
1a70b01374
2 changed files with 17 additions and 15 deletions
|
@ -7,7 +7,7 @@
|
||||||
<!-- IDC how much content is extracted from my pages, go knock yourself out. huge images, long snippets, whatever. -->
|
<!-- IDC how much content is extracted from my pages, go knock yourself out. huge images, long snippets, whatever. -->
|
||||||
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
|
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ .Title }}{{ if and (lt (len .Title) 66) (ne .RelPermalink "/") }} - Seirdy{{ end }}</title>
|
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne .RelPermalink "/") }} - Seirdy{{ end }}</title>
|
||||||
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||||
<meta content="{{ .Site.Author.name }}" name="author">
|
<meta content="{{ .Site.Author.name }}" name="author">
|
||||||
<meta property="article:author" content="{{ .Site.Author.name }}">
|
<meta property="article:author" content="{{ .Site.Author.name }}">
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
||||||
<nav>
|
<nav aria-label="Main navigation">
|
||||||
<ul class="unstyled-list">
|
<ul class="unstyled-list">
|
||||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
{{- $currentPage := . -}}
|
||||||
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"><span itemprop="name">{{ .Site.Title }}</span></a>
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||||
</li>
|
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"{{- if eq $currentPage.Permalink .Site.BaseURL -}} aria-current="page"{{- end -}}><span itemprop="name">{{ .Site.Title }}</span></a>
|
||||||
{{ range .Site.Menus.main.ByWeight -}}
|
</li>
|
||||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
{{ range .Site.Menus.main -}}
|
||||||
{{ .Pre }}<a href="{{ .URL }}" itemprop="url" title="{{ .Title }}"><span itemprop="name">{{- .Name -}}</span></a>{{ .Post }}
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||||
</li>
|
<a href="{{ .URL }}" itemprop="url" {{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}} aria-current="page"{{- end -}}>
|
||||||
{{- end }}
|
<span itemprop="name">{{- .Name -}}</span></a>
|
||||||
</ul>
|
</li>
|
||||||
</nav>
|
{{- end }}
|
||||||
</header>
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
Loading…
Reference in a new issue