maverick-wave-astro 1.25.0 → 1.26.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.
- package/README.md +22 -14
- package/components/ImprintCard.astro +38 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,15 +22,21 @@ export default defineConfig({
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
The integration sets the CSP-safe build options, the `@` alias, the sitemap,
|
|
25
|
-
`/design.css`, `/theme.js` and the MaverickWave script
|
|
26
|
-
`satisfies Site` (`src/types.ts`). Colours
|
|
27
|
-
`main.scss`.
|
|
25
|
+
`/design.css`, `/theme.js` and the MaverickWave script, without its localhost
|
|
26
|
+
indicator. `site.ts` is typed with `satisfies Site` (`src/types.ts`). Colours
|
|
27
|
+
and fonts stay in the site's `main.scss`.
|
|
28
|
+
|
|
29
|
+
The build decides what applies today - promotion, events, closures, today's
|
|
30
|
+
occasion - and the HTML holds nothing else. Every site is meant to be built
|
|
31
|
+
again each night; the werkbank does so at 03:30.
|
|
28
32
|
|
|
29
33
|
After the build it writes `robots.txt` (`site.aiCrawlers`), `llms.txt` and, with
|
|
30
34
|
`site.email`, `/.well-known/security.txt` - only for a site at the root of its
|
|
31
|
-
host, a file in `public/` wins. It
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
host, a file in `public/` wins. It minifies every `.js` in `dist`, files from
|
|
36
|
+
`public/` included, and drops every comment. It stops on a birth date in a
|
|
37
|
+
`data-*` attribute or `birthDate` in the JSON-LD, and warns about titles over 60
|
|
38
|
+
characters, descriptions outside 140-160, pages without exactly one `<h1>` and
|
|
39
|
+
images over 200 KB.
|
|
34
40
|
|
|
35
41
|
## Design
|
|
36
42
|
|
|
@@ -54,9 +60,12 @@ The site wraps `BaseLayout` once and imports its stylesheet there:
|
|
|
54
60
|
</Frame>
|
|
55
61
|
```
|
|
56
62
|
|
|
57
|
-
Slot `banner` sits below the header
|
|
58
|
-
`
|
|
59
|
-
|
|
63
|
+
Slot `banner` sits below the header. `promo` puts `mwa-promo-active` and
|
|
64
|
+
`data-promo-until` on `<html>` when the promotion runs on the day of the build;
|
|
65
|
+
`htmlData` puts other `data-*` there. Canonical, `og:url`, sitemap and
|
|
66
|
+
`llms.txt` name every page without a trailing slash. `bodyClass` adds to
|
|
67
|
+
`site.bodyClass`; `bare` renders only the default slot into `<body>` - no skip
|
|
68
|
+
link, no `<main>`, no header or footer.
|
|
60
69
|
|
|
61
70
|
`AppShell` is the frame of an app page: render it inside `BaseLayout bare`, it
|
|
62
71
|
brings its own skip link. `nav` groups `AppLink`s, `tabbar` takes the phone's
|
|
@@ -79,8 +88,8 @@ The toggles come from the MaverickWave script.
|
|
|
79
88
|
indeterminate, `Timeline` `variant="compact"`, `Picture` `shape` (arch |
|
|
80
89
|
signature | leaf), `Table` `hover` and `stickyFirst`
|
|
81
90
|
- Pages: `NotFound`, `LegalPage`, `ImprintCard`, `PrivacyCard`
|
|
82
|
-
- `Schedule`
|
|
83
|
-
|
|
91
|
+
- `Schedule` takes `mwa-promo-active` away once `data-promo-until` has passed -
|
|
92
|
+
the one check left for the browser, should the nightly build fail
|
|
84
93
|
|
|
85
94
|
Helpers live in `src/` and import as `maverick-wave-astro/<file>`.
|
|
86
95
|
|
|
@@ -116,9 +125,8 @@ site-wide.
|
|
|
116
125
|
Seasonal decoration on the cards, panels and testimonials - snow, a garland,
|
|
117
126
|
leaves, bunting. Drawn by MaverickWave (`components/occasions`), switched on by
|
|
118
127
|
a file: with `src/content/occasions.json`, or a werkbank section with an
|
|
119
|
-
`occasions.schema.json`, the integration
|
|
120
|
-
|
|
121
|
-
`<head>`. It picks today's entry before the first paint.
|
|
128
|
+
`occasions.schema.json`, the integration picks today's entry while building and
|
|
129
|
+
puts its classes on `<html>`. The other entries never reach the HTML.
|
|
122
130
|
|
|
123
131
|
```json
|
|
124
132
|
{
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
// Imprint from imprint.json as a card - the way the product sites show it.
|
|
3
3
|
// The site brings the page frame and heading itself.
|
|
4
|
+
import { config } from '../dist/config.js';
|
|
4
5
|
import PostalAddress from './PostalAddress.astro';
|
|
5
6
|
|
|
7
|
+
interface AddressNotes {
|
|
8
|
+
noVisitors?: boolean;
|
|
9
|
+
noParcels?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
interface Props {
|
|
7
13
|
imprint: {
|
|
8
14
|
subtitle: string;
|
|
9
15
|
address: { company?: string; name: string; street: string; city: string };
|
|
16
|
+
addressNotes?: AddressNotes;
|
|
10
17
|
contactTitle: string;
|
|
11
18
|
vatIdTitle?: string;
|
|
12
19
|
vatId?: string;
|
|
@@ -16,15 +23,45 @@ interface Props {
|
|
|
16
23
|
licensesText?: string;
|
|
17
24
|
};
|
|
18
25
|
mail: { href: string; text: string };
|
|
26
|
+
addressNoteTexts?: Partial<Record<keyof AddressNotes, string>>;
|
|
19
27
|
class?: string;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
|
-
const
|
|
30
|
+
const german = config.site.lang.startsWith('de');
|
|
31
|
+
|
|
32
|
+
const { imprint, mail, addressNoteTexts = {}, class: className } = Astro.props;
|
|
33
|
+
|
|
34
|
+
// Letters are never excluded here - a note against mail would let the address
|
|
35
|
+
// count as not serviceable (§ 5 DDG).
|
|
36
|
+
const noteTexts = {
|
|
37
|
+
noVisitors: german
|
|
38
|
+
? 'Kein Publikumsverkehr - Besuche nur nach Terminvereinbarung.'
|
|
39
|
+
: 'No walk-in visitors - visits by appointment only.',
|
|
40
|
+
noParcels: german
|
|
41
|
+
? 'Keine Annahme von Paketen und Warensendungen.'
|
|
42
|
+
: 'Parcels and goods deliveries are not accepted.',
|
|
43
|
+
...addressNoteTexts,
|
|
44
|
+
};
|
|
45
|
+
const notes = (['noVisitors', 'noParcels'] as const)
|
|
46
|
+
.filter(key => imprint.addressNotes?.[key])
|
|
47
|
+
.map(key => noteTexts[key]);
|
|
23
48
|
---
|
|
24
49
|
|
|
25
50
|
<div class:list={['mw-card mw-card-simple mw-prose', className]}>
|
|
26
51
|
<h2>{imprint.subtitle}</h2>
|
|
27
52
|
<PostalAddress address={imprint.address} />
|
|
53
|
+
{
|
|
54
|
+
notes.length > 0 && (
|
|
55
|
+
<p class="mw-text-sm mw-text-muted">
|
|
56
|
+
{notes.map((note, index) => (
|
|
57
|
+
<Fragment>
|
|
58
|
+
{index > 0 && <br />}
|
|
59
|
+
{note}
|
|
60
|
+
</Fragment>
|
|
61
|
+
))}
|
|
62
|
+
</p>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
28
65
|
|
|
29
66
|
<h2>{imprint.contactTitle}</h2>
|
|
30
67
|
<p><a href={mail.href}>{mail.text}</a></p>
|
package/package.json
CHANGED