Port section layouts (docs, paper, vault) and papers content
- layouts/docs/single.html: docs section layout with sidebar nav + TOC - layouts/paper/single.html: essay layout with byline, abstract, tags - layouts/vault/single.html: vault layout with sidebar nav + front-matter prev/next - content/papers/on-semantic-html.md: 'On Semantic HTML as Agent Interface' - content/papers/on-sessional-continuity.md: 'On Sessional Continuity' All layouts use partial nav.html for dynamic menus. Paper layout uses data-paper, data-abstract, data-byline, data-role=tag-cloud. 36 pages build clean, paper pages live at /papers/. Closes: asw#14, asw#10
This commit is contained in:
parent
267a7b1bc8
commit
cbe44d845c
6 changed files with 415 additions and 0 deletions
65
layouts/paper/single.html
Normal file
65
layouts/paper/single.html
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "nav.html" . }}
|
||||
|
||||
<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>
|
||||
|
||||
<footer>
|
||||
<small><a href="/">{{ .Site.Title }}</a> · {{ .Date.Format "2006" }}</small>
|
||||
</footer>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue