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.
27 lines
1.2 KiB
HTML
27 lines
1.2 KiB
HTML
{{/* section
|
|
label: Location and hours
|
|
about: Your address with a map link, phone, email and opening hours. Reads data/location.yaml unless you fill in the fields here.
|
|
fields:
|
|
- { name: heading, type: text, default: Visit us }
|
|
- { name: from, type: data, default: location, label: Details from, help: The file in data/ with your address and hours. }
|
|
- { name: name, type: text, label: Name, help: Fill these in only to show something other than the file. }
|
|
- { name: address, type: textarea }
|
|
- { name: map, type: link, label: Map link, help: Optional; by default, a link to the address on OpenStreetMap. }
|
|
- { name: phone, type: text }
|
|
- { name: email, type: text }
|
|
- name: hours
|
|
type: list
|
|
fields:
|
|
- { name: days, type: text, required: true }
|
|
- { name: times, type: text, required: true }
|
|
- { name: note, type: markdown, help: Holiday hours or other changes. }
|
|
*/}}
|
|
{{ $d := .Data }}{{ if not (or .Data.address .Data.hours) }}{{ $d = data (default "location" .Data.from) }}{{ end }}
|
|
<link rel="stylesheet" href="{{ asset "packs/location-and-hours/location.css" }}">
|
|
<section class="block location">
|
|
<div class="wrap">
|
|
{{ with .Data.heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ template "location-hours" $d }}
|
|
</div>
|
|
</section>
|