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.
Files changed (94) hide show
  1. package/README.md +83 -0
  2. package/bin/check.mjs +53 -0
  3. package/components/Accordion.astro +47 -0
  4. package/components/Address.astro +36 -0
  5. package/components/Announcement.astro +27 -0
  6. package/components/Avatar.astro +34 -0
  7. package/components/BaseLayout.astro +142 -0
  8. package/components/BlogPost.astro +144 -0
  9. package/components/Breadcrumbs.astro +69 -0
  10. package/components/Calendar.astro +104 -0
  11. package/components/CalendarLegend.astro +34 -0
  12. package/components/ComingSoon.astro +21 -0
  13. package/components/DateStamp.astro +24 -0
  14. package/components/EmptyState.astro +24 -0
  15. package/components/Favicons.astro +42 -0
  16. package/components/Feed.astro +85 -0
  17. package/components/Footer.astro +162 -0
  18. package/components/Gallery.astro +55 -0
  19. package/components/Header.astro +107 -0
  20. package/components/Hero.astro +158 -0
  21. package/components/Icon.astro +27 -0
  22. package/components/IconCard.astro +36 -0
  23. package/components/ImageSlider.astro +64 -0
  24. package/components/ImprintCard.astro +52 -0
  25. package/components/JsonLd.astro +11 -0
  26. package/components/LanguageSwitch.astro +53 -0
  27. package/components/LegalPage.astro +19 -0
  28. package/components/Media.astro +40 -0
  29. package/components/MetaInfo.astro +24 -0
  30. package/components/Modal.astro +47 -0
  31. package/components/Mosaic.astro +38 -0
  32. package/components/NotFound.astro +34 -0
  33. package/components/Offer.astro +79 -0
  34. package/components/OpeningHours.astro +14 -0
  35. package/components/PageHeader.astro +38 -0
  36. package/components/Picture.astro +50 -0
  37. package/components/PortraitGallery.astro +68 -0
  38. package/components/PostalAddress.astro +20 -0
  39. package/components/Price.astro +84 -0
  40. package/components/PrivacyCard.astro +65 -0
  41. package/components/Progress.astro +53 -0
  42. package/components/PromoBar.astro +25 -0
  43. package/components/Schedule.astro +60 -0
  44. package/components/SectionHead.astro +18 -0
  45. package/components/SocialLinks.astro +47 -0
  46. package/components/Stepper.astro +76 -0
  47. package/components/Stories.astro +80 -0
  48. package/components/TabPanel.astro +15 -0
  49. package/components/Table.astro +115 -0
  50. package/components/Tabs.astro +38 -0
  51. package/components/Testimonial.astro +61 -0
  52. package/components/ThemeToggle.astro +30 -0
  53. package/components/Tiles.astro +63 -0
  54. package/components/Timeline.astro +64 -0
  55. package/components/ValueList.astro +42 -0
  56. package/config/eslint.js +58 -0
  57. package/config/prettier.mjs +30 -0
  58. package/dist/config.d.ts +3 -0
  59. package/dist/config.js +6 -0
  60. package/dist/contact.d.ts +2 -0
  61. package/dist/contact.js +8 -0
  62. package/dist/date.d.ts +26 -0
  63. package/dist/date.js +72 -0
  64. package/dist/design.d.ts +166 -0
  65. package/dist/design.js +175 -0
  66. package/dist/icons.d.ts +13 -0
  67. package/dist/icons.js +15 -0
  68. package/dist/image-size.d.ts +10 -0
  69. package/dist/image-size.js +70 -0
  70. package/dist/integration.d.ts +13 -0
  71. package/dist/integration.js +90 -0
  72. package/dist/path.d.ts +1 -0
  73. package/dist/path.js +5 -0
  74. package/dist/schedule.d.ts +30 -0
  75. package/dist/schedule.js +117 -0
  76. package/dist/social.d.ts +35 -0
  77. package/dist/social.js +37 -0
  78. package/dist/structured-data.d.ts +1 -0
  79. package/dist/structured-data.js +2 -0
  80. package/dist/text.d.ts +3 -0
  81. package/dist/text.js +30 -0
  82. package/dist/types.d.ts +35 -0
  83. package/dist/types.js +1 -0
  84. package/dist/uploads.d.ts +7 -0
  85. package/dist/uploads.js +64 -0
  86. package/package.json +75 -0
  87. package/routes/design.css.ts +7 -0
  88. package/routes/theme.js.ts +28 -0
  89. package/routes/virtual.d.ts +6 -0
  90. package/schemas/design.schema.json +214 -0
  91. package/schemas/promo.schema.json +37 -0
  92. package/styles/schedule.css +17 -0
  93. package/styles/table.css +8 -0
  94. package/styles/theme-toggle.css +13 -0
