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. -->
|
||||
<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,14 +1,16 @@
|
|||
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
||||
<nav>
|
||||
<ul class="unstyled-list">
|
||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"><span itemprop="name">{{ .Site.Title }}</span></a>
|
||||
</li>
|
||||
{{ range .Site.Menus.main.ByWeight -}}
|
||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
{{ .Pre }}<a href="{{ .URL }}" itemprop="url" title="{{ .Title }}"><span itemprop="name">{{- .Name -}}</span></a>{{ .Post }}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
|
||||
<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 }}"{{- if eq $currentPage.Permalink .Site.BaseURL -}} aria-current="page"{{- end -}}><span itemprop="name">{{ .Site.Title }}</span></a>
|
||||
</li>
|
||||
{{ range .Site.Menus.main -}}
|
||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
<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>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
Loading…
Reference in a new issue