@nera-static/starter-business 0.0.0-stage โ†’ 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +106 -2
  4. package/config/app.yaml +70 -0
  5. package/config/contact-form.yaml +32 -0
  6. package/config/images.yaml +8 -0
  7. package/config/navigation.yaml +12 -0
  8. package/config/social-media-links.yaml +8 -0
  9. package/config/theme.yaml +7 -0
  10. package/package.json +60 -5
  11. package/pages/about.md +14 -0
  12. package/pages/contact.md +10 -0
  13. package/pages/imprint.md +22 -0
  14. package/pages/index.md +31 -0
  15. package/pages/opening-hours.md +11 -0
  16. package/pages/privacy.md +42 -0
  17. package/pages/services.md +19 -0
  18. package/theme/assets/favicon.ico +0 -0
  19. package/theme/assets/images/hero.jpg +0 -0
  20. package/theme/assets/js/contact-form.js +241 -0
  21. package/theme/views/partials/card-media.pug +3 -0
  22. package/theme/views/partials/contact-form.pug +3 -0
  23. package/theme/views/partials/footer-extra.pug +3 -0
  24. package/theme/views/partials/hero-media.pug +4 -0
  25. package/theme/views/partials/nav-main.pug +4 -0
  26. package/theme/views/vendor/plugin-contact-form/contact-form.pug +164 -0
  27. package/theme/views/vendor/plugin-images/picture.pug +42 -0
  28. package/theme/views/vendor/plugin-navigation/helper/mixins.pug +3 -0
  29. package/theme/views/vendor/plugin-navigation/helper/setup.pug +25 -0
  30. package/theme/views/vendor/plugin-navigation/link-list-navigation.pug +3 -0
  31. package/theme/views/vendor/plugin-navigation/partials/link-list-navigation.pug +8 -0
  32. package/theme/views/vendor/plugin-navigation/partials/pipe-separated-navigation.pug +10 -0
  33. package/theme/views/vendor/plugin-navigation/partials/simple-navigation.pug +8 -0
  34. package/theme/views/vendor/plugin-navigation/pipe-separated-navigation.pug +3 -0
  35. package/theme/views/vendor/plugin-navigation/simple-navigation.pug +3 -0
  36. package/theme/views/vendor/plugin-social-media-links/social-media-links.pug +17 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-10-18
