Files

40 lines
1.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{ 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" data-pagefind-meta="title:{{ .Title }} – {{ .Params.tab | title }}">
{{ 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 | markdownify }}</div>
{{ else }}<a href="{{ .url }}"{{ partial "ext.html" .url }}><strong>{{ .title }}</strong></a>{{ end }}
</figcaption>
</figure>
{{ end }}
</div>
{{ end }}
{{ partial "comments.html" $m }}
</article>
{{ end }}