- 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
90 lines
2.2 KiB
HTML
90 lines
2.2 KiB
HTML
{{ define "header" }}
|
|
<header>
|
|
{{- if .Description -}}
|
|
<hgroup>
|
|
<h1>{{ .Title }}</h1>
|
|
<p>{{ .Description }}</p>
|
|
</hgroup>
|
|
{{- else -}}
|
|
<h1>{{ .Title }}</h1>
|
|
{{- end }}
|
|
</header>
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
<section data-layout="console">
|
|
|
|
<nav aria-label="Documentation" data-nav="sidebar">
|
|
{{- $menu := index .Site.Menus "docs" -}}
|
|
{{- if $menu -}}
|
|
{{- range $menu -}}
|
|
{{- if .HasChildren -}}
|
|
<h3>{{ .Name }}</h3>
|
|
<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 -}}
|
|
{{- with .CurrentSection -}}
|
|
<h3>{{ .Title }}</h3>
|
|
<ul>
|
|
{{- range .RegularPages -}}
|
|
<li>
|
|
<a href="{{ .RelPermalink }}"
|
|
{{- if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end -}}>
|
|
{{- .LinkTitle -}}
|
|
</a>
|
|
</li>
|
|
{{- end -}}
|
|
</ul>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</nav>
|
|
|
|
<article>
|
|
{{ .Content }}
|
|
|
|
{{- if or .PrevInSection .NextInSection -}}
|
|
<footer data-role="prev-next">
|
|
{{- with .NextInSection -}}
|
|
<a href="{{ .RelPermalink }}" rel="prev">
|
|
<span aria-hidden="true">←</span> Previous
|
|
<span>{{ .LinkTitle }}</span>
|
|
</a>
|
|
{{- end -}}
|
|
{{- with .PrevInSection -}}
|
|
<a href="{{ .RelPermalink }}" rel="next">
|
|
Next <span aria-hidden="true">→</span>
|
|
<span>{{ .LinkTitle }}</span>
|
|
</a>
|
|
{{- end -}}
|
|
</footer>
|
|
{{- end -}}
|
|
</article>
|
|
|
|
{{- with .TableOfContents -}}
|
|
<aside data-toc>
|
|
<h3>On this page</h3>
|
|
{{ . }}
|
|
</aside>
|
|
{{- end -}}
|
|
|
|
</section>
|
|
{{ end }}
|