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
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>Page not found</h1>
<p>This page was not recovered, or never existed. Try the <a href="{{ site.Home.RelPermalink }}">home page</a>.</p>
{{ end }}
+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 -}}
+32
View File
@@ -0,0 +1,32 @@
<!doctype html>
<html lang="{{ site.Language.Locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} · {{ end }}{{ site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
{{ with resources.Get "css/main.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }}
</head>
<body>
<header class="site-header">
<a class="brand" href="{{ site.Home.RelPermalink }}">OLD-COMPUTERS<span>.COM</span></a>
<nav>
{{ $current := . }}
{{ range site.Menus.main }}
<a href="{{ .URL }}"{{ if or ($current.IsMenuCurrent .Menu .) ($current.HasMenuCurrent .Menu .) (eq $current.Section .Page.Section) }} class="active"{{ end }}>{{ .Name }}</a>
{{ end }}
</nav>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer class="site-footer">
{{ with .Params.source }}
<p>Recovered from the <a href="{{ .url }}">Wayback Machine capture of {{ .date }}</a>.</p>
{{ end }}
<p>Content © its original authors at Old-Computers.com. Rebuilt from the Internet Archive.</p>
</footer>
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<p>{{ len .RegularPages }} manufacturers.</p>
<ul class="columns">
{{ range .RegularPages.ByTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> <small>({{ len .Params.machines }})</small></li>
{{ end }}
</ul>
{{ end }}
+13
View File
@@ -0,0 +1,13 @@
{{ define "main" }}
<article>
<p class="crumbs"><a href="{{ .Parent.RelPermalink }}">Companies</a></p>
<h1>{{ with .Params.logo }}<img class="logo" src="{{ . }}" alt="">{{ end }}{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
{{ with .Params.machines }}
<h2>Systems</h2>
{{ $pages := slice }}
{{ range . }}{{ with site.GetPage . }}{{ $pages = $pages | append . }}{{ end }}{{ end }}
{{ partial "page-list.html" $pages }}
{{ end }}
</article>
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "grouped.html" (dict "pages" .RegularPages "cards" true) }}
{{ end }}
+13
View File
@@ -0,0 +1,13 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<p><a href="{{ (site.GetPage "/topics").RelPermalink }}">Browse by topic</a></p>
<ol class="timeline">
{{ range .RegularPages.ByDate }}
<li>
<time>{{ .Params.when | default (.Date.Format "2006") }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<small>{{ partial "terms.html" (dict "page" . "taxonomy" "topics") }}</small>
</li>
{{ end }}
</ol>
{{ end }}
+12
View File
@@ -0,0 +1,12 @@
{{ define "main" }}
<article>
<p class="crumbs"><a href="{{ .Parent.RelPermalink }}">History</a>{{ with .GetTerms "topics" }} › {{ partial "terms.html" (dict "page" $ "taxonomy" "topics") }}{{ end }}</p>
<h1>{{ .Title }}</h1>
{{ with .Params.when }}<p class="meta">{{ . }}</p>{{ end }}
<div class="content">{{ .Content }}</div>
<nav class="prev-next">
{{ with .PrevInSection }}<a href="{{ .RelPermalink }}">← {{ .Title }}</a>{{ end }}
{{ with .NextInSection }}<a href="{{ .RelPermalink }}">{{ .Title }} →</a>{{ end }}
</nav>
</article>
{{ end }}
+16
View File
@@ -0,0 +1,16 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
<div class="cards">
{{ range site.Menus.main }}
{{ with .Page }}
<a class="card" href="{{ .RelPermalink }}">
<strong>{{ .Title }}</strong>
<span>{{ len .RegularPages }} {{ if eq (len .RegularPages) 1 }}page{{ else }}pages{{ end }}</span>
</a>
{{ end }}
{{ end }}
</div>
<h2>Browse the museum</h2>
{{ partial "browse.html" . }}
{{ end }}
+5
View File
@@ -0,0 +1,5 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
{{ partial "page-list.html" .RegularPages.ByTitle }}
{{ end }}
+48
View File
@@ -0,0 +1,48 @@
{{ define "title" }}{{ .Title }} – {{ .Params.tab | title }} · {{ site.Title }}{{ end }}
{{ define "main" }}
{{ $m := site.GetPage .Params.machine }}
{{ $tab := .Params.tab }}
{{ $p := $m.Params }}
<article class="machine">
{{ partial "machine-header.html" (dict "machine" $m "tab" $tab) }}
{{ if in (slice "photos" "adverts" "hardware" "connectors") $tab }}
{{ partial "gallery.html" (index $p $tab) }}
{{ else if eq $tab "software" }}
{{ with $p.software }}<h2>Software in the museum</h2>{{ partial "link-list.html" . }}{{ end }}
{{ with $p.screenshots }}<h2>Screenshots</h2>{{ partial "gallery.html" . }}{{ end }}
{{ else if eq $tab "links" }}
{{ with $p.related }}<h2>Related systems</h2>{{ partial "link-list.html" . }}{{ end }}
{{ with $p.links }}<h2>Web links</h2>{{ partial "entries.html" . }}{{ end }}
{{ else if in (slice "emulators" "videos") $tab }}
{{ partial "entries.html" (index $p $tab) }}
{{ else if eq $tab "docs" }}
<div class="gallery docs">
{{ range $p.docs }}
<figure>
{{ with .cover }}<img src="{{ . }}" alt="" loading="lazy">{{ end }}
<figcaption>
{{ if .text }}<div>{{ .text | safeHTML }}</div>
{{ else }}<a href="{{ .url }}"><strong>{{ .title }}</strong></a>{{ end }}
</figcaption>
</figure>
{{ end }}
</div>
{{ else if eq $tab "comments" }}
<p class="note">Comments left by visitors of the original site. New comments are closed.</p>
<ol class="comments">
{{ range $p.comments }}
<li>
<p class="meta"><strong>{{ .author }}</strong>{{ with .date }} · {{ . }}{{ end }}</p>
<div>{{ .text | safeHTML }}</div>
</li>
{{ end }}
</ol>
{{ end }}
</article>
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "grouped.html" (dict "pages" .RegularPages "cards" false) }}
{{ end }}
+6
View File
@@ -0,0 +1,6 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<p>{{ len .RegularPages }} systems.</p>
{{ partial "browse.html" . }}
{{ partial "letters.html" (.RegularPages.ByTitle) }}
{{ end }}
+8
View File
@@ -0,0 +1,8 @@
{{ define "main" }}
<article class="machine">
{{ partial "machine-header.html" (dict "machine" . "tab" "") }}
{{ with .Params.image }}<img class="main-image" src="{{ . }}" alt="{{ $.Title }}">{{ end }}
<div class="content">{{ .Content }}</div>
{{ with .Params.specs }}{{ partial "specs.html" . }}{{ end }}
</article>
{{ end }}
+7
View File
@@ -0,0 +1,7 @@
{{ define "main" }}
<article>
{{ with .Parent }}{{ if not .IsHome }}<p class="crumbs"><a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ with $.Params.group }} › {{ . }}{{ end }}</p>{{ end }}{{ end }}
<h1>{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
</article>
{{ end }}
+5
View File
@@ -0,0 +1,5 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<p>{{ len .RegularPages }} titles. <a href="{{ (site.GetPage "/tags").RelPermalink }}">Browse by tag</a>.</p>
{{ partial "letters.html" (.RegularPages.ByTitle) }}
{{ end }}
+11
View File
@@ -0,0 +1,11 @@
{{ define "main" }}
<article>
<p class="crumbs"><a href="{{ .Parent.RelPermalink }}">Software</a></p>
<h1>{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
{{ with .Params.specs }}{{ partial "specs.html" . }}{{ end }}
{{ with .GetTerms "tags" }}<p class="tags">Tags: {{ partial "terms.html" (dict "page" $ "taxonomy" "tags") }}</p>{{ end }}
{{ with .Params.machines }}<h2>Systems</h2>{{ partial "link-list.html" . }}{{ end }}
{{ with .Params.screenshots }}<h2>Screenshots</h2>{{ partial "gallery.html" . }}{{ end }}
</article>
{{ end }}
+9
View File
@@ -0,0 +1,9 @@
{{ define "title" }}By {{ partial "taxonomy-label.html" .Data.Singular }} · {{ site.Title }}{{ end }}
{{ define "main" }}
<h1>By {{ partial "taxonomy-label.html" .Data.Singular }}</h1>
<ul class="columns">
{{ range .Data.Terms.Alphabetical }}
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> <small>({{ .Count }})</small></li>
{{ end }}
</ul>
{{ end }}
+8
View File
@@ -0,0 +1,8 @@
{{ define "main" }}
<p class="crumbs"><a href="{{ .Parent.RelPermalink }}">By {{ partial "taxonomy-label.html" .Data.Singular }}</a></p>
<h1>{{ .Title }}</h1>
{{ range .Pages.GroupBy "Section" }}
<h2>{{ with site.GetPage (printf "/%s" .Key) }}{{ .Title }}{{ end }} <small>({{ len .Pages }})</small></h2>
{{ partial "page-list.html" .Pages.ByTitle }}
{{ end }}
{{ end }}