@@ -0,0 +1,104 @@
1
+ ---
2
+ // One month as mw-calendar: weekday row starting on Monday, six rows of days,
3
+ // optionally a legend. What a day shows - dots, a link, disabled - comes from
4
+ // the site through `view`.
5
+ import type { CalendarDay, CalendarMonth } from '../dist/date.js';
6
+ import { fullDate } from '../dist/date.js';
7
+ import CalendarLegend from './CalendarLegend.astro';
8
+
9
+ export type DayView = {
10
+ dots?: readonly string[];
11
+ href?: string;
12
+ disabled?: boolean;
13
+ label?: string;
14
+ };
15
+
16
+ interface Props<T extends object = object> {
17
+ month: CalendarMonth<T>;
18
+ locale?: string;
19
+ view?: (day: CalendarDay & T) => DayView;
20
+ legend?: readonly { dot?: string; label: string }[];
21
+ class?: string;
22
+ }
23
+
24
+ const {
25
+ month,
26
+ locale = 'de-DE',
27
+ view = () => ({}),
28
+ legend,
29
+ class: className,
30
+ } = Astro.props;
31
+
32
+ const title = new Date(month.year, month.month, 1).toLocaleDateString(locale, {
33
+ month: 'long',
34
+ year: 'numeric',
35
+ });
36
+
37
+ // Monday first: 5 January 2026 is a Monday.
38
+ const weekdays = Array.from({ length: 7 }, (_, index) =>
39
+ new Date(2026, 0, 5 + index).toLocaleDateString(locale, { weekday: 'short' })
40
+ );
41
+ ---
42
+
43
+ <div class:list={['mw-calendar', className]}>
44
+ <div class="mw-calendar-header">
45
+ <div class="mw-calendar-title">
46
+ <slot name="title" />
47
+ {title}
48
+ </div>
49
+ </div>
50
+
51
+ <div class="mw-calendar-grid">
52
+ {
53
+ weekdays.map((weekday, index) => (
54
+ <div
55
+ class:list={[
56
+ 'mw-calendar-weekday',
57
+ index > 4 && 'mw-calendar-weekend',
58
+ ]}
59
+ aria-hidden="true"
60
+ >
61
+ {weekday}
62
+ </div>
63
+ ))
64
+ }
65
+
66
+ {
67
+ month.days.map(day => {
68
+ const { dots = [], href, disabled = false, label } = view(day);
69
+ // A plain class attribute keeps its place in the markup, class:list
70
+ // would move it to the end.
71
+ const className = [
72
+ 'mw-calendar-day',
73
+ !day.inMonth && 'mw-calendar-adjacent',
74
+ day.weekend && 'mw-calendar-weekend',
75
+ day.today && 'mw-calendar-today',
76
+ ]
77
+ .filter(Boolean)
78
+ .join(' ');
79
+ const Element = disabled ? 'button' : href ? 'a' : 'div';
80
+ return (
81
+ <Element
82
+ type={disabled ? 'button' : undefined}
83
+ class={className}
84
+ data-day={day.iso}
85
+ href={disabled ? undefined : href}
86
+ aria-label={label ?? fullDate(day.iso, locale)}
87
+ disabled={disabled || undefined}
88
+ >
89
+ <span class="mw-calendar-date">{day.day}</span>
90
+ {dots.length > 0 && (
91
+ <span class="mw-calendar-dots">
92
+ {dots.map(dot => (
93
+ <span class:list={['mw-calendar-dot', dot]} />
94
+ ))}
95
+ </span>
96
+ )}
97
+ </Element>
98
+ );
99
+ })
100
+ }
101
+ </div>
102
+
103
+ {legend && <CalendarLegend items={legend} inline />}
104
+ </div>
@@ -0,0 +1,34 @@
1
+ ---
2
+ // Legend of the calendar dots. Standing on its own it needs a calendar box
3
+ // around it, otherwise the framework rules do not apply - "plain" only takes
4
+ // the surface away.
5
+ interface Props {
6
+ items: readonly { dot?: string; label: string }[];
7
+ // Inside a Calendar: no box of its own.
8
+ inline?: boolean;
9
+ class?: string;
10
+ }
11
+
12
+ const { items, inline = false, class: className } = Astro.props;
13
+ const Box = inline ? Fragment : 'div';
14
+ const box = inline
15
+ ? {}
16
+ : {
17
+ class: ['mw-calendar mw-calendar-plain mw-corner-plain', className]
18
+ .filter(Boolean)
19
+ .join(' '),
20
+ };
21
+ ---
22
+
23
+ <Box {...box}>
24
+ <div class="mw-calendar-legend">
25
+ {
26
+ items.map(item => (
27
+ <span class="mw-calendar-legend-item">
28
+ <span class:list={['mw-calendar-dot', item.dot]} />
29
+ {item.label}
30
+ </span>
31
+ ))
32
+ }
33
+ </div>
34
+ </Box>
@@ -0,0 +1,21 @@
1
+ ---
2
+ // A placeholder for something not built yet. Loud on purpose, so it does not
3
+ // go live by accident.
4
+ interface Props {
5
+ text: string;
6
+ class?: string;
7
+ }
8
+
9
+ const { text, class: className } = Astro.props;
10
+ ---
11
+
12
+ <div class:list={['mw-coming-soon', className]}>
13
+ {
14
+ Astro.slots.has('icon') && (
15
+ <span class="mw-coming-soon-icon">
16
+ <slot name="icon" />
17
+ </span>
18
+ )
19
+ }
20
+ <div class="mw-coming-soon-text">{text}</div>
21
+ </div>
@@ -0,0 +1,24 @@
1
+ ---
2
+ // Weekday above, date below - the stamp in front of an mw-date-stamp-body.
3
+ // "today" is set by the build and moved along by Schedule via data-day.
4
+ import { dateStamp, isoDate, parseIsoDate } from '../dist/date.js';
5
+
6
+ interface Props {
7
+ // YYYY-MM-DD
8
+ date: string;
9
+ locale?: string;
10
+ class?: string;
11
+ }
12
+
13
+ const { date, locale = 'de-DE', class: className } = Astro.props;
14
+ const stamp = dateStamp(parseIsoDate(date), locale);
15
+ const today = stamp.iso === isoDate(new Date());
16
+ ---
17
+
18
+ <p
19
+ class:list={['mw-date-stamp', today && 'mw-date-stamp-today', className]}
20
+ data-day={stamp.iso}
21
+ >
22
+ <span class="mw-date-stamp-day">{stamp.weekday}</span>
23
+ <time class="mw-date-stamp-date" datetime={stamp.iso}>{stamp.short}</time>
24
+ </p>
@@ -0,0 +1,24 @@
1
+ ---
2
+ // When there is nothing to show: no events left, page not found. The icon and
3
+ // the button come as slots.
4
+ interface Props {
5
+ title?: string;
6
+ text: string;
7
+ primary?: boolean;
8
+ }
9
+
10
+ const { title, text, primary = false } = Astro.props;
11
+ ---
12
+
13
+ <div class:list={['mw-empty-state', primary && 'mw-empty-state-primary']}>
14
+ {
15
+ Astro.slots.has('icon') && (
16
+ <div class="mw-empty-state-icon">
17
+ <slot name="icon" />
18
+ </div>
19
+ )
20
+ }
21
+ {title && <p class="mw-empty-state-title">{title}</p>}
22
+ <p class="mw-empty-state-desc">{text}</p>
23
+ <slot />
24
+ </div>
@@ -0,0 +1,42 @@
1
+ ---
2
+ import config from 'virtual:maverick-wave-astro/config';
3
+
4
+ import { withBase } from '../dist/path.js';
5
+
6
+ const { site } = config;
7
+ ---
8
+
9
+ {
10
+ site.favicons === 'svg' ? (
11
+ <link rel="icon" href={withBase('/favicon.svg')} type="image/svg+xml" />
12
+ ) : (
13
+ <Fragment>
14
+ <link
15
+ rel="icon"
16
+ type="image/x-icon"
17
+ href={withBase('/favicon.ico')}
18
+ sizes="32x32"
19
+ />
20
+ <link
21
+ rel="icon"
22
+ type="image/png"
23
+ sizes="96x96"
24
+ href={withBase('/favicon/favicon-96x96.png')}
25
+ />
26
+ {site.hasSvgFavicon && (
27
+ <link
28
+ rel="icon"
29
+ type="image/svg+xml"
30
+ href={withBase('/favicon/favicon.svg')}
31
+ />
32
+ )}
33
+ <link
34
+ rel="apple-touch-icon"
35
+ sizes="180x180"
36
+ href={withBase('/favicon/apple-touch-icon.png')}
37
+ />
38
+ <link rel="manifest" href={withBase('/favicon/site.webmanifest')} />
39
+ </Fragment>
40
+ )
41
+ }
42
+ <meta name="theme-color" content={site.themeColor} />
@@ -0,0 +1,85 @@
1
+ ---
2
+ // Photos in the grid everyone knows from their phone, in a box that scrolls.
3
+ // Each tile opens its post as a popover - the browser does that, no script.
4
+ import { config } from '../dist/config.js';
5
+ import { longDate, parseIsoDate } from '../dist/date.js';
6
+ import { publicImage } from '../dist/image-size.js';
7
+
8
+ interface Props {
9
+ posts: readonly {
10
+ // Unique on the page, it connects tile and post.
11
+ id: string;
12
+ // From public/
13
+ src: string;
14
+ alt: string;
15
+ text?: string;
16
+ // YYYY-MM-DD
17
+ date?: string;
18
+ }[];
19
+ rows?: 2 | 3;
20
+ // Square tiles instead of upright ones.
21
+ square?: boolean;
22
+ // Without the frame around the grid.
23
+ plain?: boolean;
24
+ closeLabel?: string;
25
+ locale?: string;
26
+ class?: string;
27
+ }
28
+
29
+ const german = config.site.lang.startsWith('de');
30
+
31
+ const {
32
+ posts,
33
+ rows = 3,
34
+ square = false,
35
+ plain = false,
36
+ closeLabel = german ? 'Schließen' : 'Close',
37
+ locale = 'de-DE',
38
+ class: className,
39
+ } = Astro.props;
40
+ ---
41
+
42
+ <div
43
+ class:list={[
44
+ 'mw-feed',
45
+ rows === 2 && 'mw-feed-rows-2',
46
+ square && 'mw-feed-square',
47
+ plain && 'mw-feed-plain',
48
+ className,
49
+ ]}
50
+ >
51
+ {
52
+ posts.map(post => {
53
+ const image = publicImage(post.src);
54
+ return (
55
+ <div class="mw-feed-item">
56
+ <button type="button" popovertarget={post.id}>
57
+ <img {...image} alt={post.alt} loading="lazy" decoding="async" />
58
+ </button>
59
+ <figure class="mw-feed-post" id={post.id} popover>
60
+ <button
61
+ type="button"
62
+ class="mw-overlay-btn mw-feed-post-close"
63
+ popovertarget={post.id}
64
+ popovertargetaction="hide"
65
+ aria-label={closeLabel}
66
+ >
67
+ &#120299;
68
+ </button>
69
+ <img {...image} alt={post.alt} loading="lazy" decoding="async" />
70
+ {(post.text || post.date) && (
71
+ <figcaption>
72
+ {post.text && <p>{post.text}</p>}
73
+ {post.date && (
74
+ <time datetime={post.date}>
75
+ {longDate(parseIsoDate(post.date), locale)}
76
+ </time>
77
+ )}
78
+ </figcaption>
79
+ )}
80
+ </figure>
81
+ </div>
82
+ );
83
+ })
84
+ }
85
+ </div>
@@ -0,0 +1,162 @@
1
+ ---
2
+ // Footer of every site: social links, notes, what it is built with, legal
3
+ // links and the copyright line. Texts come from the site, in its language.
4
+ import { withBase } from '../dist/path.js';
5
+ import SocialLinks, { type SocialLink } from './SocialLinks.astro';
6
+
7
+ interface Props {
8
+ social?: readonly SocialLink[];
9
+ notes?: readonly { title: string; text: string }[];
10
+ // "{prefix} Astro {joiner} MaverickWave{suffix}"
11
+ builtWith?: {
12
+ title: string;
13
+ prefix?: string;
14
+ joiner: string;
15
+ suffix?: string;
16
+ };
17
+ legal?: {
18
+ title: string;
19
+ imprint: string;
20
+ // Without a privacy label only the imprint is linked.
21
+ privacy?: string;
22
+ // Targets outside the site, e.g. the imprint on formatwerke.de.
23
+ imprintHref?: string;
24
+ privacyHref?: string;
25
+ hreflang?: string;
26
+ };
27
+ owner: string;
28
+ ownerHref?: string;
29
+ // "umgesetzt von" - without it the link to formatwerke is left out.
30
+ credit?: string;
31
+ lastUpdated?: { label: string; date: string };
32
+ class?: string;
33
+ }
34
+
35
+ const {
36
+ social = [],
37
+ notes = [],
38
+ builtWith,
39
+ legal,
40
+ owner,
41
+ ownerHref,
42
+ credit,
43
+ lastUpdated,
44
+ class: className,
45
+ } = Astro.props;
46
+ ---
47
+
48
+ <footer class="mw-footer">
49
+ <div class:list={['mw-container', className]}>
50
+ {social.length > 0 && <SocialLinks links={social} />}
51
+
52
+ {
53
+ notes.map(note => (
54
+ <p class="mw-disclaimer">
55
+ <strong>{note.title}</strong>
56
+ <br />
57
+ {note.text}
58
+ </p>
59
+ ))
60
+ }
61
+
62
+ <slot name="notes" />
63
+
64
+ {
65
+ builtWith && (
66
+ <p class="mw-disclaimer">
67
+ <strong>{builtWith.title}</strong>
68
+ <br />
69
+ {builtWith.prefix && <>{builtWith.prefix} </>}
70
+ <a
71
+ href="https://astro.build"
72
+ target="_blank"
73
+ rel="noopener noreferrer"
74
+ class="mw-link"
75
+ >
76
+ Astro
77
+ </a>{' '}
78
+ {builtWith.joiner}{' '}
79
+ <a
80
+ href="https://maverick-wave.m1well.com"
81
+ target="_blank"
82
+ rel="noopener noreferrer"
83
+ class="mw-link"
84
+ >
85
+ MaverickWave
86
+ </a>
87
+ {builtWith.suffix ?? '.'}
88
+ </p>
89
+ )
90
+ }
91
+
92
+ <slot name="credits" />
93
+
94
+ {
95
+ legal && (
96
+ <p class="mw-disclaimer">
97
+ <strong>{legal.title}</strong>
98
+ <br />
99
+ <a
100
+ href={legal.imprintHref ?? withBase('/impressum')}
101
+ class="mw-link"
102
+ hreflang={legal.hreflang}
103
+ >
104
+ {legal.imprint}
105
+ </a>
106
+ {legal.privacy && (
107
+ <>
108
+ <span class="mw-mx-3 mw-text-muted">&middot;</span>
109
+ <a
110
+ href={legal.privacyHref ?? withBase('/datenschutz')}
111
+ class="mw-link"
112
+ hreflang={legal.hreflang}
113
+ >
114
+ {legal.privacy}
115
+ </a>
116
+ </>
117
+ )}
118
+ </p>
119
+ )
120
+ }
121
+
122
+ <p class="mw-copyright">
123
+ &copy; <span>{new Date().getFullYear()}</span>{' '}{
124
+ ownerHref ? (
125
+ <a
126
+ href={ownerHref}
127
+ target="_blank"
128
+ rel="noopener noreferrer"
129
+ class="mw-link"
130
+ >
131
+ {owner}
132
+ </a>
133
+ ) : (
134
+ owner
135
+ )
136
+ }{
137
+ credit && (
138
+ <>
139
+ {' '}
140
+ &middot; {credit}{' '}
141
+ <a
142
+ href="https://formatwerke.de"
143
+ target="_blank"
144
+ rel="noopener noreferrer"
145
+ class="mw-link"
146
+ >
147
+ formatwerke
148
+ </a>
149
+ </>
150
+ )
151
+ }
152
+ </p>
153
+
154
+ {
155
+ lastUpdated && (
156
+ <p class="mw-last-updated">
157
+ {lastUpdated.label}: <span>{lastUpdated.date}</span>
158
+ </p>
159
+ )
160
+ }
161
+ </div>
162
+ </footer>
@@ -0,0 +1,55 @@
1
+ ---
2
+ // A photo slider: swipe, arrows, dots and the caption of the current slide.
3
+ // The MaverickWave script builds the dots and moves the track - without it the
4
+ // first photo stays.
5
+ import { config } from '../dist/config.js';
6
+ import { publicImage } from '../dist/image-size.js';
7
+
8
+ interface Props {
9
+ // src from public/
10
+ slides: readonly { src: string; alt: string; caption?: string }[];
11
+ prevLabel?: string;
12
+ nextLabel?: string;
13
+ class?: string;
14
+ }
15
+
16
+ const german = config.site.lang.startsWith('de');
17
+
18
+ const {
19
+ slides,
20
+ prevLabel = german ? 'Vorheriges Bild' : 'Previous image',
21
+ nextLabel = german ? 'Nächstes Bild' : 'Next image',
22
+ class: className,
23
+ } = Astro.props;
24
+ ---
25
+
26
+ <div class:list={['mw-gallery-container', className]}>
27
+ <div class="mw-gallery">
28
+ <button
29
+ type="button"
30
+ class="mw-gallery-navi mw-gallery-navi-prev"
31
+ aria-label={prevLabel}>&#10094;</button
32
+ >
33
+ <div class="mw-gallery-track">
34
+ {
35
+ slides.map((slide, index) => (
36
+ <div class="mw-gallery-slide" data-desc={slide.caption}>
37
+ <img
38
+ {...publicImage(slide.src)}
39
+ alt={slide.alt}
40
+ loading={index === 0 ? undefined : 'lazy'}
41
+ decoding="async"
42
+ />
43
+ </div>
44
+ ))
45
+ }
46
+ </div>
47
+ <button
48
+ type="button"
49
+ class="mw-gallery-navi mw-gallery-navi-next"
50
+ aria-label={nextLabel}>&#10095;</button
51
+ >
52
+ </div>
53
+ <div class="mw-gallery-desc">{slides[0]?.caption}</div>
54
+ <div class="mw-gallery-dots"></div>
55
+ </div>
@@ -0,0 +1,107 @@
1
+ ---
2
+ // Fixed header: brand on the left, navigation to the sections, on subpages a
3
+ // button back to the start page instead. The brand and everything next to the
4
+ // navigation (theme toggle, language, login) come from the site as slots.
5
+ import { config, headerReveals } from '../dist/config.js';
6
+ import { withBase } from '../dist/path.js';
7
+
8
+ interface Props {
9
+ navigation?: readonly { label: string; href: string; active?: boolean }[];
10
+ navSize?: 'medium' | 'large';
11
+ navLabel?: string;
12
+ menuLabel?: string;
13
+ backOnly?: boolean;
14
+ backLabel?: string;
15
+ backHref?: string;
16
+ backClass?: string;
17
+ // Slides the header in after the first screen - only useful above a hero.
18
+ // design.header "sticky" switches this off site-wide.
19
+ reveal?: boolean;
20
+ class?: string;
21
+ }
22
+
23
+ const german = config.site.lang.startsWith('de');
24
+
25
+ const {
26
+ navigation = [],
27
+ navSize,
28
+ navLabel = german ? 'Bereiche dieser Seite' : 'Sections of this page',
29
+ menuLabel = german ? 'Menü' : 'Menu',
30
+ backOnly = false,
31
+ backLabel = german ? 'Zur Startseite' : 'Back to the start page',
32
+ backHref = withBase('/'),
33
+ backClass,
34
+ reveal = false,
35
+ class: className,
36
+ } = Astro.props;
37
+
38
+ const withNavigation = !backOnly && navigation.length > 0;
39
+ ---
40
+
41
+ <header
42
+ class:list={[
43
+ 'mw-header',
44
+ className,
45
+ reveal && headerReveals() && 'mw-header-reveal',
46
+ ]}
47
+ >
48
+ <div class="mw-container">
49
+ <div class="mw-logo">
50
+ <slot name="brand" />
51
+ </div>
52
+
53
+ <div class="mw-header-actions">
54
+ {
55
+ withNavigation && (
56
+ <nav
57
+ id="main-navigation"
58
+ class:list={['mw-navbar', navSize && `mw-navbar-${navSize}`]}
59
+ aria-label={navLabel}
60
+ >
61
+ <ul class="mw-navbar-list">
62
+ {navigation.map(item => (
63
+ <li class="mw-navbar-item">
64
+ <a
65
+ href={item.href}
66
+ class:list={['mw-navbar-link', item.active && 'mw-active']}
67
+ >
68
+ {item.label}
69
+ </a>
70
+ </li>
71
+ ))}
72
+ </ul>
73
+ </nav>
74
+ )
75
+ }
76
+
77
+ <slot name="actions" />
78
+
79
+ {
80
+ backOnly && (
81
+ <a
82
+ class:list={['mw-btn mw-btn-primary mw-btn-sm', backClass]}
83
+ href={backHref}
84
+ >
85
+ {backLabel}
86
+ </a>
87
+ )
88
+ }
89
+
90
+ <slot name="end" />
91
+
92
+ {
93
+ withNavigation && (
94
+ <button
95
+ type="button"
96
+ class="mw-menu-btn mw-header-keep"
97
+ aria-label={menuLabel}
98
+ aria-controls="main-navigation"
99
+ aria-expanded="false"
100
+ >
101
+ <span class="mw-menu-btn-burger" />
102
+ </button>
103
+ )
104
+ }
105
+ </div>
106
+ </div>
107
+ </header>