maverick-wave-astro 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.
- package/README.md +83 -0
- package/bin/check.mjs +53 -0
- package/components/Accordion.astro +47 -0
- package/components/Address.astro +36 -0
- package/components/Announcement.astro +27 -0
- package/components/Avatar.astro +34 -0
- package/components/BaseLayout.astro +142 -0
- package/components/BlogPost.astro +144 -0
- package/components/Breadcrumbs.astro +69 -0
- package/components/Calendar.astro +104 -0
- package/components/CalendarLegend.astro +34 -0
- package/components/ComingSoon.astro +21 -0
- package/components/DateStamp.astro +24 -0
- package/components/EmptyState.astro +24 -0
- package/components/Favicons.astro +42 -0
- package/components/Feed.astro +85 -0
- package/components/Footer.astro +162 -0
- package/components/Gallery.astro +55 -0
- package/components/Header.astro +107 -0
- package/components/Hero.astro +158 -0
- package/components/Icon.astro +27 -0
- package/components/IconCard.astro +36 -0
- package/components/ImageSlider.astro +64 -0
- package/components/ImprintCard.astro +52 -0
- package/components/JsonLd.astro +11 -0
- package/components/LanguageSwitch.astro +53 -0
- package/components/LegalPage.astro +19 -0
- package/components/Media.astro +40 -0
- package/components/MetaInfo.astro +24 -0
- package/components/Modal.astro +47 -0
- package/components/Mosaic.astro +38 -0
- package/components/NotFound.astro +34 -0
- package/components/Offer.astro +79 -0
- package/components/OpeningHours.astro +14 -0
- package/components/PageHeader.astro +38 -0
- package/components/Picture.astro +50 -0
- package/components/PortraitGallery.astro +68 -0
- package/components/PostalAddress.astro +20 -0
- package/components/Price.astro +84 -0
- package/components/PrivacyCard.astro +65 -0
- package/components/Progress.astro +53 -0
- package/components/PromoBar.astro +25 -0
- package/components/Schedule.astro +60 -0
- package/components/SectionHead.astro +18 -0
- package/components/SocialLinks.astro +47 -0
- package/components/Stepper.astro +76 -0
- package/components/Stories.astro +80 -0
- package/components/TabPanel.astro +15 -0
- package/components/Table.astro +115 -0
- package/components/Tabs.astro +38 -0
- package/components/Testimonial.astro +61 -0
- package/components/ThemeToggle.astro +30 -0
- package/components/Tiles.astro +63 -0
- package/components/Timeline.astro +64 -0
- package/components/ValueList.astro +42 -0
- package/config/eslint.js +58 -0
- package/config/prettier.mjs +30 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +6 -0
- package/dist/contact.d.ts +2 -0
- package/dist/contact.js +8 -0
- package/dist/date.d.ts +26 -0
- package/dist/date.js +72 -0
- package/dist/design.d.ts +166 -0
- package/dist/design.js +175 -0
- package/dist/icons.d.ts +13 -0
- package/dist/icons.js +15 -0
- package/dist/image-size.d.ts +10 -0
- package/dist/image-size.js +70 -0
- package/dist/integration.d.ts +13 -0
- package/dist/integration.js +90 -0
- package/dist/path.d.ts +1 -0
- package/dist/path.js +5 -0
- package/dist/schedule.d.ts +30 -0
- package/dist/schedule.js +117 -0
- package/dist/social.d.ts +35 -0
- package/dist/social.js +37 -0
- package/dist/structured-data.d.ts +1 -0
- package/dist/structured-data.js +2 -0
- package/dist/text.d.ts +3 -0
- package/dist/text.js +30 -0
- package/dist/types.d.ts +35 -0
- package/dist/types.js +1 -0
- package/dist/uploads.d.ts +7 -0
- package/dist/uploads.js +64 -0
- package/package.json +75 -0
- package/routes/design.css.ts +7 -0
- package/routes/theme.js.ts +28 -0
- package/routes/virtual.d.ts +6 -0
- package/schemas/design.schema.json +214 -0
- package/schemas/promo.schema.json +37 -0
- package/styles/schedule.css +17 -0
- package/styles/table.css +8 -0
- package/styles/theme-toggle.css +13 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The parallax hero of the start pages. "start" puts the text at the bottom
|
|
3
|
+
// left over a photo or pattern, "fade" centres it and fades it out while
|
|
4
|
+
// scrolling. Both share media, title, buttons and the scroll hint.
|
|
5
|
+
interface Link {
|
|
6
|
+
href: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
id?: string;
|
|
12
|
+
variant?: 'start' | 'fade';
|
|
13
|
+
titleStart?: string;
|
|
14
|
+
titleAccent?: string;
|
|
15
|
+
accent?: 'bold' | 'primary' | 'secondary';
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
features?: string;
|
|
19
|
+
badge?: { text: string; pulse?: boolean };
|
|
20
|
+
cta?: Link;
|
|
21
|
+
secondaryCta?: Link;
|
|
22
|
+
scrollHint?: Link & { ariaLabel: string };
|
|
23
|
+
classes?: {
|
|
24
|
+
hero?: string;
|
|
25
|
+
content?: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
paragraph?: string;
|
|
29
|
+
features?: string;
|
|
30
|
+
actions?: string;
|
|
31
|
+
buttons?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
id,
|
|
37
|
+
variant = 'start',
|
|
38
|
+
titleStart,
|
|
39
|
+
titleAccent,
|
|
40
|
+
accent = 'bold',
|
|
41
|
+
subtitle,
|
|
42
|
+
text,
|
|
43
|
+
features,
|
|
44
|
+
badge,
|
|
45
|
+
cta,
|
|
46
|
+
secondaryCta,
|
|
47
|
+
scrollHint,
|
|
48
|
+
classes = {},
|
|
49
|
+
} = Astro.props;
|
|
50
|
+
|
|
51
|
+
const fade = variant === 'fade';
|
|
52
|
+
const Badge = fade ? 'span' : 'div';
|
|
53
|
+
const button = classes.buttons ?? 'mw-btn-lg';
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
<section id={id} class="mw-section mw-parallax-sticky mw-parallax-rise">
|
|
57
|
+
<div class="mw-container mw-parallax">
|
|
58
|
+
<slot name="media" />
|
|
59
|
+
|
|
60
|
+
<div class:list={['mw-hero', classes.hero]}>
|
|
61
|
+
<div
|
|
62
|
+
class:list={[
|
|
63
|
+
fade
|
|
64
|
+
? 'mw-home mw-home-content-fade'
|
|
65
|
+
: 'mw-home mw-home-start mw-home-bottom mw-home-content',
|
|
66
|
+
classes.content,
|
|
67
|
+
]}
|
|
68
|
+
>
|
|
69
|
+
<div class:list={['mw-home-text', classes.text]}>
|
|
70
|
+
{
|
|
71
|
+
badge && (
|
|
72
|
+
<Badge class="mw-hero-badge">
|
|
73
|
+
<span
|
|
74
|
+
class:list={[
|
|
75
|
+
'mw-hero-badge-dot',
|
|
76
|
+
badge.pulse && 'mw-badge-pulse',
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
{badge.text}
|
|
80
|
+
</Badge>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
<slot name="kicker" />
|
|
84
|
+
{
|
|
85
|
+
Astro.slots.has('title') ? (
|
|
86
|
+
<h1 class={classes.title}>
|
|
87
|
+
<slot name="title" />
|
|
88
|
+
</h1>
|
|
89
|
+
) : fade ? (
|
|
90
|
+
<h1 class={classes.title}>
|
|
91
|
+
{titleStart}{' '}
|
|
92
|
+
<span class={`mw-text-${accent}`}>{titleAccent}</span>
|
|
93
|
+
</h1>
|
|
94
|
+
) : (
|
|
95
|
+
<h1 class:list={['mw-mb-6', classes.title]}>
|
|
96
|
+
{titleStart}
|
|
97
|
+
<br />
|
|
98
|
+
<span class={`mw-text-${accent}`}>{titleAccent}</span>
|
|
99
|
+
</h1>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
{subtitle && <h2 class="mw-mb-5">{subtitle}</h2>}
|
|
103
|
+
{
|
|
104
|
+
text && (
|
|
105
|
+
<p class:list={[!fade && 'mw-leading-normal', classes.paragraph]}>
|
|
106
|
+
{text}
|
|
107
|
+
</p>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
{features && <p class={classes.features}>{features}</p>}
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
{
|
|
114
|
+
(cta || secondaryCta) && (
|
|
115
|
+
<div
|
|
116
|
+
class:list={[
|
|
117
|
+
'mw-home-actions',
|
|
118
|
+
classes.actions ?? (fade && 'mw-mb-7'),
|
|
119
|
+
]}
|
|
120
|
+
>
|
|
121
|
+
{cta && (
|
|
122
|
+
<a
|
|
123
|
+
class:list={['mw-btn mw-btn-primary', button]}
|
|
124
|
+
href={cta.href}
|
|
125
|
+
>
|
|
126
|
+
<slot name="cta-icon" />
|
|
127
|
+
{cta.label}
|
|
128
|
+
</a>
|
|
129
|
+
)}
|
|
130
|
+
{secondaryCta && (
|
|
131
|
+
<a
|
|
132
|
+
class:list={['mw-btn mw-btn-outline', button]}
|
|
133
|
+
href={secondaryCta.href}
|
|
134
|
+
>
|
|
135
|
+
{secondaryCta.label}
|
|
136
|
+
<slot name="secondary-icon" />
|
|
137
|
+
</a>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
{
|
|
146
|
+
scrollHint && (
|
|
147
|
+
<a
|
|
148
|
+
class:list={['mw-scroll-hint', !fade && 'mw-scroll-hint-end']}
|
|
149
|
+
href={scrollHint.href}
|
|
150
|
+
aria-label={scrollHint.ariaLabel}
|
|
151
|
+
>
|
|
152
|
+
<span>{scrollHint.label}</span>
|
|
153
|
+
<slot name="scroll-icon" />
|
|
154
|
+
</a>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
</div>
|
|
158
|
+
</section>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The site keeps its own collection (icons.ts) and only passes the inner SVG
|
|
3
|
+
// markup - strokes on a 24 grid, colour from the text.
|
|
4
|
+
interface Props {
|
|
5
|
+
svg: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { svg, size = 20, class: className } = Astro.props;
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<svg
|
|
14
|
+
class={className}
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
width={size}
|
|
17
|
+
height={size}
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
fill="none"
|
|
20
|
+
stroke="currentColor"
|
|
21
|
+
stroke-width="1.7"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
focusable="false"
|
|
26
|
+
set:html={svg}
|
|
27
|
+
/>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Card with an icon before the title and a divider below - the building block
|
|
3
|
+
// of almost every service, contact and opening hours card.
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
level?: 'h2' | 'h3' | 'h4';
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { title, level = 'h3', class: className } = Astro.props;
|
|
11
|
+
const Title = level;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<article class:list={['mw-card', className]}>
|
|
15
|
+
<div class="mw-card-body">
|
|
16
|
+
<Title class="mw-card-title">
|
|
17
|
+
{
|
|
18
|
+
Astro.slots.has('icon') && (
|
|
19
|
+
<span class="mw-card-title-icon">
|
|
20
|
+
<slot name="icon" />
|
|
21
|
+
</span>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
{title}
|
|
25
|
+
</Title>
|
|
26
|
+
<hr class="mw-card-title-divider" />
|
|
27
|
+
<slot />
|
|
28
|
+
{
|
|
29
|
+
Astro.slots.has('footer') && (
|
|
30
|
+
<div class="mw-card-footer">
|
|
31
|
+
<slot name="footer" />
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
</div>
|
|
36
|
+
</article>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One photo at a time, switched by labelled buttons below - for "kitchen,
|
|
3
|
+
// bedroom, balcony" rather than a slideshow. Without the script the first
|
|
4
|
+
// photo stays.
|
|
5
|
+
import { publicImage } from '../dist/image-size.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
// src from public/, label is the text of its button.
|
|
9
|
+
images: readonly { src: string; alt: string; label: string }[];
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { images, class: className } = Astro.props;
|
|
14
|
+
const [first, ...others] = images;
|
|
15
|
+
|
|
16
|
+
// Three buttons fit one row, four become two by two.
|
|
17
|
+
const grid =
|
|
18
|
+
images.length > 3
|
|
19
|
+
? 'mw-image-slider-controls-grid-2'
|
|
20
|
+
: 'mw-image-slider-controls-grid-3';
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<div class:list={['mw-image-slider', className]}>
|
|
24
|
+
<div class="mw-image-slider-base" data-index="0">
|
|
25
|
+
<img
|
|
26
|
+
class="mw-image-slider-base-image"
|
|
27
|
+
{...publicImage(first.src)}
|
|
28
|
+
alt={first.alt}
|
|
29
|
+
decoding="async"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="mw-image-slider-overlay">
|
|
34
|
+
{
|
|
35
|
+
others.map((image, index) => (
|
|
36
|
+
<div class="mw-image-slider-overlay-image" data-index={index + 1}>
|
|
37
|
+
<img
|
|
38
|
+
{...publicImage(image.src)}
|
|
39
|
+
alt={image.alt}
|
|
40
|
+
loading="lazy"
|
|
41
|
+
decoding="async"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
))
|
|
45
|
+
}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class={grid}>
|
|
49
|
+
{
|
|
50
|
+
images.map((image, index) => (
|
|
51
|
+
<button
|
|
52
|
+
type="button"
|
|
53
|
+
class:list={[
|
|
54
|
+
'mw-btn mw-btn-outline mw-btn-sm',
|
|
55
|
+
index === 0 && 'mw-active',
|
|
56
|
+
]}
|
|
57
|
+
data-index={index}
|
|
58
|
+
>
|
|
59
|
+
{image.label}
|
|
60
|
+
</button>
|
|
61
|
+
))
|
|
62
|
+
}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Imprint from imprint.json as a card - the way the product sites show it.
|
|
3
|
+
// The site brings the page frame and heading itself.
|
|
4
|
+
import PostalAddress from './PostalAddress.astro';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
imprint: {
|
|
8
|
+
subtitle: string;
|
|
9
|
+
address: { company?: string; name: string; street: string; city: string };
|
|
10
|
+
contactTitle: string;
|
|
11
|
+
vatIdTitle?: string;
|
|
12
|
+
vatId?: string;
|
|
13
|
+
disputeTitle: string;
|
|
14
|
+
disputeText: string;
|
|
15
|
+
licensesTitle?: string;
|
|
16
|
+
licensesText?: string;
|
|
17
|
+
};
|
|
18
|
+
mail: { href: string; text: string };
|
|
19
|
+
class?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const { imprint, mail, class: className } = Astro.props;
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<div class:list={['mw-card mw-card-simple mw-prose', className]}>
|
|
26
|
+
<h2>{imprint.subtitle}</h2>
|
|
27
|
+
<PostalAddress address={imprint.address} />
|
|
28
|
+
|
|
29
|
+
<h2>{imprint.contactTitle}</h2>
|
|
30
|
+
<p><a href={mail.href}>{mail.text}</a></p>
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
imprint.vatId && (
|
|
34
|
+
<Fragment>
|
|
35
|
+
<h2>{imprint.vatIdTitle}</h2>
|
|
36
|
+
<p>{imprint.vatId}</p>
|
|
37
|
+
</Fragment>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
<h2>{imprint.disputeTitle}</h2>
|
|
42
|
+
<p>{imprint.disputeText}</p>
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
imprint.licensesTitle && (
|
|
46
|
+
<Fragment>
|
|
47
|
+
<h2>{imprint.licensesTitle}</h2>
|
|
48
|
+
<p>{imprint.licensesText}</p>
|
|
49
|
+
</Fragment>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { PACKAGE_ICONS } from '../dist/icons.js';
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
languages: readonly {
|
|
7
|
+
code: string;
|
|
8
|
+
flag: string;
|
|
9
|
+
name: string;
|
|
10
|
+
href: string;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
label: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { languages, label, class: className } = Astro.props;
|
|
18
|
+
const current = languages.find(language => language.active) ?? languages[0];
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<details class:list={['mw-dropdown mw-dropdown-end mw-lang-switch', className]}>
|
|
22
|
+
<summary aria-label={label}>
|
|
23
|
+
<span class:list={['mw-flag', `mw-flag-${current.flag}`]}></span>
|
|
24
|
+
<span class="mw-lang-switch-code">{current.code}</span>
|
|
25
|
+
<Icon
|
|
26
|
+
svg={PACKAGE_ICONS['chevron-down']}
|
|
27
|
+
size={14}
|
|
28
|
+
class="mw-dropdown-caret"
|
|
29
|
+
/>
|
|
30
|
+
</summary>
|
|
31
|
+
<div class="mw-dropdown-menu">
|
|
32
|
+
{
|
|
33
|
+
languages.map(language => (
|
|
34
|
+
<a
|
|
35
|
+
class:list={['mw-dropdown-item', language.active && 'mw-active']}
|
|
36
|
+
href={language.href}
|
|
37
|
+
hreflang={language.code}
|
|
38
|
+
aria-current={language.active ? 'true' : undefined}
|
|
39
|
+
>
|
|
40
|
+
<span class:list={['mw-flag', `mw-flag-${language.flag}`]} />
|
|
41
|
+
<span class="mw-lang-switch-name" lang={language.code}>
|
|
42
|
+
{language.name}
|
|
43
|
+
</span>
|
|
44
|
+
<Icon
|
|
45
|
+
svg={PACKAGE_ICONS.check}
|
|
46
|
+
size={14}
|
|
47
|
+
class="mw-lang-switch-check"
|
|
48
|
+
/>
|
|
49
|
+
</a>
|
|
50
|
+
))
|
|
51
|
+
}
|
|
52
|
+
</div>
|
|
53
|
+
</details>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Frame for imprint and privacy policy: heading, optionally a notice above,
|
|
3
|
+
// the text as running prose.
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
notice?: string;
|
|
7
|
+
noticeType?: 'warning' | 'info';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { title, notice, noticeType = 'warning' } = Astro.props;
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<section class="mw-section">
|
|
14
|
+
<div class="mw-container mw-content mw-prose">
|
|
15
|
+
<h1>{title}</h1>
|
|
16
|
+
{notice && <div class={`mw-alert mw-alert-${noticeType}`}>{notice}</div>}
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Self-hosted audio or video with the browser's own controls - the framework
|
|
3
|
+
// ships no player. The element only gets to sit right, full width.
|
|
4
|
+
import { withBase } from '../dist/path.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
// From public/. The kind follows from the extension.
|
|
8
|
+
src: string;
|
|
9
|
+
poster?: string;
|
|
10
|
+
caption?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { src, poster, caption, label, class: className } = Astro.props;
|
|
16
|
+
const video = /\.(mp4|webm|mov)$/i.test(src);
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<div class:list={['mw-media', className]}>
|
|
20
|
+
{
|
|
21
|
+
video ? (
|
|
22
|
+
<video
|
|
23
|
+
controls
|
|
24
|
+
preload="metadata"
|
|
25
|
+
playsinline
|
|
26
|
+
src={withBase(src)}
|
|
27
|
+
poster={poster && withBase(poster)}
|
|
28
|
+
aria-label={label}
|
|
29
|
+
/>
|
|
30
|
+
) : (
|
|
31
|
+
<audio
|
|
32
|
+
controls
|
|
33
|
+
preload="metadata"
|
|
34
|
+
src={withBase(src)}
|
|
35
|
+
aria-label={label}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
{caption && <p class="mw-media-caption">{caption}</p>}
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The row of small facts under a heading - date, place, count. The separators
|
|
3
|
+
// come from the stylesheet, not from the markup.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
// icon is inner SVG markup like Icon takes.
|
|
8
|
+
items: readonly { text: string; icon?: string }[];
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { items, class: className } = Astro.props;
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<div class:list={['mw-meta-header', className]}>
|
|
16
|
+
{
|
|
17
|
+
items.map(item => (
|
|
18
|
+
<div class="mw-meta-item">
|
|
19
|
+
{item.icon && <Icon svg={item.icon} size={16} />}
|
|
20
|
+
<span>{item.text}</span>
|
|
21
|
+
</div>
|
|
22
|
+
))
|
|
23
|
+
}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A <dialog>. Any element with data-mw-modal="<id>" opens it; the script
|
|
3
|
+
// closes it on its close buttons and on a click on the backdrop. Escape, the
|
|
4
|
+
// focus trap and the inert page come from the element itself.
|
|
5
|
+
import { config } from '../dist/config.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
size?: 'sm' | 'lg' | 'xl';
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const german = config.site.lang.startsWith('de');
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
id,
|
|
19
|
+
title,
|
|
20
|
+
size,
|
|
21
|
+
closeLabel = german ? 'Schließen' : 'Close',
|
|
22
|
+
class: className,
|
|
23
|
+
} = Astro.props;
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<dialog
|
|
27
|
+
id={id}
|
|
28
|
+
class:list={['mw-modal', size && `mw-modal-${size}`, className]}
|
|
29
|
+
closedby="any"
|
|
30
|
+
>
|
|
31
|
+
<div class="mw-modal-header">
|
|
32
|
+
<h4 class="mw-modal-title">{title}</h4>
|
|
33
|
+
<button type="button" class="mw-modal-close" aria-label={closeLabel}>
|
|
34
|
+
𝗫
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="mw-modal-body">
|
|
38
|
+
<slot />
|
|
39
|
+
</div>
|
|
40
|
+
{
|
|
41
|
+
Astro.slots.has('footer') && (
|
|
42
|
+
<div class="mw-modal-footer">
|
|
43
|
+
<slot name="footer" />
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
</dialog>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Photos of any shape in one grid. The script gives each photo a tile that
|
|
3
|
+
// matches its proportions, a click opens all of them in the lightbox.
|
|
4
|
+
import { publicImage } from '../dist/image-size.js';
|
|
5
|
+
import { withBase } from '../dist/path.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
photos: readonly {
|
|
9
|
+
// From public/. full is a larger file for the lightbox, if there is one.
|
|
10
|
+
src: string;
|
|
11
|
+
full?: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
caption?: string;
|
|
14
|
+
// The centrepiece: two by two tiles.
|
|
15
|
+
big?: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
gap?: 'sm' | 'lg';
|
|
18
|
+
class?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { photos, gap, class: className } = Astro.props;
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<div class:list={['mw-mosaic', gap && `mw-mosaic-gap-${gap}`, className]}>
|
|
25
|
+
{
|
|
26
|
+
photos.map(photo => {
|
|
27
|
+
const image = publicImage(photo.src);
|
|
28
|
+
return (
|
|
29
|
+
<figure class:list={['mw-mosaic-item', photo.big && 'mw-mosaic-big']}>
|
|
30
|
+
<a href={photo.full ? withBase(photo.full) : image.src}>
|
|
31
|
+
<img {...image} alt={photo.alt} loading="lazy" decoding="async" />
|
|
32
|
+
</a>
|
|
33
|
+
{photo.caption && <figcaption>{photo.caption}</figcaption>}
|
|
34
|
+
</figure>
|
|
35
|
+
);
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Content of the plain 404 page. The site wraps layout, header and footer
|
|
3
|
+
// around it.
|
|
4
|
+
import { config } from '../dist/config.js';
|
|
5
|
+
import { withBase } from '../dist/path.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
backLabel?: string;
|
|
11
|
+
barClass?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const german = config.site.lang.startsWith('de');
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
title = german ? 'Hier ist nichts' : 'Nothing here',
|
|
18
|
+
text = german
|
|
19
|
+
? 'Die Seite gibt es nicht - vielleicht ein alter Link oder ein Tippfehler.'
|
|
20
|
+
: 'This page does not exist - maybe an old link or a typo.',
|
|
21
|
+
backLabel = german ? 'Zur Startseite' : 'Back to the start page',
|
|
22
|
+
barClass = 'mw-d-flex mw-justify-center',
|
|
23
|
+
} = Astro.props;
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<section class="mw-section">
|
|
27
|
+
<div class="mw-container mw-content mw-text-center">
|
|
28
|
+
<h1>{title}</h1>
|
|
29
|
+
<p class="mw-text-muted mw-text-measure mw-mx-auto">{text}</p>
|
|
30
|
+
<div class={barClass}>
|
|
31
|
+
<a class="mw-btn mw-btn-primary" href={withBase('/')}>{backLabel}</a>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</section>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A card something is booked from: title, text, what is included, the price
|
|
3
|
+
// with its note, the button in the footer slot. featured sets a label above
|
|
4
|
+
// the card and lifts it out of the row.
|
|
5
|
+
import type { Promo } from '../dist/schedule.js';
|
|
6
|
+
import Price from './Price.astro';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
title: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
features?: readonly string[];
|
|
12
|
+
price?: string | number;
|
|
13
|
+
promo?: Promo | null;
|
|
14
|
+
period?: string;
|
|
15
|
+
note?: string;
|
|
16
|
+
featured?: { label: string; color?: 'secondary' | 'info' };
|
|
17
|
+
level?: 'h2' | 'h3';
|
|
18
|
+
class?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
title,
|
|
23
|
+
text,
|
|
24
|
+
features = [],
|
|
25
|
+
price,
|
|
26
|
+
promo,
|
|
27
|
+
period,
|
|
28
|
+
note,
|
|
29
|
+
featured,
|
|
30
|
+
level = 'h3',
|
|
31
|
+
class: className,
|
|
32
|
+
} = Astro.props;
|
|
33
|
+
const Title = level;
|
|
34
|
+
const Frame = featured ? 'div' : Fragment;
|
|
35
|
+
const frame = featured
|
|
36
|
+
? {
|
|
37
|
+
class: [
|
|
38
|
+
'mw-card-feature',
|
|
39
|
+
featured.color && `mw-card-feature-${featured.color}`,
|
|
40
|
+
]
|
|
41
|
+
.filter(Boolean)
|
|
42
|
+
.join(' '),
|
|
43
|
+
}
|
|
44
|
+
: {};
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
<Frame {...frame}>
|
|
48
|
+
{featured && <p class="mw-card-feature-label">{featured.label}</p>}
|
|
49
|
+
<article class:list={['mw-card mw-offer', className]}>
|
|
50
|
+
<div class="mw-card-body">
|
|
51
|
+
<Title class="mw-card-title">{title}</Title>
|
|
52
|
+
<hr class="mw-card-title-divider" />
|
|
53
|
+
{text && <p class="mw-card-text">{text}</p>}
|
|
54
|
+
{
|
|
55
|
+
features.length > 0 && (
|
|
56
|
+
<ul class="mw-list mw-list-check">
|
|
57
|
+
{features.map(feature => (
|
|
58
|
+
<li>{feature}</li>
|
|
59
|
+
))}
|
|
60
|
+
</ul>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
<slot />
|
|
64
|
+
{
|
|
65
|
+
price !== undefined && (
|
|
66
|
+
<Price amount={price} promo={promo} period={period} size="sm" />
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
{note && <p class="mw-price-note">{note}</p>}
|
|
70
|
+
{
|
|
71
|
+
Astro.slots.has('footer') && (
|
|
72
|
+
<div class="mw-card-footer">
|
|
73
|
+
<slot name="footer" />
|
|
74
|
+
</div>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
</div>
|
|
78
|
+
</article>
|
|
79
|
+
</Frame>
|