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:
Vigilio Desto 2026-04-10 18:40:12 +02:00
parent 267a7b1bc8
commit cbe44d845c
Signed by: vigilio
GPG key ID: 159D6AD58C8E55E9
6 changed files with 415 additions and 0 deletions

113
layouts/docs/single.html Normal file
View file

@ -0,0 +1,113 @@
{{ define "main" }}
{{ partial "nav.html" . }}
<main>
<div data-layout="docs">
{{/* ── Left sidebar ─────────────────────────────────────────────── */}}
<aside>
<nav aria-label="Documentation" data-nav="sidebar">
{{- $menu := index .Site.Menus "docs" -}}
{{- if $menu -}}
{{- range $menu -}}
{{- if .HasChildren -}}
<small>{{ .Name }}</small>
<ul>
{{- range .Children -}}
<li>
<a href="{{ .URL }}"
{{- if eq (relURL .URL) $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
{{- end -}}
</ul>
{{- else -}}
<ul>
<li>
<a href="{{ .URL }}"
{{- if eq (relURL .URL) $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
</ul>
{{- end -}}
{{- end -}}
{{- else -}}
{{/* Fallback: list sibling pages in the docs section */}}
{{- with .CurrentSection -}}
<small>{{ .Title }}</small>
<ul>
{{- range .RegularPages -}}
<li>
<a href="{{ .RelPermalink }}"
{{- if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .LinkTitle -}}
</a>
</li>
{{- end -}}
</ul>
{{- end -}}
{{- end -}}
</nav>
</aside>
{{/* ── Main content ──────────────────────────────────────────────── */}}
<article>
{{- if .Description -}}
<hgroup>
<h1>{{ .Title }}</h1>
<p>{{ .Description }}</p>
</hgroup>
{{- else -}}
<h1>{{ .Title }}</h1>
{{- end }}
{{ .Content }}
{{- if or .PrevInSection .NextInSection -}}
<div data-role="prev-next">
{{- with .NextInSection -}}
<a href="{{ .RelPermalink }}" rel="prev">
<small>← Previous</small>
<span>{{ .LinkTitle }}</span>
</a>
{{- end -}}
{{- with .PrevInSection -}}
<a href="{{ .RelPermalink }}" rel="next">
<small>Next →</small>
<span>{{ .LinkTitle }}</span>
</a>
{{- end -}}
</div>
{{- end -}}
</article>
{{/* ── Right TOC ────────────────────────────────────────────────── */}}
{{- with .TableOfContents -}}
<aside data-toc>
<small>On this page</small>
{{ . }}
</aside>
{{- end -}}
</div>
</main>
<footer>
<small><a href="/">{{ .Site.Title }}</a> · {{ now.Format "2006" }}</small>
</footer>
{{ end }}

65
layouts/paper/single.html Normal file
View 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 }}

119
layouts/vault/single.html Normal file
View file

@ -0,0 +1,119 @@
{{ define "main" }}
{{ partial "nav.html" . }}
<main>
<div data-layout="docs">
{{/* ── Left sidebar ─────────────────────────────────────────────── */}}
<aside>
{{- $menuName := .Site.Params.vault_menu | default "vault" -}}
<nav aria-label="Vault documentation" data-nav="sidebar">
{{- $menu := index .Site.Menus $menuName -}}
{{- if $menu -}}
{{- range $menu -}}
{{- if .HasChildren -}}
<small>{{ .Name }}</small>
<ul>
{{- range .Children -}}
<li>
<a href="{{ .URL }}"
{{- if $.IsMenuCurrent $menuName . }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
{{- end -}}
</ul>
{{- else -}}
<ul>
<li>
<a href="{{ .URL }}"
{{- if $.IsMenuCurrent $menuName . }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
</ul>
{{- end -}}
{{- end -}}
{{- else -}}
{{/* Fallback: list direct pages of the current section */}}
{{- with .CurrentSection -}}
<small>{{ .Title }}</small>
<ul>
{{- range .RegularPages -}}
<li>
<a href="{{ .RelPermalink }}"
{{- if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .LinkTitle -}}
</a>
</li>
{{- end -}}
</ul>
{{- end -}}
{{- end -}}
</nav>
</aside>
{{/* ── Main content ──────────────────────────────────────────────── */}}
<article>
{{- if .Description -}}
<hgroup>
<h1>{{ .Title }}</h1>
<p>{{ .Description }}</p>
</hgroup>
{{- else -}}
<h1>{{ .Title }}</h1>
{{- end }}
{{ .Content }}
{{/* ── Prev / Next — from front matter, not Hugo section order ── */}}
{{- $prevURL := index .Params "prev-url" -}}
{{- $prevTitle := index .Params "prev-title" -}}
{{- $nextURL := index .Params "next-url" -}}
{{- $nextTitle := index .Params "next-title" -}}
{{- if or $prevURL $nextURL -}}
<div data-role="prev-next">
{{- if $prevURL -}}
<a href="{{ $prevURL }}" rel="prev">
<small>← Previous</small>
<span>{{ $prevTitle }}</span>
</a>
{{- end -}}
{{- if and $nextURL $nextTitle -}}
<a href="{{ $nextURL }}" rel="next">
<small>Next →</small>
<span>{{ $nextTitle }}</span>
</a>
{{- end -}}
</div>
{{- end -}}
</article>
{{/* ── Right TOC ────────────────────────────────────────────────── */}}
{{- with .TableOfContents -}}
<aside data-toc>
<small>On this page</small>
{{ . }}
</aside>
{{- end -}}
</div>
</main>
<footer>
<small><a href="/">{{ .Site.Title }}</a> · {{ now.Format "2006" }}</small>
</footer>
{{ end }}