asw-v01: archive deferred content (packs, site, lab, legacy examples)
- 2.1: packs/ -> archive/packs/ - 2.2: site/ -> archive/site/ - 2.3: src/lab/ -> archive/lab/ - 2.4: examples/ -> archive/examples-legacy/ (SSI-based)
This commit is contained in:
parent
416fe2f180
commit
e47a9f4401
173 changed files with 11 additions and 5 deletions
29
archive/packs/hugo/layouts/_default/baseof.html
Normal file
29
archive/packs/hugo/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.LanguageCode | default "en" }}" data-theme="dark">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<ul><li><a href="{{ .Site.BaseURL }}"><strong>{{ .Site.Title }}</strong></a></li></ul>
|
||||
<ul data-nav-links>
|
||||
{{- range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}"{{ if $.IsMenuCurrent "main" . }} aria-current="page"{{ end }}>{{ .Name }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
<button data-theme-toggle aria-label="Toggle theme"></button>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<small>
|
||||
<a href="{{ "/" | relURL }}">{{ .Site.Title }}</a>
|
||||
· {{ now.Year }}
|
||||
{{- with .Site.Params.description }} · {{ . }}{{- end }}
|
||||
</small>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
39
archive/packs/hugo/layouts/_default/list.html
Normal file
39
archive/packs/hugo/layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{{ define "main" }}
|
||||
<section>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- with .Description }}<p>{{ . }}</p>{{- end }}
|
||||
</header>
|
||||
|
||||
{{- if .IsHome }}
|
||||
{{- partial "tag-nav.html" . }}
|
||||
{{- end }}
|
||||
|
||||
<section data-layout="grid">
|
||||
{{- range .Pages }}
|
||||
<article>
|
||||
<header>
|
||||
<h3>
|
||||
<a href="{{ .RelPermalink }}" data-wikilink>{{ .Title }}</a>
|
||||
</h3>
|
||||
{{- if not .Date.IsZero }}
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
{{- with .Summary }}
|
||||
<p>{{ . }}</p>
|
||||
{{- end }}
|
||||
|
||||
{{- with .GetTerms "tags" }}
|
||||
<footer>
|
||||
{{- range . }}
|
||||
<a href="{{ .Permalink }}" data-tag="{{ .Name }}">{{ .Name }}</a>
|
||||
{{- end }}
|
||||
</footer>
|
||||
{{- end }}
|
||||
</article>
|
||||
{{- end }}
|
||||
</section>
|
||||
</section>
|
||||
{{ end }}
|
||||
36
archive/packs/hugo/layouts/_default/single.html
Normal file
36
archive/packs/hugo/layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{- if not .Date.IsZero }}
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Description }}
|
||||
<p>{{ . }}</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>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{- if .PrevInSection }}
|
||||
<footer>
|
||||
{{- with .PrevInSection }}
|
||||
<a href="{{ .RelPermalink }}" rel="prev" data-wikilink>← {{ .Title }}</a>
|
||||
{{- end }}
|
||||
{{- with .NextInSection }}
|
||||
<a href="{{ .RelPermalink }}" rel="next" data-wikilink>{{ .Title }} →</a>
|
||||
{{- end }}
|
||||
</footer>
|
||||
{{- end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
20
archive/packs/hugo/layouts/partials/head.html
Normal file
20
archive/packs/hugo/layouts/partials/head.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>
|
||||
{{- if .IsHome -}}
|
||||
{{ .Site.Title }}
|
||||
{{- else -}}
|
||||
{{ .Title }} · {{ .Site.Title }}
|
||||
{{- end -}}
|
||||
</title>
|
||||
{{- with .Description }}<meta name="description" content="{{ . }}">{{- end }}
|
||||
{{- if not .Description }}{{- with .Site.Params.description }}<meta name="description" content="{{ . }}">{{- end }}{{- end }}
|
||||
|
||||
<!-- ASW framework CSS — absURL ensures correct path when served at a subpath -->
|
||||
<link rel="stylesheet" href="{{ "css/asw.css" | absURL }}">
|
||||
<!-- Trentuna theme tokens: Inter, JetBrains Mono, dark palette -->
|
||||
<link rel="stylesheet" href="{{ "css/theme.css" | absURL }}">
|
||||
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{- end }}
|
||||
21
archive/packs/hugo/layouts/partials/tag-nav.html
Normal file
21
archive/packs/hugo/layouts/partials/tag-nav.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{{- /*
|
||||
tag-nav.html — renders all site tags as a navigable tag cloud.
|
||||
|
||||
Usage in a layout:
|
||||
{{ partial "tag-nav.html" . }}
|
||||
|
||||
Outputs: <nav data-role="tag-cloud"> with links to each tag page.
|
||||
The (N) count shows how many pages have each tag.
|
||||
*/ -}}
|
||||
{{- $tags := .Site.Taxonomies.tags -}}
|
||||
{{- if $tags }}
|
||||
<nav data-role="tag-cloud" aria-label="Browse by tag">
|
||||
{{- range $name, $pages := $tags }}
|
||||
{{- $tagPage := site.GetPage (printf "/tags/%s" ($name | urlize)) }}
|
||||
<a href="{{ if $tagPage }}{{ $tagPage.Permalink }}{{ else }}{{ print site.BaseURL "tags/" ($name | urlize) "/" }}{{ end }}" data-tag="{{ $name }}">
|
||||
{{ $name -}}
|
||||
<small>({{ len $pages }})</small>
|
||||
</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
{{- end }}
|
||||
16
archive/packs/hugo/layouts/shortcodes/callout.html
Normal file
16
archive/packs/hugo/layouts/shortcodes/callout.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{- /*
|
||||
callout shortcode — wraps content in an ASW callout block.
|
||||
|
||||
Usage:
|
||||
{{< callout note >}}
|
||||
Content here. Markdown is rendered.
|
||||
{{< /callout >}}
|
||||
|
||||
First positional param: callout type.
|
||||
Valid types: note, warning, tip, info (maps to ASW data-callout attribute).
|
||||
Default: note
|
||||
*/ -}}
|
||||
{{- $type := .Get 0 | default "note" -}}
|
||||
<aside data-callout="{{ $type }}">
|
||||
{{ .Inner | markdownify }}
|
||||
</aside>
|
||||
20
archive/packs/hugo/layouts/shortcodes/wikilink.html
Normal file
20
archive/packs/hugo/layouts/shortcodes/wikilink.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{{- /*
|
||||
wikilink shortcode — renders an internal link with ASW data-wikilink attribute.
|
||||
|
||||
Usage:
|
||||
{{< wikilink "Display Text" "/path/to/page/" >}}
|
||||
|
||||
Param 0 (required): display text
|
||||
Param 1 (optional): href path. Defaults to /display-text-slugified/
|
||||
|
||||
Examples:
|
||||
{{< wikilink "My Note" >}}
|
||||
→ <a href="/my-note/" data-wikilink>My Note</a>
|
||||
|
||||
{{< wikilink "My Note" "/vault/my-note/" >}}
|
||||
→ <a href="/vault/my-note/" data-wikilink>My Note</a>
|
||||
*/ -}}
|
||||
{{- $text := .Get 0 -}}
|
||||
{{- $slug := $text | lower | replace " " "-" -}}
|
||||
{{- $href := .Get 1 | default (printf "/%s/" $slug) -}}
|
||||
<a href="{{ $href | relURL }}" data-wikilink>{{ $text }}</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue