Files
jcoffey-dev 6fb7e82f94
ci / editor-ui (pull_request) Successful in 58s
ci / go (pull_request) Successful in 1m47s
Five more packs: docs, downloads, menu-and-prices, portfolio, share-links
The second batch of WordPress add-ons rebuilt as packs, templates and styles only:

- docs: a documentation section with a sidebar, part pages and previous/next, in the order data/docs-nav.yaml gives (the layout behind hotdogcms.org/docs, without its search script).
- downloads: files to download, with their type and size read from the file at build time.
- menu-and-prices: a price list in groups (a menu, services) and plans side by side.
- portfolio: a work collection with a cover, details and pictures per project, a list page and a section.
- share-links: plain links to Mastodon, Bluesky, LinkedIn and email share pages; nothing loads from those sites until someone chooses one.

Also a fileSize template function ("1.2 MB" for a file in static/, "" if it isn't there). The bundled-packs test covers all ten.
2026-10-11 17:16:07 -07:00

25 lines
1.5 KiB
HTML

{{ define "main" }}
<link rel="stylesheet" href="{{ asset "packs/portfolio/portfolio.css" }}">
<article class="wrap page project">
{{ with index .Site.Lists .Collection }}<p class="eyebrow"><a href="{{ .Path }}">{{ .Title }}</a></p>{{ end }}
<h1>{{ .Title }}</h1>
{{ with .Summary }}<p class="lede">{{ . }}</p>{{ end }}
{{ with .Params.cover }}<img class="pf-hero" src="{{ . }}" alt="{{ $.Params.cover_alt }}">{{ end }}
{{ if or .Params.client .Params.services .Params.link (not .Date.IsZero) }}
<dl class="pf-facts">
{{ with .Params.client }}<div><dt>Client</dt><dd>{{ . }}</dd></div>{{ end }}
{{ with .Params.services }}<div><dt>What we did</dt><dd>{{ . }}</dd></div>{{ end }}
{{ if not .Date.IsZero }}<div><dt>When</dt><dd><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2006" }}</time></dd></div>{{ end }}
{{ with .Params.link }}<div><dt>See it</dt><dd><a href="{{ . }}">{{ hostOf . }}</a></dd></div>{{ end }}
</dl>
{{ end }}
{{ with .Content }}<div class="prose">{{ . }}</div>{{ end }}
{{ with .Params.pictures }}
<ul class="pf-pictures">
{{ range . }}<li><figure><img src="{{ .image }}" alt="{{ .alt }}" loading="lazy">{{ with .caption }}<figcaption>{{ . }}</figcaption>{{ end }}</figure></li>{{ end }}
</ul>
{{ end }}
<nav class="pf-next">{{ with .Prev }}<a href="{{ .Href }}">Newer: {{ .Title }}</a>{{ end }}{{ with .Next }}<a href="{{ .Href }}">Older: {{ .Title }}</a>{{ end }}</nav>
</article>
{{ end }}