Per Pico CSS landmark pattern and HTML5 spec: - Site <header> with <nav> moved to baseof.html - Site <footer> moved to baseof.html - All section layouts (single, list, docs, paper, vault, index) now only define <main> content — no duplicate nav/footer - Article <header> stays inside <article> (different semantic role)
59 lines
1.6 KiB
HTML
59 lines
1.6 KiB
HTML
{{ define "main" }}
|
|
<main>
|
|
<article data-paper>
|
|
|
|
<header>
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
{{- with .Description -}}
|
|
<p data-abstract>{{ . }}</p>
|
|
{{- end -}}
|
|
|
|
{{/* Byline: date and/or author */}}
|
|
{{- $hasDate := not .Date.IsZero -}}
|
|
{{- $hasAuthor := .Params.author -}}
|
|
{{- if or $hasDate $hasAuthor -}}
|
|
<p data-byline>
|
|
{{- if $hasDate -}}
|
|
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
|
|
{{- end -}}
|
|
{{- if and $hasDate $hasAuthor -}}
|
|
<span aria-hidden="true"> · </span>
|
|
{{- end -}}
|
|
{{- with .Params.author -}}
|
|
<span>{{ . }}</span>
|
|
{{- end -}}
|
|
</p>
|
|
{{- end -}}
|
|
|
|
{{/* Tags */}}
|
|
{{- with .GetTerms "tags" -}}
|
|
<nav data-role="tag-cloud" aria-label="Tags">
|
|
{{- range . -}}
|
|
<a href="{{ .Permalink }}" data-tag="{{ .Name }}">{{ .Name }}</a>
|
|
{{- end -}}
|
|
</nav>
|
|
{{- end -}}
|
|
|
|
</header>
|
|
|
|
|
|
{{ .Content }}
|
|
|
|
|
|
{{/* ── Prev / Next footer ──────────────────────────────────────── */}}
|
|
{{- if or .PrevInSection .NextInSection -}}
|
|
<footer>
|
|
{{- with .PrevInSection -}}
|
|
<a href="{{ .RelPermalink }}" rel="prev">← {{ .LinkTitle }}</a>
|
|
{{- end -}}
|
|
{{- with .NextInSection -}}
|
|
<a href="{{ .RelPermalink }}" rel="next">{{ .LinkTitle }} →</a>
|
|
{{- end -}}
|
|
</footer>
|
|
{{- end -}}
|
|
|
|
</article>
|
|
</main>
|
|
{{ end }}
|