asw/layouts/essay/single.html
Ludo 15a6db9c0e
refactor: rename content types to semantic taxonomy
- vault → notes (PKM-exported content)
- posts → articles (short-form, no TOC)
- papers → essays (long-form, with TOC)
- type: post → type: article (posts are just short articles)
- layouts/paper → layouts/essay
- 08a-paper.css → 08a-essay.css
- CSS: fix redundant li resets, remove role="main" from article,
  replace <small> prev/next labels, add console layout
- Update hugo.toml menus, internal URLs, front matter throughout
- Add docs/context.md, docs/css-refactor-plan.md
2026-04-11 13:36:58 +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 }}