sproutsite 0.0.0-stage → 0.5.7
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/LICENSE +202 -0
- package/NOTICE +14 -0
- package/README.md +604 -2
- package/THIRD_PARTY_NOTICES.md +85 -0
- package/VERSION +1 -0
- package/package.json +107 -5
- package/src/lib/sproutsite/colors.ts +7 -0
- package/src/lib/sproutsite/language-links.ts +60 -0
- package/src/lib/sproutsite/pages.ts +78 -0
- package/src/lib/sproutsite/rehype-ids.ts +20 -0
- package/src/lib/sproutsite/rehype-links.ts +19 -0
- package/src/lib/sproutsite/rehype-tables.ts +74 -0
- package/src/lib/sproutsite/remark-links.ts +19 -0
- package/src/lib/sproutsite/site-config.ts +110 -0
- package/src/lib/sproutsite/sitemap.ts +160 -0
- package/src/lib/sproutsite/types.ts +45 -0
- package/src/lib/sproutsite/urls.ts +79 -0
- package/src/lib/sproutsite/validation.ts +1406 -0
- package/src/package/404.astro +5 -0
- package/src/package/500.astro +5 -0
- package/src/package/components.ts +17 -0
- package/src/package/config.ts +161 -0
- package/src/package/content.ts +117 -0
- package/src/package/index.ts +3 -0
- package/src/package/manifest.ts +27 -0
- package/src/package/page.astro +124 -0
- package/src/themes/default/assets/branding/apple-touch-icon.png +0 -0
- package/src/themes/default/assets/branding/favicon-16x16.png +0 -0
- package/src/themes/default/assets/branding/favicon-32x32.png +0 -0
- package/src/themes/default/assets/branding/favicon-48x48.png +0 -0
- package/src/themes/default/assets/branding/favicon.ico +0 -0
- package/src/themes/default/assets/branding/favicon.svg +1 -0
- package/src/themes/default/assets/branding/icon-192x192.png +0 -0
- package/src/themes/default/assets/branding/icon-512x512.png +0 -0
- package/src/themes/default/assets/branding/icon-monochrome.svg +1 -0
- package/src/themes/default/assets/branding/icon.svg +18 -0
- package/src/themes/default/assets/branding/logo-dark.svg +18 -0
- package/src/themes/default/assets/branding/logo-monochrome.svg +1 -0
- package/src/themes/default/assets/branding/logo.svg +18 -0
- package/src/themes/default/assets/branding/social-card.png +0 -0
- package/src/themes/default/assets/hero-waves.svg +41 -0
- package/src/themes/default/components/atoms/Badge/Badge.astro +65 -0
- package/src/themes/default/components/atoms/Badge/Badge.css +5 -0
- package/src/themes/default/components/atoms/BrandLogo/BrandLogo.astro +26 -0
- package/src/themes/default/components/atoms/BrandLogo/BrandLogo.css +22 -0
- package/src/themes/default/components/atoms/Button/Button.astro +106 -0
- package/src/themes/default/components/atoms/Button/Button.css +14 -0
- package/src/themes/default/components/atoms/ContentImage/ContentImage.astro +54 -0
- package/src/themes/default/components/atoms/ContentImage/ContentImage.css +21 -0
- package/src/themes/default/components/atoms/Eyebrow/Eyebrow.astro +3 -0
- package/src/themes/default/components/atoms/Eyebrow/Eyebrow.css +18 -0
- package/src/themes/default/components/atoms/Icon/Icon.astro +80 -0
- package/src/themes/default/components/atoms/Icon/Icon.css +68 -0
- package/src/themes/default/components/atoms/Tab/Tab.astro +15 -0
- package/src/themes/default/components/atoms/Tab/Tab.css +34 -0
- package/src/themes/default/components/layout/Column/Column.astro +18 -0
- package/src/themes/default/components/layout/Column/Column.css +82 -0
- package/src/themes/default/components/layout/Columns/Columns.astro +163 -0
- package/src/themes/default/components/layout/Columns/Columns.css +177 -0
- package/src/themes/default/components/molecules/Accordion/Accordion.astro +17 -0
- package/src/themes/default/components/molecules/Accordion/Accordion.css +11 -0
- package/src/themes/default/components/molecules/Accordion/accordion.ts +47 -0
- package/src/themes/default/components/molecules/AccordionItem/AccordionItem.astro +100 -0
- package/src/themes/default/components/molecules/AccordionItem/AccordionItem.css +118 -0
- package/src/themes/default/components/molecules/Alert/Alert.astro +42 -0
- package/src/themes/default/components/molecules/Alert/Alert.css +13 -0
- package/src/themes/default/components/molecules/Card/Card.astro +57 -0
- package/src/themes/default/components/molecules/Card/Card.css +25 -0
- package/src/themes/default/components/molecules/CardActions/CardActions.astro +3 -0
- package/src/themes/default/components/molecules/CardActions/CardActions.css +13 -0
- package/src/themes/default/components/molecules/ContentTable/ContentTable.astro +42 -0
- package/src/themes/default/components/molecules/ContentTable/ContentTable.css +59 -0
- package/src/themes/default/components/molecules/Feature/Feature.astro +108 -0
- package/src/themes/default/components/molecules/Feature/Feature.css +157 -0
- package/src/themes/default/components/molecules/FoundationSample/FoundationSample.astro +165 -0
- package/src/themes/default/components/molecules/FoundationSample/FoundationSample.css +201 -0
- package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.astro +118 -0
- package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.css +134 -0
- package/src/themes/default/components/molecules/Tabs/Tabs.astro +33 -0
- package/src/themes/default/components/molecules/Tabs/Tabs.css +38 -0
- package/src/themes/default/components/molecules/Tabs/tabs.ts +91 -0
- package/src/themes/default/components/organisms/BlogIndex/BlogIndex.astro +86 -0
- package/src/themes/default/components/organisms/BlogIndex/BlogIndex.css +17 -0
- package/src/themes/default/components/organisms/BlogPost/BlogPost.astro +51 -0
- package/src/themes/default/components/organisms/BlogPost/BlogPost.css +5 -0
- package/src/themes/default/components/organisms/Footer/Footer.astro +57 -0
- package/src/themes/default/components/organisms/Footer/Footer.css +63 -0
- package/src/themes/default/components/organisms/Header/Header.astro +223 -0
- package/src/themes/default/components/organisms/Header/Header.css +282 -0
- package/src/themes/default/components/organisms/Hero/Hero.astro +106 -0
- package/src/themes/default/components/organisms/Hero/Hero.css +187 -0
- package/src/themes/default/components/organisms/PageTitle/PageTitle.astro +39 -0
- package/src/themes/default/components/organisms/PageTitle/PageTitle.css +25 -0
- package/src/themes/default/components/organisms/Section/Section.astro +39 -0
- package/src/themes/default/components/organisms/Section/Section.css +21 -0
- package/src/themes/default/i18n/de.yaml +38 -0
- package/src/themes/default/i18n/en.yaml +38 -0
- package/src/themes/default/i18n/index.ts +63 -0
- package/src/themes/default/layouts/ErrorPage/ErrorPage.astro +110 -0
- package/src/themes/default/layouts/PageLayout/PageLayout.astro +108 -0
- package/src/themes/default/layouts/PageLayout/PageLayout.css +15 -0
- package/src/themes/default/styles/foundation/base.css +19 -0
- package/src/themes/default/styles/foundation/focus.css +6 -0
- package/src/themes/default/styles/foundation/fonts/OFL.txt +93 -0
- package/src/themes/default/styles/foundation/fonts/nunito-latin-variable.woff2 +0 -0
- package/src/themes/default/styles/foundation/fonts.css +17 -0
- package/src/themes/default/styles/foundation/layout.css +6 -0
- package/src/themes/default/styles/foundation/prose.css +54 -0
- package/src/themes/default/styles/foundation/tokens.css +48 -0
- package/src/themes/default/styles/theme.css +99 -0
- package/src/themes/default/styles/themes/section-tones.css +30 -0
- package/third-party-licenses/daisyui-LICENSE +21 -0
- package/third-party-licenses/flag-icons-LICENSE +21 -0
- package/third-party-licenses/lucide-LICENSE +43 -0
- package/third-party-licenses/tailwindcss-LICENSE +21 -0
- package/third-party-licenses/tailwindcss-typography-LICENSE +21 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ss-header {
|
|
3
|
+
--ss-header-active-underline: var(--color-hero-cyan);
|
|
4
|
+
--ss-header-cta-outline: var(--color-primary-content);
|
|
5
|
+
--ss-header-dropdown-bg: var(--color-hero-navy);
|
|
6
|
+
--ss-header-dropdown-border: color-mix(
|
|
7
|
+
in srgb,
|
|
8
|
+
currentColor 35%,
|
|
9
|
+
transparent
|
|
10
|
+
);
|
|
11
|
+
@apply absolute inset-x-0 top-0 z-40 border-b border-transparent bg-transparent text-primary-content transition-[background-color,border-color,box-shadow,backdrop-filter] duration-200;
|
|
12
|
+
|
|
13
|
+
.ss-header__inner {
|
|
14
|
+
@apply flex flex-wrap items-center justify-between gap-x-8 gap-y-3 py-[2.1875rem] transition-[padding] duration-200;
|
|
15
|
+
|
|
16
|
+
.ss-header__brand {
|
|
17
|
+
@apply inline-flex items-center gap-3 text-lg font-bold text-primary-content no-underline hover:no-underline;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ss-header__link,
|
|
21
|
+
.ss-header__cta .ss-button {
|
|
22
|
+
min-height: 2.75rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ss-header__links {
|
|
27
|
+
@apply flex flex-wrap items-center gap-x-2 gap-y-1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ss-header__separator {
|
|
31
|
+
@apply mx-2 h-5 w-px shrink-0;
|
|
32
|
+
background-color: currentColor;
|
|
33
|
+
opacity: 0.4;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ss-header__cta {
|
|
37
|
+
.ss-button {
|
|
38
|
+
@apply m-0 !text-lg no-underline hover:no-underline;
|
|
39
|
+
|
|
40
|
+
&[aria-current='page'] {
|
|
41
|
+
@apply outline-2 outline-offset-2;
|
|
42
|
+
outline-color: var(--ss-header-cta-outline);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ss-header__link {
|
|
48
|
+
@apply relative !gap-2.5 !text-lg !text-primary-content no-underline hover:no-underline;
|
|
49
|
+
border-color: transparent !important;
|
|
50
|
+
box-shadow: none !important;
|
|
51
|
+
|
|
52
|
+
.ss-icon {
|
|
53
|
+
display: block;
|
|
54
|
+
align-self: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
--btn-bg: color-mix(
|
|
59
|
+
in srgb,
|
|
60
|
+
currentColor 10%,
|
|
61
|
+
transparent
|
|
62
|
+
) !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&[aria-current='page'] {
|
|
66
|
+
--btn-bg: transparent !important;
|
|
67
|
+
--btn-border: transparent !important;
|
|
68
|
+
@apply font-bold;
|
|
69
|
+
|
|
70
|
+
&::after {
|
|
71
|
+
content: '';
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset-inline: 0.75rem;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
height: 2px;
|
|
76
|
+
border-radius: 999px;
|
|
77
|
+
background-color: var(--ss-header-active-underline);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
&.ss-header--scrolled {
|
|
82
|
+
--ss-header-active-underline: currentColor;
|
|
83
|
+
--ss-header-cta-outline: var(--color-base-content);
|
|
84
|
+
--ss-header-dropdown-bg: var(--color-base-100);
|
|
85
|
+
--ss-header-dropdown-border: var(--color-base-300);
|
|
86
|
+
--ss-brand-highlight: var(--color-primary);
|
|
87
|
+
@apply fixed border-base-300 bg-base-100/40 text-base-content shadow-sm backdrop-blur-md;
|
|
88
|
+
|
|
89
|
+
.ss-header__inner {
|
|
90
|
+
@apply py-5;
|
|
91
|
+
|
|
92
|
+
.ss-header__brand,
|
|
93
|
+
.ss-header__link {
|
|
94
|
+
@apply !text-base-content;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ss-header__brand {
|
|
98
|
+
color: var(--color-brand-navy) !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ss-header__mobile-tools {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ss-header__menu-toggle,
|
|
108
|
+
.ss-header__dialog-close {
|
|
109
|
+
display: grid;
|
|
110
|
+
place-items: center;
|
|
111
|
+
width: 2.75rem;
|
|
112
|
+
height: 2.75rem;
|
|
113
|
+
flex-shrink: 0;
|
|
114
|
+
padding: 0.25rem;
|
|
115
|
+
border: 0;
|
|
116
|
+
border-radius: 0.5rem;
|
|
117
|
+
color: inherit;
|
|
118
|
+
background: transparent;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
background: color-mix(in srgb, currentColor 10%, transparent);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ss-header__dialog {
|
|
127
|
+
--ss-brand-highlight: var(--color-hero-cyan);
|
|
128
|
+
--ss-header-active-underline: var(--color-hero-cyan);
|
|
129
|
+
--ss-header-cta-outline: var(--color-primary-content);
|
|
130
|
+
--ss-header-dropdown-bg: var(--color-hero-navy);
|
|
131
|
+
--ss-header-dropdown-border: color-mix(
|
|
132
|
+
in srgb,
|
|
133
|
+
currentColor 35%,
|
|
134
|
+
transparent
|
|
135
|
+
);
|
|
136
|
+
position: fixed;
|
|
137
|
+
inset: 0;
|
|
138
|
+
width: 100%;
|
|
139
|
+
max-width: none;
|
|
140
|
+
height: 100dvh;
|
|
141
|
+
max-height: none;
|
|
142
|
+
margin: 0;
|
|
143
|
+
padding: 0;
|
|
144
|
+
border: 0;
|
|
145
|
+
color: var(--color-primary-content);
|
|
146
|
+
background: linear-gradient(
|
|
147
|
+
145deg,
|
|
148
|
+
var(--color-hero-midnight),
|
|
149
|
+
var(--color-hero-navy) 65%
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
&:not([open]) {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
&[open] {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
}
|
|
159
|
+
&::backdrop {
|
|
160
|
+
background: var(--color-hero-navy);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ss-header__dialog-top {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: space-between;
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
gap: 1rem;
|
|
169
|
+
padding-block: 1.25rem;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ss-header__dialog-brand {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
color: inherit;
|
|
175
|
+
text-decoration: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ss-header__dialog-content {
|
|
179
|
+
flex: 1;
|
|
180
|
+
min-height: 0;
|
|
181
|
+
overflow-y: auto;
|
|
182
|
+
overscroll-behavior: contain;
|
|
183
|
+
padding-block: 1.5rem 2rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ss-header__links {
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
flex-wrap: nowrap;
|
|
189
|
+
align-items: stretch;
|
|
190
|
+
gap: 1rem;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ss-header__link {
|
|
194
|
+
justify-content: flex-start !important;
|
|
195
|
+
width: fit-content;
|
|
196
|
+
max-width: 100%;
|
|
197
|
+
height: auto;
|
|
198
|
+
min-height: 2.75rem;
|
|
199
|
+
padding: 0.25rem 0 !important;
|
|
200
|
+
border: 0;
|
|
201
|
+
border-radius: 0;
|
|
202
|
+
font-size: 1.5rem !important;
|
|
203
|
+
font-weight: 500 !important;
|
|
204
|
+
line-height: 1.35;
|
|
205
|
+
text-align: start;
|
|
206
|
+
white-space: normal;
|
|
207
|
+
|
|
208
|
+
&[aria-current='page'] {
|
|
209
|
+
font-weight: 700 !important;
|
|
210
|
+
|
|
211
|
+
&::after {
|
|
212
|
+
inset-inline: 0;
|
|
213
|
+
bottom: -2px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.ss-header__separator {
|
|
219
|
+
width: 100%;
|
|
220
|
+
height: 1px;
|
|
221
|
+
margin: 0.75rem 0 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ss-header__cta {
|
|
225
|
+
margin-top: 0.75rem;
|
|
226
|
+
.ss-button {
|
|
227
|
+
width: 100% !important;
|
|
228
|
+
min-height: 3rem;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media (max-width: 71.999rem) {
|
|
234
|
+
&[data-mobile-enhanced] {
|
|
235
|
+
.ss-header__inner {
|
|
236
|
+
flex-wrap: nowrap;
|
|
237
|
+
gap: 0.5rem;
|
|
238
|
+
padding-block: 1.25rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.ss-header__mobile-tools {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 0.25rem;
|
|
245
|
+
margin-inline-start: auto;
|
|
246
|
+
|
|
247
|
+
.ss-language-switcher {
|
|
248
|
+
font-size: 1rem;
|
|
249
|
+
}
|
|
250
|
+
.ss-language-switcher > summary {
|
|
251
|
+
gap: 0.375rem;
|
|
252
|
+
padding-inline: 0.5rem;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ss-header__mobile-divider {
|
|
257
|
+
width: 1px;
|
|
258
|
+
height: 1.5rem;
|
|
259
|
+
margin-inline: 0.25rem;
|
|
260
|
+
background: currentColor;
|
|
261
|
+
opacity: 0.35;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ss-brand-logo {
|
|
265
|
+
font-size: 1.25rem;
|
|
266
|
+
gap: 0.5rem;
|
|
267
|
+
}
|
|
268
|
+
.ss-brand-logo img {
|
|
269
|
+
width: 2rem;
|
|
270
|
+
height: 2rem;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@media (prefers-reduced-motion: reduce) {
|
|
277
|
+
.ss-header,
|
|
278
|
+
.ss-header .ss-header__inner {
|
|
279
|
+
@apply transition-none;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { CollectionEntry } from 'astro:content';
|
|
3
|
+
import { Image } from 'astro:assets';
|
|
4
|
+
import { toneOf } from '../../../../../lib/sproutsite/pages.js';
|
|
5
|
+
import type { SiteConfig } from '../../../../../lib/sproutsite/types.js';
|
|
6
|
+
import Button from '../../atoms/Button/Button.astro';
|
|
7
|
+
import Eyebrow from '../../atoms/Eyebrow/Eyebrow.astro';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
hero: Pick<CollectionEntry<'documents' | 'blogDocuments'>, 'id' | 'data'>;
|
|
11
|
+
site: SiteConfig;
|
|
12
|
+
Content?: Awaited<
|
|
13
|
+
ReturnType<typeof import('astro:content').render>
|
|
14
|
+
>['Content'];
|
|
15
|
+
}
|
|
16
|
+
const { hero, site, Content } = Astro.props;
|
|
17
|
+
const toneClass = {
|
|
18
|
+
default: 'tone-default',
|
|
19
|
+
muted: 'tone-muted',
|
|
20
|
+
brand: 'tone-brand',
|
|
21
|
+
}[toneOf(hero)];
|
|
22
|
+
const heroClasses =
|
|
23
|
+
hero.data.classes === undefined
|
|
24
|
+
? site.heroClasses
|
|
25
|
+
: (hero.data.classes ?? []);
|
|
26
|
+
const backgroundImage = hero.data['background-image'];
|
|
27
|
+
const heroTitle = hero.data.title;
|
|
28
|
+
if (!heroTitle) throw new Error('Sproutsite Hero requires a title.');
|
|
29
|
+
const titleHighlight = hero.data.titleHighlight;
|
|
30
|
+
const titleLines = heroTitle.split('\n').map((line) => {
|
|
31
|
+
const highlightStart = titleHighlight ? line.indexOf(titleHighlight) : -1;
|
|
32
|
+
const hasHighlight = highlightStart >= 0 && titleHighlight !== undefined;
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
before: hasHighlight ? line.slice(0, highlightStart) : line,
|
|
36
|
+
highlighted: hasHighlight ? titleHighlight : undefined,
|
|
37
|
+
after: hasHighlight
|
|
38
|
+
? line.slice(highlightStart + titleHighlight.length)
|
|
39
|
+
: undefined,
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
<section
|
|
45
|
+
class:list={[
|
|
46
|
+
toneClass,
|
|
47
|
+
'ss-hero',
|
|
48
|
+
`ss-hero--${hero.data.type ?? 'small'}`,
|
|
49
|
+
{ 'ss-hero--has-background-image': Boolean(backgroundImage) },
|
|
50
|
+
...heroClasses,
|
|
51
|
+
]}
|
|
52
|
+
aria-labelledby="page-title"
|
|
53
|
+
>
|
|
54
|
+
{backgroundImage && (
|
|
55
|
+
<Image
|
|
56
|
+
class="ss-hero__background"
|
|
57
|
+
src={backgroundImage}
|
|
58
|
+
alt=""
|
|
59
|
+
format="webp"
|
|
60
|
+
quality={82}
|
|
61
|
+
loading="eager"
|
|
62
|
+
decoding="async"
|
|
63
|
+
aria-hidden="true"
|
|
64
|
+
/>
|
|
65
|
+
)}
|
|
66
|
+
<div class="ss-hero__inner site-shell">
|
|
67
|
+
{hero.data.eyebrow && <Eyebrow>{hero.data.eyebrow}</Eyebrow>}
|
|
68
|
+
<h1 id="page-title" class="ss-hero__title">
|
|
69
|
+
{titleLines.map((line) => (
|
|
70
|
+
<span class="ss-hero__title-line">
|
|
71
|
+
{line.before}
|
|
72
|
+
{line.highlighted && (
|
|
73
|
+
<span class="ss-hero__title-highlight">
|
|
74
|
+
{line.highlighted}
|
|
75
|
+
</span>
|
|
76
|
+
)}
|
|
77
|
+
{line.after}
|
|
78
|
+
</span>
|
|
79
|
+
))}
|
|
80
|
+
</h1>
|
|
81
|
+
{hero.data.claim && <p class="ss-hero__claim">{hero.data.claim}</p>}
|
|
82
|
+
<slot name="meta" />
|
|
83
|
+
<div class="ss-hero__content content-prose">
|
|
84
|
+
{Content ? <Content /> : <slot />}
|
|
85
|
+
</div>
|
|
86
|
+
{hero.data.actions && (
|
|
87
|
+
<div class="ss-hero__actions">
|
|
88
|
+
{hero.data.actions.map((action) => (
|
|
89
|
+
<Button
|
|
90
|
+
href={action.href}
|
|
91
|
+
variant={action.variant}
|
|
92
|
+
style={
|
|
93
|
+
action.variant === 'secondary' ? 'outline' : 'solid'
|
|
94
|
+
}
|
|
95
|
+
size="lg"
|
|
96
|
+
>
|
|
97
|
+
{action.label}
|
|
98
|
+
</Button>
|
|
99
|
+
))}
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
{hero.data.tagline && (
|
|
103
|
+
<p class="ss-hero__tagline">{hero.data.tagline}</p>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
</section>
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ss-hero {
|
|
3
|
+
/* Small and fullscreen retain the base presentation for now. */
|
|
4
|
+
@apply relative isolate overflow-hidden py-section-hero;
|
|
5
|
+
padding-top: max(
|
|
6
|
+
var(--spacing-section-hero),
|
|
7
|
+
calc(var(--spacing-header-overlay) + 2.5rem)
|
|
8
|
+
);
|
|
9
|
+
padding-bottom: var(--spacing-section-hero-bottom);
|
|
10
|
+
|
|
11
|
+
&.ss-hero--big {
|
|
12
|
+
padding-top: max(
|
|
13
|
+
var(--spacing-section-hero),
|
|
14
|
+
calc(var(--spacing-header-overlay) + 4.5rem)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
@media (width < 64rem) {
|
|
18
|
+
padding-top: calc(var(--spacing-header-overlay) + 1.5rem);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ss-hero__inner {
|
|
23
|
+
@apply relative z-10;
|
|
24
|
+
|
|
25
|
+
.ss-eyebrow {
|
|
26
|
+
margin-bottom: clamp(1rem, 1.5vw, 1.25rem);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ss-hero__title {
|
|
30
|
+
@apply max-w-3xl font-bold tracking-tight;
|
|
31
|
+
font-size: clamp(3.25rem, 6vw, 6rem);
|
|
32
|
+
line-height: 1.06;
|
|
33
|
+
|
|
34
|
+
.ss-hero__title-line {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ss-hero__title-highlight {
|
|
39
|
+
color: var(--color-hero-cyan);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ss-hero__claim {
|
|
44
|
+
margin-top: clamp(1rem, 1.5vw, 1.25rem);
|
|
45
|
+
max-width: 42rem;
|
|
46
|
+
color: var(--color-primary-content);
|
|
47
|
+
font-family: var(--font-heading);
|
|
48
|
+
font-size: clamp(1.75rem, 2.5vw, 2.25rem);
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
line-height: 1.12;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ss-hero__meta {
|
|
54
|
+
@apply mt-5 block text-sm font-semibold tracking-wide uppercase;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ss-hero__content {
|
|
58
|
+
margin-top: clamp(1.5rem, 2.25vw, 2rem);
|
|
59
|
+
max-width: 40.625rem;
|
|
60
|
+
font-size: clamp(1rem, 1.25vw, 1.25rem);
|
|
61
|
+
line-height: 1.55;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ss-hero__actions {
|
|
65
|
+
@apply flex flex-wrap gap-3;
|
|
66
|
+
margin-top: clamp(1.75rem, 2.5vw, 2.25rem);
|
|
67
|
+
|
|
68
|
+
.ss-button {
|
|
69
|
+
@apply m-0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.btn-outline {
|
|
73
|
+
--btn-color: color-mix(
|
|
74
|
+
in srgb,
|
|
75
|
+
var(--color-primary-content) 56%,
|
|
76
|
+
transparent
|
|
77
|
+
);
|
|
78
|
+
--btn-rest-fg: var(--color-primary-content);
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
--btn-color: var(--color-primary-content);
|
|
82
|
+
--btn-bg: color-mix(
|
|
83
|
+
in srgb,
|
|
84
|
+
var(--color-primary-content) 12%,
|
|
85
|
+
transparent
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ss-hero__tagline {
|
|
92
|
+
margin-top: 1.5rem;
|
|
93
|
+
color: color-mix(
|
|
94
|
+
in srgb,
|
|
95
|
+
var(--color-primary-content) 72%,
|
|
96
|
+
transparent
|
|
97
|
+
);
|
|
98
|
+
font-family: var(--font-heading);
|
|
99
|
+
font-size: 0.9375rem;
|
|
100
|
+
font-style: italic;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ss-hero__background {
|
|
105
|
+
@apply pointer-events-none absolute inset-0 z-0 size-full object-cover object-center;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.ss-hero--has-background-image {
|
|
109
|
+
@apply text-primary-content;
|
|
110
|
+
|
|
111
|
+
&::before {
|
|
112
|
+
content: '';
|
|
113
|
+
@apply pointer-events-none absolute inset-0 z-[1];
|
|
114
|
+
background:
|
|
115
|
+
linear-gradient(
|
|
116
|
+
90deg,
|
|
117
|
+
rgb(2 21 67 / 90%) 0%,
|
|
118
|
+
rgb(2 21 67 / 76%) 46%,
|
|
119
|
+
rgb(2 21 67 / 42%) 100%
|
|
120
|
+
),
|
|
121
|
+
linear-gradient(
|
|
122
|
+
180deg,
|
|
123
|
+
rgb(2 21 67 / 24%),
|
|
124
|
+
rgb(2 21 67 / 56%)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ss-hero--theme-1 {
|
|
131
|
+
background-color: var(--color-hero-navy);
|
|
132
|
+
background-image:
|
|
133
|
+
radial-gradient(
|
|
134
|
+
ellipse at 88% 12%,
|
|
135
|
+
color-mix(in srgb, var(--color-hero-ocean) 22%, transparent),
|
|
136
|
+
transparent 65%
|
|
137
|
+
),
|
|
138
|
+
linear-gradient(
|
|
139
|
+
110deg,
|
|
140
|
+
var(--color-hero-navy) 32%,
|
|
141
|
+
var(--color-hero-midnight)
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
&::before {
|
|
145
|
+
content: '';
|
|
146
|
+
@apply pointer-events-none absolute inset-0;
|
|
147
|
+
background-image:
|
|
148
|
+
linear-gradient(
|
|
149
|
+
90deg,
|
|
150
|
+
var(--color-hero-navy) 16%,
|
|
151
|
+
color-mix(in srgb, var(--color-hero-navy) 80%, transparent)
|
|
152
|
+
36%,
|
|
153
|
+
color-mix(in srgb, var(--color-hero-navy) 36%, transparent)
|
|
154
|
+
52%,
|
|
155
|
+
transparent 72%
|
|
156
|
+
),
|
|
157
|
+
linear-gradient(
|
|
158
|
+
180deg,
|
|
159
|
+
color-mix(in srgb, var(--color-hero-navy) 65%, transparent),
|
|
160
|
+
color-mix(in srgb, var(--color-hero-navy) 35%, transparent)
|
|
161
|
+
5rem,
|
|
162
|
+
transparent 10rem
|
|
163
|
+
),
|
|
164
|
+
url('../../../assets/hero-waves.svg');
|
|
165
|
+
/* Fill wide heroes proportionally so the lower blue contours
|
|
166
|
+
* reach the middle; bottom alignment preserves their layering. */
|
|
167
|
+
background-size: cover;
|
|
168
|
+
background-position:
|
|
169
|
+
right bottom,
|
|
170
|
+
right bottom,
|
|
171
|
+
right top;
|
|
172
|
+
background-repeat: no-repeat;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Keep waves quiet behind the wider text and wrapping navigation on
|
|
176
|
+
* tablets and phones; preserve the full SVG height to avoid seams. */
|
|
177
|
+
@media (max-width: 63.999rem) {
|
|
178
|
+
&::before {
|
|
179
|
+
opacity: 0.5;
|
|
180
|
+
background-size:
|
|
181
|
+
cover,
|
|
182
|
+
cover,
|
|
183
|
+
auto 100%;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Eyebrow from '../../atoms/Eyebrow/Eyebrow.astro';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
classes: string[];
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
variant?: 'compact' | 'hero';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
title,
|
|
14
|
+
classes,
|
|
15
|
+
eyebrow,
|
|
16
|
+
description,
|
|
17
|
+
variant = 'compact',
|
|
18
|
+
} = Astro.props;
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<section
|
|
22
|
+
class:list={[
|
|
23
|
+
'tone-brand',
|
|
24
|
+
'ss-hero',
|
|
25
|
+
'ss-hero--small',
|
|
26
|
+
'ss-page-title',
|
|
27
|
+
`ss-page-title--${variant}`,
|
|
28
|
+
...classes,
|
|
29
|
+
]}
|
|
30
|
+
aria-labelledby="page-title"
|
|
31
|
+
>
|
|
32
|
+
<div class="ss-hero__inner ss-page-title__inner site-shell">
|
|
33
|
+
{eyebrow && <Eyebrow>{eyebrow}</Eyebrow>}
|
|
34
|
+
<h1 id="page-title" class="ss-hero__title ss-page-title__title">
|
|
35
|
+
{title}
|
|
36
|
+
</h1>
|
|
37
|
+
{description && <p class="ss-page-title__description">{description}</p>}
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ss-page-title {
|
|
3
|
+
&.ss-page-title--compact {
|
|
4
|
+
@apply py-8;
|
|
5
|
+
padding-top: calc(var(--spacing-header-overlay) + 2rem);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&.ss-page-title--hero {
|
|
9
|
+
@apply py-section-hero;
|
|
10
|
+
padding-top: max(
|
|
11
|
+
var(--spacing-section-hero),
|
|
12
|
+
calc(var(--spacing-header-overlay) + 4rem)
|
|
13
|
+
);
|
|
14
|
+
padding-bottom: var(--spacing-section-hero-bottom);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ss-page-title__title {
|
|
18
|
+
@apply max-w-3xl text-display font-bold tracking-tight;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ss-page-title__description {
|
|
22
|
+
@apply mt-5 max-w-3xl text-lg;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { CollectionEntry } from 'astro:content';
|
|
3
|
+
import { toneOf } from '../../../../../lib/sproutsite/pages.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
section: Pick<
|
|
7
|
+
CollectionEntry<'documents' | 'blogDocuments'>,
|
|
8
|
+
'id' | 'data'
|
|
9
|
+
>;
|
|
10
|
+
Content?: Awaited<
|
|
11
|
+
ReturnType<typeof import('astro:content').render>
|
|
12
|
+
>['Content'];
|
|
13
|
+
}
|
|
14
|
+
const { section, Content } = Astro.props;
|
|
15
|
+
const toneClass = {
|
|
16
|
+
default: 'tone-default',
|
|
17
|
+
muted: 'tone-muted',
|
|
18
|
+
brand: 'tone-brand',
|
|
19
|
+
}[toneOf(section)];
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<section
|
|
23
|
+
class:list={[
|
|
24
|
+
toneClass,
|
|
25
|
+
'ss-section',
|
|
26
|
+
`ss-section--spacing-${section.data.spacing ?? 'default'}`,
|
|
27
|
+
]}
|
|
28
|
+
>
|
|
29
|
+
<div class="ss-section__inner site-shell">
|
|
30
|
+
<div
|
|
31
|
+
class:list={[
|
|
32
|
+
'content-prose',
|
|
33
|
+
!section.data.fullWidth && 'ss-section__content',
|
|
34
|
+
]}
|
|
35
|
+
>
|
|
36
|
+
{Content ? <Content /> : <slot />}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ss-section {
|
|
3
|
+
@apply py-section;
|
|
4
|
+
|
|
5
|
+
&.ss-section--spacing-small {
|
|
6
|
+
@media (width >= 64rem) {
|
|
7
|
+
padding-block: calc(var(--spacing-section) / 2);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&.ss-section--spacing-large {
|
|
12
|
+
@media (width >= 64rem) {
|
|
13
|
+
padding-block: calc(var(--spacing-section) * 2);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ss-section__content {
|
|
18
|
+
@apply max-w-4xl;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|