Hugo site: layouts, config and pilot content

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 15:50:14 +02:00
co-authored by Claude Opus 5.5
commit cf3a03350c
1025 changed files with 7196 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<ul class="browse">
{{ range slice "categories" "types" "years" "origins" "cpus" }}
{{ with site.GetPage (printf "/%s" .) }}
<li><a href="{{ .RelPermalink }}">By {{ partial "taxonomy-label.html" .Data.Singular }}</a></li>
{{ end }}
{{ end }}
</ul>
+7
View File
@@ -0,0 +1,7 @@
{{/* list of {title, url, text, platform} */}}
<dl class="entries">
{{ range . }}
<dt>{{ if .url }}<a href="{{ .url }}" rel="nofollow noopener">{{ .title | default .url }}</a>{{ else }}{{ .title }}{{ end }}{{ with .platform }} <small>{{ . }}</small>{{ end }}</dt>
{{ with .text }}<dd>{{ . | safeHTML }}</dd>{{ end }}
{{ end }}
</dl>
+13
View File
@@ -0,0 +1,13 @@
{{/* list of {title, subtitle, text, image} */}}
<div class="gallery">
{{ range $item := . }}
<figure>
{{ with .image }}<a href="{{ . }}"><img src="{{ . }}" alt="{{ $item.title }}" loading="lazy"></a>{{ end }}
<figcaption>
{{ with .title }}<strong>{{ . }}</strong>{{ end }}
{{ with .subtitle }}<em>{{ . }}</em>{{ end }}
{{ with .text }}<div>{{ . | safeHTML }}</div>{{ end }}
</figcaption>
</figure>
{{ end }}
</div>
+15
View File
@@ -0,0 +1,15 @@
{{/* section pages grouped by .Params.group; "cards" shows thumbnails */}}
{{ range .pages.GroupByParam "group" }}
<h2>{{ .Key }}</h2>
{{ if $.cards }}
<div class="thumbs">
{{ range .Pages.ByTitle }}
<a href="{{ .RelPermalink }}">{{ with .Params.image }}<img src="{{ . }}" alt="" loading="lazy">{{ end }}<span>{{ .Title }}</span></a>
{{ end }}
</div>
{{ else }}
<ul class="links">
{{ range .Pages.ByTitle }}<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>{{ end }}
</ul>
{{ end }}
{{ end }}
+14
View File
@@ -0,0 +1,14 @@
{{/* alphabetical index of pages, grouped by first character of the title */}}
{{ $groups := dict }}
{{ range . }}
{{ $l := upper (substr .Title 0 1) }}
{{ if not (findRE `^[A-Z]$` $l) }}{{ $l = "#" }}{{ end }}
{{ $groups = merge $groups (dict $l ((index $groups $l | default slice) | append .)) }}
{{ end }}
<p class="letters">
{{ range $l, $_ := $groups }}<a href="#letter-{{ $l | urlize }}">{{ $l }}</a> {{ end }}
</p>
{{ range $l, $pages := $groups }}
<h2 id="letter-{{ $l | urlize }}">{{ $l }}</h2>
{{ partial "page-list.html" $pages }}
{{ end }}
+8
View File
@@ -0,0 +1,8 @@
{{/* list of page paths -> links */}}
<ul class="links">
{{ range . }}
{{ with site.GetPage . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ with .GetTerms "years" }} <small>({{ range first 1 . }}{{ .LinkTitle }}{{ end }})</small>{{ end }}</li>
{{ end }}
{{ end }}
</ul>
+17
View File
@@ -0,0 +1,17 @@
{{/* dict "machine" <machine page> "tab" <current tab or ""> */}}
{{ $m := .machine }}
{{ $labels := dict "photos" "Photos" "adverts" "Adverts" "hardware" "Hardware" "connectors" "Connectors" "software" "Software" "emulators" "Emulators" "links" "Links" "docs" "Docs" "videos" "Videos" "comments" "Comments" }}
<header class="machine-header">
<p class="crumbs">
<a href="{{ (site.GetPage "/museum").RelPermalink }}">Museum</a>
{{ with $m.GetTerms "categories" }}{{ range first 1 . }} › <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }}{{ end }}
{{ with $m.Params.company }}{{ with site.GetPage . }} › <a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }}
</p>
<h1>{{ with $m.Params.logo }}<img class="logo" src="{{ . }}" alt="">{{ end }}{{ $m.Title }}</h1>
<nav class="tabs">
<a href="{{ $m.RelPermalink }}"{{ if not $.tab }} class="active"{{ end }}>System info</a>
{{ range $m.Params.tabs }}
<a href="{{ $m.RelPermalink }}{{ . }}/"{{ if eq . $.tab }} class="active"{{ end }}>{{ index $labels . }}</a>
{{ end }}
</nav>
</header>
+13
View File
@@ -0,0 +1,13 @@
{{/* table of pages: machines get company/year/type columns */}}
<table class="list">
<tbody>
{{ range . }}
<tr>
<td><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<td>{{ partial "terms.html" (dict "page" . "taxonomy" "years") }}</td>
<td>{{ partial "terms.html" (dict "page" . "taxonomy" "types") }}{{ partial "terms.html" (dict "page" . "taxonomy" "tags") }}{{ partial "terms.html" (dict "page" . "taxonomy" "topics") }}</td>
<td>{{ partial "terms.html" (dict "page" . "taxonomy" "origins") }}</td>
</tr>
{{ end }}
</tbody>
</table>
+7
View File
@@ -0,0 +1,7 @@
<table class="specs">
<tbody>
{{ range . }}
<tr><th>{{ index . 0 }}</th><td>{{ index . 1 | safeHTML }}</td></tr>
{{ end }}
</tbody>
</table>
+2
View File
@@ -0,0 +1,2 @@
{{- $labels := dict "category" "category" "type" "type" "origin" "country" "year" "year" "cpu" "CPU" "tag" "software tag" "topic" "topic" "rubric" "rubric" "collection" "collection" -}}
{{- index $labels . | default . -}}
+4
View File
@@ -0,0 +1,4 @@
{{/* links to the terms of one taxonomy for a page: dict "page" . "taxonomy" "years" */}}
{{- range $i, $t := .page.GetTerms .taxonomy -}}
{{- if $i }}, {{ end }}<a href="{{ $t.RelPermalink }}">{{ $t.LinkTitle }}</a>
{{- end -}}