refactor: standardize all Hugo templates — consistent landmark structure

All templates now follow: body > nav > article > header + content + footer

Removed:
- <hgroup> (redundant, header+h1+p serves same purpose)
- <main> (article is the content landmark)
- role="main" on article (incorrect ARIA)
- header block in baseof (header now inside article)

Standardized: default, docs, essay, notes, console, page, list, index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ludo 2026-04-11 18:37:47 +02:00
parent 080acfebb7
commit 21524b4b25
Signed by: ludo
GPG key ID: F6E479DEFAB84D6E
10 changed files with 156 additions and 258 deletions

View file

@ -1,23 +1,39 @@
{{ define "header" }}
<header>
{{ with .Type }}<p data-text="eyebrow">{{ . }}</p>{{ end }}
<p data-text="dim">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2006" }}</time>
{{ with .Params.author }} · {{ . }}{{ end }}
</p>
{{ with .Params.tags }}
<p>{{ range . }}<a href="/tags/{{ . }}" data-text="tag">#{{ . }}</a> {{ end }}</p>
{{ end }}
</header>
{{ end }}
{{ define "content" }}
<article role="main">
<article>
<header>
<h1>{{ .Title }}</h1>
{{- with .Description }}
<p>{{ . }}</p>
{{- end }}
{{- if or (not .Date.IsZero) .Params.author }}
<p data-text="dim">
{{- if not .Date.IsZero -}}
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
{{- end -}}
{{- if and (not .Date.IsZero) .Params.author }} · {{ end -}}
{{- with .Params.author }}{{ . }}{{ end -}}
</p>
{{- end }}
{{- with .GetTerms "tags" }}
<nav aria-label="Tags">
{{- range . }}
<a href="{{ .Permalink }}">#{{ .Name }}</a>
{{- end }}
</nav>
{{- end }}
</header>
{{ .Content }}
{{ with .Params.footer }}
{{- if or .PrevInSection .NextInSection }}
<footer>
<small>{{ . }}</small>
{{- with .PrevInSection }}
<a href="{{ .RelPermalink }}" rel="prev"><span aria-hidden="true"></span> {{ .LinkTitle }}</a>
{{- end }}
{{- with .NextInSection }}
<a href="{{ .RelPermalink }}" rel="next">{{ .LinkTitle }} <span aria-hidden="true"></span></a>
{{- end }}
</footer>
{{ end }}
{{- end }}
</article>
{{ end }}