9
+
10
+ ### Added
11
+
12
+ - First release: the `business` starter for `nera new --starter business`. Requires `@nera-static/nera` 1.11.0 or later. A small-business site on `@nera-static/theme-business` with one small script for the contact form and no third-party requests; a scaffolded site passes `nera build --check` and `nera validate` with no findings, also with every check rule promoted to error and with `--lang de`.
13
+ - Dependencies merged into the site: `@nera-static/theme-business` ^1.0.1 and the plugins `plugin-contact-form` ^1.1.1, `plugin-images` ^1.0.2, `plugin-navigation` ^3.1.1, `plugin-social-media-links` ^2.3.0 and `plugin-sitemap` ^1.1.0.
14
+ - `config/app.yaml`: `lang`, `name`, `robots`, `theme: business`, `origin: https://example.com` with a comment to replace it before deploying (the sitemap needs it), the business's facts under `business:` (address, phone, opening hours, a holiday note; no `email`, the contact form takes its place) marked as placeholders, and `translations.en` with `language_name` and every theme, footer-link, opening-hours and plugin text, so `--lang` copies them into a new entry to translate.
15
+ - `config/theme.yaml` (`footer_links` to the imprint and privacy pages), `contact-form.yaml` (name, email, message and a privacy checkbox, every text a translation key, a placeholder recipient), `navigation.yaml`, `images.yaml` and `social-media-links.yaml` (no `target="_blank"`, one placeholder link).
16
+ - `theme/views/partials/`: the theme's seams filled with the plugins' output: `hero-media`, `card-media`, `contact-form`, `nav-main` and `footer-extra`.
17
+ - `theme/views/vendor/`: the published templates of plugin-contact-form, plugin-images, plugin-navigation and plugin-social-media-links (without `fontawesome-cdn-link.pug`, which loads a CDN), unchanged.
18
+ - `theme/assets/js/contact-form.js`: the client script plugin-contact-form 1.1.1 publishes; it opens the visitor's own mail program, nothing is sent by the site.
19
+ - `pages/index.md` (home with the hero and three service cards), `about.md`, `services.md`, `opening-hours.md` and `contact.md` (the form, the address and the opening hours); `theme/assets/images/hero.jpg` for the hero.
20
+ - `theme/assets/favicon.ico`: a small grey placeholder icon, built to `public/favicon.ico` so a browser's default request finds a file; the README's First steps say to replace it.
21
+ - `pages/imprint.md` and `pages/privacy.md`: clearly marked placeholders citing ยง 5 DDG and the TDDDG, to be replaced by the site owner's own legal texts.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Michael Becker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,107 @@
1
- # Temporary Holding Version
1
+ # @nera-static/starter-business
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![Test](https://github.com/seebaermichi/nera-starter-business/actions/workflows/test.yml/badge.svg)](https://github.com/seebaermichi/nera-starter-business/actions/workflows/test.yml)
4
+ [![npm version](https://img.shields.io/npm/v/@nera-static/starter-business)](https://www.npmjs.com/package/@nera-static/starter-business)
5
+
6
+ ๐Ÿ“– **Documentation:** [nera.js.org](https://nera.js.org)
7
+
8
+ A ready-to-edit site for a small business, built with the
9
+ [Nera](https://github.com/seebaermichi/nera) static site generator on
10
+ [`@nera-static/theme-business`](https://www.npmjs.com/package/@nera-static/theme-business):
11
+ home with a hero image and service cards, about, services, opening hours, a
12
+ contact form, navigation, responsive images, social links, a sitemap and
13
+ imprint and privacy placeholders. One small script for the contact form, no
14
+ third-party requests; a fresh site passes `nera build --check` and
15
+ `nera validate` without a single finding.
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ npx @nera-static/nera new my-site --starter business
21
+ npx @nera-static/nera new my-site --starter business --name "My Bakery" --lang de
22
+ ```
23
+
24
+ `--name` and `--lang` set `name` and `lang` in `config/app.yaml`; a new
25
+ language gets a copy of the English `translations:` entry to translate.
26
+
27
+ ## What you get
28
+
29
+ - `pages/index.md` (home), `about.md`, `services.md`, `opening-hours.md`,
30
+ `contact.md` (with the form)
31
+ - `pages/imprint.md`, `pages/privacy.md`: **placeholders, not legal texts**
32
+ - `config/app.yaml`: name, language, `theme: business`, `origin`, the
33
+ business's facts (`business:` address, phone, opening hours) and the theme
34
+ and plugin texts
35
+ - `config/theme.yaml`, `contact-form.yaml`, `navigation.yaml`, `images.yaml`,
36
+ `social-media-links.yaml`
37
+ - `theme/views/partials/`: the theme's seams, filled with the plugins' output
38
+ - `theme/views/vendor/`: the plugins' published templates
39
+ - `theme/assets/js/contact-form.js`: the contact form's script, which opens
40
+ the visitor's own mail program (the form has no backend)
41
+ - `theme/assets/images/hero.jpg`: the home page's hero image
42
+ - plugins: contact-form, images, navigation, social-media-links, sitemap
43
+
44
+ ## German texts for `--lang de`
45
+
46
+ Replace the copied `de:` entry in `config/app.yaml` with:
47
+
48
+ ```yaml
49
+ de:
50
+ language_name: Deutsch
51
+ Skip to content: Zum Inhalt springen
52
+ Main navigation: Hauptnavigation
53
+ Language: Sprache
54
+ Legal: Rechtliches
55
+ Opening hours: ร–ffnungszeiten
56
+ Closed: Geschlossen
57
+ Contact details: Kontakt
58
+ Phone: Telefon
59
+ Email: E-Mail
60
+ Imprint: Impressum
61
+ Privacy: Datenschutz
62
+ Monโ€“Fri: Moโ€“Fr
63
+ Sat: Sa
64
+ Sun: So
65
+ Closed on public holidays.: An Feiertagen geschlossen.
66
+ Navigation: Navigation
67
+ Message from the website: Nachricht รผber die Website
68
+ Send message: Nachricht senden
69
+ Please fill in all required fields.: Bitte fรผllen Sie alle Pflichtfelder aus.
70
+ Please enter a valid email address.: Bitte geben Sie eine gรผltige E-Mail-Adresse an.
71
+ 'Yes': Ja
72
+ 'No': Nein
73
+ Your name: Ihr Name
74
+ Your email: Ihre E-Mail-Adresse
75
+ Message: Nachricht
76
+ I have read the privacy notice: Ich habe die Datenschutzerklรคrung gelesen
77
+ contact_intro: Wir antworten innerhalb eines Werktags. In dringenden Fรคllen rufen Sie uns bitte an.
78
+ contact_consent: 'Beim Senden รถffnet sich Ihr eigenes E-Mail-Programm; diese Website versendet nichts. Mehr dazu in der <a href="/privacy.html">Datenschutzerklรคrung</a>.'
79
+ ```
80
+
81
+ ## Requirements
82
+
83
+ - `@nera-static/nera` 1.11.0 or later, with `@nera-static/core` 4.15.0 or
84
+ later (the theme's floor; a fresh install brings the newest)
85
+ - Node.js `>=22.12.0` (its bundled npm 10.9 or later)
86
+
87
+ ## License
88
+
89
+ MIT
90
+
91
+ ## First steps
92
+
93
+ After `nera new` the files are yours: a starter has no update path. Each
94
+ file named in steps 1 to 5 marks its placeholders as such.
95
+
96
+ 1. Replace `origin: https://example.com` in `config/app.yaml` with your
97
+ site's real address. The sitemap is built from it.
98
+ 2. Replace the business's facts under `business:` in `config/app.yaml`:
99
+ street, postal code, city, country, phone and opening hours. A row's
100
+ `days` and the `hours_note` are translation keys: add new ones to
101
+ `translations:`.
102
+ 3. Replace `recipient: hello@example.com` in `config/contact-form.yaml` with
103
+ the address the contact form writes to.
104
+ 4. Replace the social link in `config/social-media-links.yaml`.
105
+ 5. Replace `pages/imprint.md` and `pages/privacy.md` with your own legal texts.
106
+ 6. Replace the sample copy of the pages, `theme/assets/images/hero.jpg` and
107
+ the grey placeholder icon `theme/assets/favicon.ico` with your own.
@@ -0,0 +1,70 @@
1
+ lang: en
2
+ name: Brot & Zeit
3
+ robots: index,follow
4
+ theme: business
5
+ # Replace with your site's real address before you deploy: the sitemap needs
6
+ # absolute URLs, and without `origin` it is not written.
7
+ origin: https://example.com
8
+
9
+ # The business's facts, read by the address, the opening hours and the footer.
10
+ # Placeholders: replace every value before you deploy. There is no `email`:
11
+ # the contact form takes its place (config/contact-form.yaml).
12
+ business:
13
+ street: BergstraรŸe 12
14
+ postal_code: '10115'
15
+ city: Berlin
16
+ country: Germany
17
+ phone: '+49 30 1234567'
18
+ # Quote the times. A row has either `closed: true` or `opens` and `closes`;
19
+ # `days` and `hours_note` are translation keys (see below).
20
+ hours:
21
+ - days: Monโ€“Fri
22
+ opens: '07:00'
23
+ closes: '18:00'
24
+ - days: Sat
25
+ opens: '08:00'
26
+ closes: '14:00'
27
+ - days: Sun
28
+ closed: true
29
+ hours_note: Closed on public holidays.
30
+
31
+ translations:
32
+ en:
33
+ # The language's own name, shown by the theme's language switch
34
+ language_name: English
35
+ # Theme texts: the English keys work as they are; after
36
+ # `nera new --lang <code>`, translate the copied entry
37
+ Skip to content: Skip to content
38
+ Main navigation: Main navigation
39
+ Language: Language
40
+ Legal: Legal
41
+ Opening hours: Opening hours
42
+ Closed: Closed
43
+ Contact details: Contact details
44
+ Phone: Phone
45
+ Email: Email
46
+ # footer_links labels (config/theme.yaml)
47
+ Imprint: Imprint
48
+ Privacy: Privacy
49
+ # opening hours: the days and the note of business.hours above
50
+ Monโ€“Fri: Monโ€“Fri
51
+ Sat: Sat
52
+ Sun: Sun
53
+ Closed on public holidays.: Closed on public holidays.
54
+ # plugin-navigation (the label of its simple and pipe-separated forms)
55
+ Navigation: Navigation
56
+ # plugin-contact-form (config/contact-form.yaml)
57
+ Message from the website: Message from the website
58
+ Send message: Send message
59
+ Please fill in all required fields.: Please fill in all required fields.
60
+ Please enter a valid email address.: Please enter a valid email address.
61
+ 'Yes': 'Yes'
62
+ 'No': 'No'
63
+ Your name: Your name
64
+ Your email: Your email
65
+ Message: Message
66
+ I have read the privacy notice: I have read the privacy notice
67
+ # The form's intro and consent are HTML; the consent links the
68
+ # privacy page of this language
69
+ contact_intro: We reply within one working day. For anything urgent, please call us.
70
+ contact_consent: 'Sending opens your own email program; nothing is sent by this website. See our <a href="/privacy.html">privacy notice</a>.'
@@ -0,0 +1,32 @@
1
+ # The form has no backend: on submit the client script
2
+ # (theme/assets/js/contact-form.js) opens the visitor's own mail client with
3
+ # the message filled in. Every text is a translation key (config/app.yaml).
4
+ #
5
+ # A placeholder: replace it with your own address before you deploy. It is
6
+ # never printed as readable text.
7
+ recipient: hello@example.com
8
+ subject: Message from the website
9
+ submit_label: Send message
10
+ error_required: Please fill in all required fields.
11
+ error_email: Please enter a valid email address.
12
+ checkbox_checked_label: 'Yes'
13
+ checkbox_unchecked_label: 'No'
14
+ intro_text: contact_intro
15
+ consent_text: contact_consent
16
+ fields:
17
+ - name: name
18
+ label: Your name
19
+ type: text
20
+ required: true
21
+ - name: email
22
+ label: Your email
23
+ type: email
24
+ required: true
25
+ - name: message
26
+ label: Message
27
+ type: textarea
28
+ required: true
29
+ - name: privacy
30
+ label: I have read the privacy notice
31
+ type: checkbox
32
+ required: true
@@ -0,0 +1,8 @@
1
+ # The home hero is rendered eagerly through the hero-media seam, so the first
2
+ # Markdown image does not compete with it.
3
+ eager_first: false
4
+ # The theme writes no og:image tag, so the 1200ร—630 crop would go unused.
5
+ og: false
6
+ # The hero and the card images come from the `image` frontmatter key (alt
7
+ # text: `image_alt`).
8
+ frontmatter_keys: [image]
@@ -0,0 +1,12 @@
1
+ # Default class names (nav, nav__link, โ€ฆ) kept: the theme styles them.
2
+ elements:
3
+ - href: /index.html
4
+ name: Home
5
+ - href: /about.html
6
+ name: About
7
+ - href: /services.html
8
+ name: Services
9
+ - href: /opening-hours.html
10
+ name: Opening hours
11
+ - href: /contact.html
12
+ name: Contact
@@ -0,0 +1,8 @@
1
+ aria_label: Social media
2
+ # No target="_blank" (nera check: a11y-target-blank).
3
+ open_in_new_tab: false
4
+ # A placeholder: replace it with your own profiles before you deploy. Icons are
5
+ # plain text or an inline SVG (`icon_raw: true`), never an icon font from a CDN.
6
+ social_media_links:
7
+ - name: Mastodon
8
+ href: https://example.com/@your-name
@@ -0,0 +1,7 @@
1
+ # Overrides of the theme's config/theme.yaml (deep-merged, arrays replaced).
2
+ # Labels the legal checks of `nera check` recognise (Imprint, Privacy).
3
+ footer_links:
4
+ - label: Imprint
5
+ href: /imprint.html
6
+ - label: Privacy
7
+ href: /privacy.html
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
- "name": "@nera-static/starter-business",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@nera-static/starter-business",
3
+ "version": "1.0.0",
4
+ "description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap and imprint and privacy placeholders. One small script for the contact form.",
5
+ "type": "module",
6
+ "scripts": {
7
+ "lint": "eslint .",
8
+ "test": "vitest",
9
+ "prepare": "husky"
10
+ },
11
+ "files": [
12
+ "config",
13
+ "pages",
14
+ "theme",
15
+ "CHANGELOG.md"
16
+ ],
17
+ "keywords": [
18
+ "nera",
19
+ "nera-starter",
20
+ "static-site-generator",
21
+ "starter",
22
+ "business"
23
+ ],
24
+ "nera": {
25
+ "starter": {
26
+ "label": "Business",
27
+ "description": "A ready-to-edit Nera site for a small business on @nera-static/theme-business: home, about, services, opening hours, a contact form, navigation, responsive images, social links, a sitemap and imprint and privacy placeholders. One small script for the contact form."
28
+ }
29
+ },
30
+ "author": "Michael Becker",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/seebaermichi/nera-starter-business.git"
35
+ },
36
+ "bugs": {
37
+ "url": "https://github.com/seebaermichi/nera-starter-business/issues"
38
+ },
39
+ "homepage": "https://github.com/seebaermichi/nera-starter-business#readme",
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "engines": {
44
+ "node": ">=22.12.0"
45
+ },
46
+ "dependencies": {
47
+ "@nera-static/plugin-contact-form": "^1.1.1",
48
+ "@nera-static/plugin-images": "^1.0.2",
49
+ "@nera-static/plugin-navigation": "^3.1.1",
50
+ "@nera-static/plugin-sitemap": "^1.1.0",
51
+ "@nera-static/plugin-social-media-links": "^2.3.0",
52
+ "@nera-static/theme-business": "^1.0.1"
53
+ },
54
+ "devDependencies": {
55
+ "@nera-static/nera": "^1.13.0",
56
+ "eslint": "^10.13.0",
57
+ "husky": "^9.1.7",
58
+ "vitest": "^5.0.5",
59
+ "yaml": "^2.9.1"
60
+ }
61
+ }
package/pages/about.md ADDED
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: About us
4
+ lead: One oven, one rye starter and a lot of patience.
5
+ description: How the bakery started and who bakes your bread.
6
+ ---
7
+
8
+ ## How it started
9
+
10
+ We opened in 2014 with a single deck oven. Most of our flour still comes from two mills less than 80 km away.
11
+
12
+ ## Who we are
13
+
14
+ Six bakers, two people at the counter and one starter called Rudi.
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: pages/contact.pug
3
+ title: Contact
4
+ lead: Orders, catering, questions about allergens โ€” write to us or just come by.
5
+ description: How to reach us by message, by phone or in the shop.
6
+ ---
7
+
8
+ ## Write to us
9
+
10
+ Use the form, call us, or come by the shop during opening hours.
@@ -0,0 +1,22 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Imprint
4
+ description: Imprint placeholder โ€” replace it with your own legal notice.
5
+ robots: noindex,follow
6
+ ---
7
+
8
+ **This is a placeholder.** It is not a legal notice. Replace this page with
9
+ your own imprint before you publish the site; if you are unsure what you
10
+ need, ask a lawyer.
11
+
12
+ ## Information pursuant to ยง 5 DDG
13
+
14
+ What an imprint typically names (the exact duty depends on your country and
15
+ on what the business does):
16
+
17
+ - who runs the business: full name, or company name and legal form
18
+ - a postal address where you can be reached
19
+ - fast ways to contact you: email address, and often a phone number
20
+ - the person responsible for the content, if the law asks for one
21
+ - register entries and VAT ID, if your business has them
22
+ - the supervisory authority or chamber, for a trade or profession that needs one
package/pages/index.md ADDED
@@ -0,0 +1,31 @@
1
+ ---
2
+ layout: pages/home.pug
3
+ title: Home
4
+ description: Sourdough, rye and spelt, baked every morning in your neighbourhood.
5
+ image: /images/hero.jpg
6
+ image_alt: Loaves of sourdough bread on a wooden counter
7
+ hero:
8
+ title: Bread that takes its time.
9
+ text: Sourdough, rye and spelt, baked every morning. No shortcuts โ€” flour, water, salt and about 36 hours.
10
+ cta:
11
+ label: Order for pickup
12
+ href: /contact.html
13
+ cta_secondary:
14
+ label: What we bake
15
+ href: /services.html
16
+ cards_title: What we do
17
+ cards:
18
+ - title: Breads
19
+ text: Sourdough, rye, spelt and a weekly special, fresh from 7 am.
20
+ href: /services.html
21
+ - title: Pastries and cakes
22
+ text: Butter croissants, cardamom buns and one seasonal cake.
23
+ - title: Cakes to order
24
+ text: Whole cakes with two days' notice โ€” just send us a message.
25
+ href: /contact.html
26
+ show_hours: true
27
+ ---
28
+
29
+ ## A neighbourhood bakery since 2014
30
+
31
+ We started with one oven and a rye starter that is still alive today. Everything is mixed, shaped and baked on the premises.
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Opening hours
4
+ lead: Fresh bread until it runs out.
5
+ description: When the shop is open.
6
+ show_hours: true
7
+ ---
8
+
9
+ ## Holidays
10
+
11
+ We close for two weeks in August; the dates are posted in the shop.
@@ -0,0 +1,42 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Privacy
4
+ description: Privacy policy placeholder โ€” replace it with your own privacy policy.
5
+ robots: noindex,follow
6
+ ---
7
+
8
+ **This is a placeholder.** It is not a privacy policy. Replace this page with
9
+ your own privacy policy before you publish the site; if you are unsure what
10
+ you need, ask a lawyer.
11
+
12
+ ## What a privacy policy typically covers
13
+
14
+ The exact duty depends on your country and on what the site does:
15
+
16
+ - who is responsible for the data processing, and how to contact them
17
+ - what your hosting provider logs (such as IP addresses) and for how long
18
+ - every plugin, form, font, embed or analytics tool that processes visitor
19
+ data, its purpose and legal basis
20
+ - how long data is kept
21
+ - the visitor's rights (access, correction, deletion, objection) and where to
22
+ complain
23
+
24
+ ## The contact form
25
+
26
+ As shipped, the contact form sends nothing over the network. When a visitor
27
+ submits it, a small script on this site opens the visitor's own email program
28
+ with the message filled in; the message then travels like any other email
29
+ they send, and you receive it in your mailbox. Name how you handle and keep
30
+ these messages.
31
+
32
+ ## Sitemap
33
+
34
+ The site publishes a `sitemap.xml` for search engines. It lists the public
35
+ pages and contains no personal data.
36
+
37
+ ## Cookies and device storage
38
+
39
+ As shipped, this site stores nothing on a visitor's device and reads nothing
40
+ from it, so no consent under ยง 25 TDDDG is needed for it. It loads no fonts,
41
+ scripts or images from other hosts. Check this again whenever you add a
42
+ script, an embed, a map or a plugin.
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: pages/default.pug
3
+ title: Services
4
+ lead: What you can order, book and pick up.
5
+ description: Daily bread, cakes to order and catering for small events.
6
+ cards:
7
+ - title: Daily bread
8
+ text: Sourdough, rye and spelt, baked every morning.
9
+ - title: Cakes to order
10
+ text: Whole cakes with two days' notice.
11
+ href: /contact.html
12
+ - title: Breakfast catering
13
+ text: Bread, pastries and spreads for meetings of up to 30 people.
14
+ href: /contact.html
15
+ ---
16
+
17
+ ## Orders
18
+
19
+ Order by Thursday for the weekend, by phone or through the contact form.
Binary file
Binary file
@@ -0,0 +1,241 @@
1
+ // Client script for plugin-contact-form. Published to assets/js/contact-form.js
2
+ // and loaded by the contact-form template. It is pure behavior: it contains no
3
+ // user-facing text and no configuration. Everything it needs โ€” messages,
4
+ // checkbox labels, the subject, the honeypot field name, the error class โ€” is
5
+ // read at runtime from the inert JSON block the template renders
6
+ // (`[data-contact-config]`), so all of it stays configurable and translatable
7
+ // from YAML. On submit it builds a `mailto:` link and hands it to the mail
8
+ // client; it makes no network request.
9
+ //
10
+ // The only literals here are the structural selectors that form the documented
11
+ // contract with the template (`data-contact-*`) and the email-shape regex โ€”
12
+ // none of them is text a site owner or translator would change.
13
+ //
14
+ // `document` and `window` are referenced as free variables so the test suite
15
+ // can run the script with its own stubs (`new Function('document', 'window', โ€ฆ)`)
16
+ // โ€” in the browser they resolve to the real globals.
17
+
18
+ // Deliberately permissive โ€” the goal is to catch obvious typos, not to be an
19
+ // authority on RFC 5322. The mail client is the real validator.
20
+ const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
21
+
22
+ document.addEventListener('DOMContentLoaded', () => {
23
+ document.querySelectorAll('[data-contact-form]').forEach(setupForm)
24
+ })
25
+
26
+ function setupForm(form) {
27
+ const config = readConfig(form)
28
+ const status = form.querySelector('[data-contact-status]')
29
+
30
+ form.addEventListener('submit', (event) => {
31
+ event.preventDefault()
32
+
33
+ // Honeypot: a real visitor never sees or fills this field. A value here
34
+ // means a bot, so drop the submission silently โ€” no error, no mailto โ€”
35
+ // to give the bot no signal that it was caught. Nothing labels the trap
36
+ // in the page; it is identified structurally, as the one named control
37
+ // that carries no `data-contact-field` marker (real fields all do) and
38
+ // is not a button.
39
+ const trap = Array.from(form.elements).find(
40
+ (element) =>
41
+ element.name &&
42
+ !element.hasAttribute('data-contact-field') &&
43
+ element.type !== 'submit' &&
44
+ element.type !== 'button'
45
+ )
46
+ if (trap && trap.value.trim() !== '') {
47
+ return
48
+ }
49
+
50
+ clearErrors(form, status, config.errorClass)
51
+
52
+ const fields = Array.from(form.querySelectorAll('[data-contact-field]'))
53
+ const messages = config.messages || {}
54
+
55
+ const missing = findMissingRequired(fields)
56
+ if (missing.length > 0) {
57
+ showError(status, messages.required, missing, config.errorClass)
58
+ return
59
+ }
60
+
61
+ const invalidEmail = fields.find(isInvalidEmail)
62
+ if (invalidEmail) {
63
+ showError(status, messages.email, [invalidEmail], config.errorClass)
64
+ return
65
+ }
66
+
67
+ const recipient = readRecipient(form)
68
+ if (!recipient) {
69
+ return
70
+ }
71
+
72
+ const body = fields
73
+ .map((field) => collectValue(field, config.booleanLabels || {}))
74
+ .filter((entry) => entry !== null)
75
+ .map((entry) => `${entry.label}: ${entry.value}`)
76
+ .join('\r\n')
77
+
78
+ const mailto =
79
+ 'mailto:' +
80
+ recipient +
81
+ '?subject=' +
82
+ encodeURIComponent(config.subject || '') +
83
+ '&body=' +
84
+ encodeURIComponent(body)
85
+
86
+ // mailto: URLs are capped in practice (~2000 chars) by the OS/mail
87
+ // client; a very long message may be truncated on the way in.
88
+ window.location.href = mailto
89
+ })
90
+ }
91
+
92
+ // The config the template rendered. An absent or malformed block yields an
93
+ // empty object rather than an exception, so a broken custom template degrades
94
+ // instead of throwing.
95
+ function readConfig(form) {
96
+ const element = form.querySelector('[data-contact-config]')
97
+ if (!element) {
98
+ return {}
99
+ }
100
+ try {
101
+ return JSON.parse(element.textContent) || {}
102
+ } catch {
103
+ return {}
104
+ }
105
+ }
106
+
107
+ // The address, reassembled from whichever obfuscated form the template emitted.
108
+ function readRecipient(form) {
109
+ const codesEl = form.querySelector('[data-contact-recipient-codes]')
110
+ if (codesEl) {
111
+ try {
112
+ const codes = JSON.parse(
113
+ codesEl.getAttribute('data-contact-recipient-codes')
114
+ )
115
+ if (Array.isArray(codes)) {
116
+ return String.fromCharCode.apply(null, codes)
117
+ }
118
+ } catch {
119
+ return ''
120
+ }
121
+ return ''
122
+ }
123
+
124
+ const entitiesEl = form.querySelector('[data-contact-recipient]')
125
+ if (entitiesEl) {
126
+ // The HTML parser already decoded the numeric entities in the
127
+ // attribute, so this is the plain address.
128
+ return entitiesEl.getAttribute('data-contact-recipient') || ''
129
+ }
130
+
131
+ return ''
132
+ }
133
+
134
+ function fieldType(field) {
135
+ return (field.getAttribute('type') || field.tagName || '').toLowerCase()
136
+ }
137
+
138
+ // Returns `{ label, value }` for the email body, or null for a control that
139
+ // contributes nothing (an unchecked radio in a group).
140
+ function collectValue(field, booleanLabels) {
141
+ const label = field.getAttribute('data-contact-label') || field.name || ''
142
+ const type = fieldType(field)
143
+
144
+ if (type === 'checkbox') {
145
+ const value = field.checked
146
+ ? booleanLabels.checked
147
+ : booleanLabels.unchecked
148
+ return { label, value: value || '' }
149
+ }
150
+
151
+ if (type === 'radio') {
152
+ if (!field.checked) {
153
+ return null
154
+ }
155
+ return { label, value: field.value }
156
+ }
157
+
158
+ return { label, value: field.value }
159
+ }
160
+
161
+ function findMissingRequired(fields) {
162
+ const missing = []
163
+ const seenRadioGroups = {}
164
+
165
+ fields.forEach((field) => {
166
+ if (!field.hasAttribute('required')) {
167
+ return
168
+ }
169
+
170
+ const type = fieldType(field)
171
+
172
+ if (type === 'radio') {
173
+ const name = field.name
174
+ if (name in seenRadioGroups) {
175
+ return
176
+ }
177
+ const checked = fields.some(
178
+ (other) => other.name === name && other.checked
179
+ )
180
+ seenRadioGroups[name] = checked
181
+ if (!checked) {
182
+ missing.push(field)
183
+ }
184
+ return
185
+ }
186
+
187
+ if (type === 'checkbox') {
188
+ if (!field.checked) {
189
+ missing.push(field)
190
+ }
191
+ return
192
+ }
193
+
194
+ if (field.value.trim() === '') {
195
+ missing.push(field)
196
+ }
197
+ })
198
+
199
+ return missing
200
+ }
201
+
202
+ function isInvalidEmail(field) {
203
+ if (fieldType(field) !== 'email') {
204
+ return false
205
+ }
206
+ const value = field.value.trim()
207
+ // Emptiness is the required check's job โ€” an optional empty email is fine.
208
+ if (value === '') {
209
+ return false
210
+ }
211
+ return !EMAIL_PATTERN.test(value)
212
+ }
213
+
214
+ function showError(status, message, fields, errorClass) {
215
+ if (status) {
216
+ status.textContent = message || ''
217
+ }
218
+ fields.forEach((field) => {
219
+ if (errorClass) {
220
+ field.classList.add(errorClass)
221
+ }
222
+ field.setAttribute('aria-invalid', 'true')
223
+ })
224
+ const first = fields[0]
225
+ if (first && typeof first.focus === 'function') {
226
+ first.focus()
227
+ }
228
+ }
229
+
230
+ function clearErrors(form, status, errorClass) {
231
+ if (status) {
232
+ status.textContent = ''
233
+ }
234
+ if (!errorClass) {
235
+ return
236
+ }
237
+ form.querySelectorAll('.' + errorClass).forEach((field) => {
238
+ field.classList.remove(errorClass)
239
+ field.removeAttribute('aria-invalid')
240
+ })
241
+ }
@@ -0,0 +1,3 @@
1
+ //- Seam override: a card's image (plugin-images), lazily loaded.
2
+ include /vendor/plugin-images/picture
3
+ +picture(item.meta.images && item.meta.images.image, { alt: item.meta.image_alt, class: 'card__image' })
@@ -0,0 +1,3 @@
1
+ //- Seam override: plugin-contact-form's form (config/contact-form.yaml). Its
2
+ //- client script is theme/assets/js/contact-form.js.
3
+ include /vendor/plugin-contact-form/contact-form
@@ -0,0 +1,3 @@
1
+ //- Seam override: plugin-social-media-links (config/social-media-links.yaml).
2
+ //- Never include fontawesome-cdn-link.pug: it loads icons from a CDN.
3
+ include /vendor/plugin-social-media-links/social-media-links
@@ -0,0 +1,4 @@
1
+ //- Seam override: a page's `image` frontmatter (alt text: `image_alt`) as a
2
+ //- responsive <picture> from plugin-images, loaded eagerly as the hero.
3
+ include /vendor/plugin-images/picture
4
+ +picture(meta.images && meta.images.image, { alt: meta.image_alt, class: 'hero__image', loading: 'eager' })
@@ -0,0 +1,4 @@
1
+ //- Seam override: plugin-navigation's list form (config/navigation.yaml), so
2
+ //- the theme's labelled <nav> is the only <nav> around it.
3
+ include /vendor/plugin-navigation/partials/link-list-navigation
4
+ +linkListNav
@@ -0,0 +1,164 @@
1
+ //- Contact form partial (plugin-contact-form).
2
+ //-
3
+ //- On submit the shipped client script โ€” published to
4
+ //- `assets/js/contact-form.js` and loaded at the foot of this file โ€” builds a
5
+ //- `mailto:` link and opens the visitor's mail client. There is no backend and
6
+ //- nothing is submitted over the network.
7
+ //-
8
+ //- TRANSLATIONS: every user-facing string (labels, placeholders, subject,
9
+ //- messages, checkbox Yes/No) is a translation key resolved here through the
10
+ //- generator's `t()` helper for THIS page's language, so one field definition
11
+ //- serves every language. A key with no translation renders literally, so a
12
+ //- single-language site just writes the final text. `tr` falls back to identity
13
+ //- when `t` is absent (e.g. a standalone render in a test).
14
+ //-
15
+ //- CONTRACT: if you customize this template, keep these exact hooks โ€” the
16
+ //- client script finds everything through them:
17
+ //- data-contact-form the <form>
18
+ //- data-contact-config the JSON config block (messages, labels, subject,
19
+ //- error class) โ€” inert data, not code
20
+ //- data-contact-field every field whose value goes into the email
21
+ //- data-contact-label that field's (resolved) label for the email body
22
+ //- data-contact-status the validation-message region
23
+ //- data-contact-recipient / data-contact-recipient-codes the recipient
24
+ //-
25
+ //- Field values come from YAML and are escaped (`#{}`). BEM class names are a
26
+ //- public contract โ€” renaming one is a breaking change.
27
+ - var cf = (typeof app !== 'undefined' && app && app.contactForm)
28
+ - var tr = (typeof t === 'function') ? t : function (key) { return key }
29
+ if cf && cf.fields && cf.fields.length > 0
30
+ form.contact-form(novalidate, data-contact-form)
31
+ //- Everything the client needs, resolved for this language and packed
32
+ //- into inert JSON (NOT an executable script โ€” the browser parses it as
33
+ //- data and never runs it). Escaping `<` keeps a stray `</script>` in a
34
+ //- translated value from breaking out of the element.
35
+ -
36
+ var clientConfig = {
37
+ subject: tr(cf.subject),
38
+ errorClass: cf.errorClass,
39
+ messages: {
40
+ required: tr(cf.messages.required),
41
+ email: tr(cf.messages.email)
42
+ },
43
+ booleanLabels: {
44
+ checked: tr(cf.booleanLabels.checked),
45
+ unchecked: tr(cf.booleanLabels.unchecked)
46
+ }
47
+ }
48
+ var clientConfigJson = JSON.stringify(clientConfig).replace(/</g, '\\u003c')
49
+ script(type="application/json", data-contact-config)!= clientConfigJson
50
+
51
+ //- The recipient is carried on a data attribute, never printed as text.
52
+ //- In `entities` mode every character is an HTML numeric entity,
53
+ //- rendered unescaped with `!=` so the source holds no readable
54
+ //- address; the browser decodes the attribute back for the client. In
55
+ //- `jsassembly` mode only an array of char codes is emitted and the
56
+ //- address never appears in the source at all.
57
+ if cf.recipientMode === 'jsassembly'
58
+ span.contact-form__recipient(hidden, data-contact-recipient-codes=cf.recipientCodes)
59
+ else
60
+ span.contact-form__recipient(hidden, data-contact-recipient!=cf.recipient)
61
+
62
+ if cf.introText
63
+ //- Site-owner authored HTML (see config), resolved per language.
64
+ .contact-form__intro !{tr(cf.introText)}
65
+
66
+ each field in cf.fields
67
+ - var fieldId = 'contact-' + field.name
68
+ - var fieldLabel = tr(field.label)
69
+ .contact-form__field(class='contact-form__field--' + field.type)
70
+ if field.type === 'checkbox'
71
+ label.contact-form__label.contact-form__label--checkbox(for=fieldId)
72
+ input.contact-form__input.contact-form__input--checkbox(
73
+ type="checkbox",
74
+ id=fieldId,
75
+ name=field.name,
76
+ data-contact-field,
77
+ data-contact-label=fieldLabel,
78
+ required=field.required
79
+ )
80
+ span.contact-form__label-text #{fieldLabel}
81
+ else if field.type === 'textarea'
82
+ label.contact-form__label(for=fieldId) #{fieldLabel}
83
+ textarea.contact-form__input.contact-form__input--textarea(
84
+ id=fieldId,
85
+ name=field.name,
86
+ placeholder=(field.placeholder ? tr(field.placeholder) : false),
87
+ data-contact-field,
88
+ data-contact-label=fieldLabel,
89
+ required=field.required
90
+ )
91
+ else if field.type === 'select'
92
+ label.contact-form__label(for=fieldId) #{fieldLabel}
93
+ select.contact-form__input.contact-form__input--select(
94
+ id=fieldId,
95
+ name=field.name,
96
+ data-contact-field,
97
+ data-contact-label=fieldLabel,
98
+ required=field.required
99
+ )
100
+ if field.required
101
+ option(value="", disabled, selected) โ€ฆ
102
+ each option in field.options
103
+ option(value=option.value) #{tr(option.label)}
104
+ else if field.type === 'radio'
105
+ span.contact-form__label #{fieldLabel}
106
+ .contact-form__options(role="radiogroup", aria-label=fieldLabel)
107
+ each option, i in field.options
108
+ - var optId = fieldId + '-' + i
109
+ label.contact-form__label.contact-form__label--radio(for=optId)
110
+ input.contact-form__input.contact-form__input--radio(
111
+ type="radio",
112
+ id=optId,
113
+ name=field.name,
114
+ value=option.value,
115
+ data-contact-field,
116
+ data-contact-label=fieldLabel,
117
+ required=field.required
118
+ )
119
+ span.contact-form__label-text #{tr(option.label)}
120
+ else
121
+ label.contact-form__label(for=fieldId) #{fieldLabel}
122
+ input.contact-form__input(
123
+ type=field.type,
124
+ id=fieldId,
125
+ name=field.name,
126
+ placeholder=(field.placeholder ? tr(field.placeholder) : false),
127
+ data-contact-field,
128
+ data-contact-label=fieldLabel,
129
+ required=field.required
130
+ )
131
+
132
+ //- Honeypot: hidden from humans, tempting to bots. It carries no
133
+ //- honeypot-specific attribute and is not named as a trap anywhere โ€” to
134
+ //- a scraper it is an ordinary field. The client identifies it
135
+ //- structurally: it is the only named control WITHOUT a
136
+ //- `data-contact-field` marker (every real field has one), and any
137
+ //- submission that fills it is dropped silently.
138
+ //-
139
+ //- The label deliberately mirrors the field name (a plausible, commonly
140
+ //- autofilled field like "website") โ€” it must NOT instruct anyone to
141
+ //- leave it blank, or a bot reading the HTML would simply skip it. Real
142
+ //- users never read it: the container is `aria-hidden` and moved
143
+ //- off-screen by the inline style, which also guarantees it stays hidden
144
+ //- even if the site ships no CSS for it. `autocomplete="off"` stops a
145
+ //- browser from autofilling it for a real visitor (a false positive).
146
+ .contact-form__decoy(aria-hidden="true", style="position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden")
147
+ label(for='contact-' + cf.honeypot)= cf.honeypot
148
+ input(
149
+ type="text",
150
+ id='contact-' + cf.honeypot,
151
+ name=cf.honeypot,
152
+ tabindex="-1",
153
+ autocomplete="off"
154
+ )
155
+
156
+ if cf.consentText
157
+ //- Site-owner authored HTML (see config), resolved per language.
158
+ .contact-form__consent !{tr(cf.consentText)}
159
+
160
+ .contact-form__status(role="alert", aria-live="polite", data-contact-status)
161
+
162
+ button.contact-form__submit(type="submit") #{tr(cf.submitLabel)}
163
+
164
+ script(src="/js/contact-form.js")
@@ -0,0 +1,42 @@
1
+ //- @nera-static/plugin-images: the markup for a frontmatter image.
2
+ //-
3
+ //- include /vendor/plugin-images/picture
4
+ //- +picture(meta.images && meta.images.image, { alt: meta.title })
5
+ //-
6
+ //- `image` is a `meta.images.<key>` entry the plugin prepared at build time
7
+ //- (pure markup from precomputed data, nothing is encoded here). Renders
8
+ //- nothing when it is missing, so a page without the frontmatter key just
9
+ //- has no image. Options: `alt`, `class`, `sizes` (overrides the entry's),
10
+ //- `loading` (`lazy` by default; `eager` adds `fetchpriority="high"` for a
11
+ //- hero image). Extra attributes go onto the <img>:
12
+ //- `+picture(image, { alt: '' })(data-zoom)`. A placeholder the plugin
13
+ //- computed (`placeholder: color | blur` in config/images.yaml) becomes the
14
+ //- <img>'s `style`, as in the content pass.
15
+ mixin picture-img(image, opts, sizes)
16
+ - const eager = opts.loading === 'eager'
17
+ - const placeholder = image.blur ? `background-image:url(${image.blur});background-size:cover` : image.color ? `background-color:${image.color}` : undefined
18
+ img(
19
+ src=image.src
20
+ srcset=image.srcset
21
+ sizes=sizes
22
+ width=image.width
23
+ height=image.height
24
+ style=placeholder
25
+ alt=opts.alt
26
+ class=opts.class
27
+ loading=eager ? 'eager' : 'lazy'
28
+ decoding=eager ? undefined : 'async'
29
+ fetchpriority=eager ? 'high' : undefined
30
+ )&attributes(attributes)
31
+
32
+ mixin picture(image, options)
33
+ if image
34
+ - const opts = options || {}
35
+ - const sizes = opts.sizes || image.sizes
36
+ if image.sources && image.sources.length
37
+ picture
38
+ each source in image.sources
39
+ source(type=source.type srcset=source.srcset sizes=sizes)
40
+ +picture-img(image, opts, sizes)&attributes(attributes)
41
+ else
42
+ +picture-img(image, opts, sizes)&attributes(attributes)
@@ -0,0 +1,3 @@
1
+ mixin link(item, activeClass, activePathClass)
2
+ - const navBlock = (app.nav && app.nav.navClass) || 'nav'
3
+ a(href=item.href, class=[`${navBlock}__link`, activeClass, activePathClass]) #{ item.name }
@@ -0,0 +1,25 @@
1
+ each item, index in elements || app.nav.elements || []
2
+ - const isActive = item.href === meta.fullPath
3
+ //- Class names come from config/navigation.yaml via app.nav, falling back to
4
+ //- the BEM defaults so an unconfigured site renders exactly as before.
5
+ - const activeClass = isActive ? ((app.nav && app.nav.activeClass) || 'nav__link--active') : ''
6
+ //- The directory that counts as the site root. Defaults to '/', but a site
7
+ //- that prefixes its pages โ€” a language prefix such as /de, a subdirectory
8
+ //- deployment โ€” passes its own through the mixin's `rootPath` argument.
9
+ - const navRoot = (typeof rootPath !== 'undefined' && rootPath) || '/'
10
+ //- The section an entry stands for: the directory its own href lives in.
11
+ - const itemDir = item.href.replace(/\/[^/]*$/, '') || '/'
12
+ //- Only an entry pointing at a directory's index (`/about/index.html` or
13
+ //- `/about/`) stands for a section. A link to a single page such as
14
+ //- `/about/me.html` would otherwise be marked on every other page in /about,
15
+ //- the section index included.
16
+ - const isSection = /\/(index\.html)?$/.test(item.href)
17
+ //- An entry is an ancestor of the current page when that page sits inside
18
+ //- the entry's section โ€” either directly in it, or further down. Asking the
19
+ //- reverse, whether the entry sits inside the current page's directory,
20
+ //- holds only for pages exactly one level deep: a page at
21
+ //- /tutorials/tags/links.html would not match /tutorials/index.html.
22
+ //- Entries living in the root are never ancestors, since every page is
23
+ //- inside the root and Home would otherwise be marked on every page.
24
+ - const isParent = isSection && itemDir !== navRoot && (meta.dirname === itemDir || meta.dirname.indexOf(itemDir + '/') === 0)
25
+ - const activePathClass = !isActive && isParent ? ((app.nav && app.nav.activePathClass) || 'nav__link--active-path') : ''
@@ -0,0 +1,3 @@
1
+ include partials/link-list-navigation
2
+
3
+ +linkListNav
@@ -0,0 +1,8 @@
1
+ include ../helper/mixins
2
+
3
+ mixin linkListNav(elements=app.nav.elements, className='', rootPath='/')
4
+ - const navBlock = (app.nav && app.nav.navClass) || 'nav'
5
+ ul(class=[navBlock, `${navBlock}--list`, className])
6
+ include ../helper/setup
7
+ li(class=`${navBlock}__item`)
8
+ +link(item, activeClass, activePathClass)
@@ -0,0 +1,10 @@
1
+ include ../helper/mixins
2
+
3
+ //- `label` names the <nav> landmark (aria-label), so a page with several
4
+ //- menus stays navigable by screen reader; it goes through the site's t().
5
+ mixin pipeSeparatedNav(elements=app.nav.elements, className='', rootPath='/', label=(typeof t === 'function' ? t('Navigation') : 'Navigation'))
6
+ nav(class=`${className}`, aria-label=label)
7
+ include ../helper/setup
8
+ if index !== 0
9
+ | &nbsp;|&nbsp;
10
+ +link(item, activeClass, activePathClass)
@@ -0,0 +1,8 @@
1
+ include ../helper/mixins
2
+
3
+ //- `label` names the <nav> landmark (aria-label), so a page with several
4
+ //- menus stays navigable by screen reader; it goes through the site's t().
5
+ mixin simpleNav(elements=app.nav.elements, className='', rootPath='/', label=(typeof t === 'function' ? t('Navigation') : 'Navigation'))
6
+ nav(class=`${className}`, aria-label=label)
7
+ include ../helper/setup
8
+ +link(item, activeClass, activePathClass)
@@ -0,0 +1,3 @@
1
+ include partials/pipe-separated-navigation
2
+
3
+ +pipeSeparatedNav
@@ -0,0 +1,3 @@
1
+ include partials/simple-navigation
2
+
3
+ +simpleNav
@@ -0,0 +1,17 @@
1
+ if app.socialMediaLinks && app.socialMediaLinks.length > 0
2
+ nav.social-media-links(aria-label=app.socialMediaLinksLabel || 'Social media')
3
+ ul.social-media-links__list
4
+ each link in app.socialMediaLinks
5
+ li.social-media-links__item
6
+ //- `open_in_new_tab: false` drops the target; pug omits an undefined attribute.
7
+ - const linkTarget = app.socialMediaLinksNewTab === false ? undefined : '_blank'
8
+ a.social-media-links__link(href=link.href, title=link.name, target=linkTarget, rel="noopener noreferrer")
9
+ //- Icons are escaped by default. Set `icon_raw: true`
10
+ //- on an entry to inject the value as HTML โ€” needed
11
+ //- for icon-font markup or an inline SVG, and an
12
+ //- explicit opt-in because the value comes from YAML.
13
+ if link.icon_raw
14
+ span.social-media-links__icon !{link.icon}
15
+ else
16
+ span.social-media-links__icon #{link.icon}
17
+ span.social-media-links__label #{link.name}