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.
20 lines
1000 B
HTML
20 lines
1000 B
HTML
{{/* section
|
|
label: Team
|
|
about: The people from the team collection, with their photos and roles.
|
|
fields:
|
|
- { name: heading, type: text, default: The team }
|
|
- { name: intro, type: markdown }
|
|
- { name: collection, type: collection, default: people, label: People from }
|
|
- { name: count, type: number, default: 0, label: How many, help: 0 shows everyone. }
|
|
*/}}
|
|
{{ $c := default "people" .Data.collection }}{{ $people := collection $c }}{{ with .Data.count }}{{ if gt . 0 }}{{ $people = limit . $people }}{{ end }}{{ end }}
|
|
<link rel="stylesheet" href="{{ asset "packs/team/team.css" }}">
|
|
<section class="block team">
|
|
<div class="wrap">
|
|
{{ with .Data.heading }}<h2>{{ . }}</h2>{{ end }}
|
|
{{ with .Data.intro }}<div class="intro">{{ markdownify . }}</div>{{ end }}
|
|
<ul class="team-grid">{{ range $people }}{{ template "team-card" . }}{{ end }}</ul>
|
|
{{ with .Data.count }}{{ if gt . 0 }}<p><a class="more" href="/{{ $c }}/">Everyone</a></p>{{ end }}{{ end }}
|
|
</div>
|
|
</section>
|