The first batch of WordPress add-ons rebuilt as packs: templates and styles only, no script. - faq: questions that open to show their answers (<details>), written in the section or shared from data/. - gallery: a picture grid; each opens full size with previous and next, using #links and :target, no script. - location-and-hours: address with an OpenStreetMap link, phone, email, opening hours and a note, from data/location.yaml, as a section or a partial for any layout. - team: a people collection with a page per person (photo, role, email, links), a list page and a Team section. - testimonials: quotes with a name and a role. Also: sections get .Index, their place on the page, so two galleries on a page don't share ids; pack templates may use tel: links; docs/packs.md lists the bundled packs. A new test installs each into the starter with real content, builds it, and runs the checks expecting no errors.
19 lines
996 B
HTML
19 lines
996 B
HTML
{{ define "main" }}
|
|
<link rel="stylesheet" href="{{ asset "packs/team/team.css" }}">
|
|
<article class="wrap page person">
|
|
{{ with index .Site.Lists .Collection }}<p class="eyebrow"><a href="{{ .Path }}">{{ .Title }}</a></p>{{ end }}
|
|
<div class="person-head">
|
|
{{ with .Params.photo }}<img class="team-photo" src="{{ . }}" alt="{{ $.Params.photo_alt }}">{{ else }}<span class="team-photo team-initial" aria-hidden="true">{{ upper (printf "%.1s" .Title) }}</span>{{ end }}
|
|
<div>
|
|
<h1>{{ .Title }}</h1>
|
|
{{ with .Params.role }}<p class="team-role">{{ . }}</p>{{ end }}
|
|
{{ if or .Params.email .Params.links }}<ul class="person-links">
|
|
{{ with .Params.email }}<li>{{ emailOff }}<a href="mailto:{{ . }}">{{ . }}</a>{{ emailOffEnd }}</li>{{ end }}
|
|
{{ range .Params.links }}<li><a href="{{ .url }}" rel="me">{{ .name }}</a></li>{{ end }}
|
|
</ul>{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ with .Content }}<div class="prose">{{ . }}</div>{{ end }}
|
|
</article>
|
|
{{ end }}
|