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:
parent
080acfebb7
commit
21524b4b25
10 changed files with 156 additions and 258 deletions
|
|
@ -1,28 +1,26 @@
|
|||
{{ define "title" }}{{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "header" }}
|
||||
<header>
|
||||
<hgroup>
|
||||
{{ define "content" }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<p>{{ .Site.Params.description | default "An agent-first approach to web generation." }}</p>
|
||||
</hgroup>
|
||||
</header>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ define "content" }}
|
||||
<article role="main">
|
||||
<section>
|
||||
<h2>Recent</h2>
|
||||
{{ range first 10 .Site.RegularPages }}
|
||||
<article>
|
||||
<header>
|
||||
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||
{{- if not .Date.IsZero }}
|
||||
<p data-text="dim">
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2006" }}</time>
|
||||
{{ with .Params.eyebrow }} · {{ . }}{{ end }}
|
||||
{{- with .Params.eyebrow }} · {{ . }}{{ end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
</header>
|
||||
{{ with .Summary }}<p>{{ . }}</p>{{ end }}
|
||||
{{- with .Description }}<p>{{ . }}</p>{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue