asw/site/layouts/essay/single.html
Ludo 910b0e42a6
refactor: restructure repo into src/ site/ dist/ vendor/ packs/
Separate framework source from website:
- src/layers/ + src/main.css: CSS framework source (was assets/css/)
- site/: Hugo website (content/, layouts/, hugo.toml)
- dist/: built output (asw.css, asw.min.css)
- vendor/open-props/: vendored dependency with version tracking
- Hugo module mounts: dist/ → static, site runs from site/

Build: hugo --source site/ passes (105 pages).
npm run build produces dist/asw.css.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 15:12:42 +02:00

40 lines
1.2 KiB
HTML

{{ define "header" }}
<header>
<h1>{{ .Title }}</h1>
{{ with .Description }}<p data-abstract>{{ . }}</p>{{ end }}
{{- $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 }} · {{ end -}}
{{- with .Params.author }}{{ . }}{{ end -}}
</p>
{{- end }}
{{- with .GetTerms "tags" }}
<nav data-role="tag-cloud" aria-label="Tags">
{{- range . }}
<a href="{{ .Permalink }}" data-tag="{{ .Name }}">{{ .Name }}</a>
{{- end }}
</nav>
{{- end }}
</header>
{{ end }}
{{ define "content" }}
<article role="main">
{{ .Content }}
{{- 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>
{{ end }}