mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12: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. -->
|
||||
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
|
||||
{{ 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 content="{{ .Site.Author.name }}" name="author">
|
||||
<meta property="article:author" content="{{ .Site.Author.name }}">
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
||||
<nav>
|
||||
<nav aria-label="Main navigation">
|
||||
<ul class="unstyled-list">
|
||||
{{- $currentPage := . -}}
|
||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"><span itemprop="name">{{ .Site.Title }}</span></a>
|
||||
<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>
|
||||
</li>
|
||||
{{ range .Site.Menus.main.ByWeight -}}
|
||||
{{ range .Site.Menus.main -}}
|
||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
{{ .Pre }}<a href="{{ .URL }}" itemprop="url" title="{{ .Title }}"><span itemprop="name">{{- .Name -}}</span></a>{{ .Post }}
|
||||
<a href="{{ .URL }}" itemprop="url" {{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}} aria-current="page"{{- end -}}>
|
||||
<span itemprop="name">{{- .Name -}}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue