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.
21 lines
1022 B
HTML
21 lines
1022 B
HTML
{{/* Address, contact and opening hours from a map like data/location.yaml. */}}
|
|
<div class="loc">
|
|
<div class="loc-where">
|
|
{{ with .name }}<p class="loc-name">{{ . }}</p>{{ end }}
|
|
{{ with .address }}<address class="loc-address">{{ . }}</address>{{ end }}
|
|
<ul class="loc-links">
|
|
{{ $map := .map }}{{ if and (not $map) .address }}{{ $map = printf "https://www.openstreetmap.org/search?query=%s" (urlquery .address) }}{{ end }}
|
|
{{ with $map }}<li><a href="{{ . }}">Map and directions</a></li>{{ end }}
|
|
{{ with .phone }}<li><a href="tel:{{ replace " " "" . }}">{{ . }}</a></li>{{ end }}
|
|
{{ with .email }}<li>{{ emailOff }}<a href="mailto:{{ . }}">{{ . }}</a>{{ emailOffEnd }}</li>{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ with .hours }}
|
|
<table class="loc-hours">
|
|
<caption>Opening hours</caption>
|
|
{{ range . }}<tr><th scope="row">{{ .days }}</th><td>{{ .times }}</td></tr>{{ end }}
|
|
</table>
|
|
{{ end }}
|
|
{{ with .note }}<div class="loc-note">{{ markdownify . }}</div>{{ end }}
|
|
</div>
|