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:
@@ -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 }}
|
||||
Reference in New Issue
Block a user