sproutsite 0.5.24 → 0.5.26
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 +13 -6
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/VERSION +1 -1
- package/package.json +1 -1
- package/src/lib/sproutsite/branding.ts +7 -45
- package/src/lib/sproutsite/colors.ts +24 -0
- package/src/lib/sproutsite/hero-background.ts +61 -0
- package/src/lib/sproutsite/public-assets.ts +33 -0
- package/src/lib/sproutsite/remark-links.ts +4 -3
- package/src/lib/sproutsite/site-colors.ts +47 -0
- package/src/lib/sproutsite/site-config.ts +211 -38
- package/src/lib/sproutsite/sitemap.ts +2 -2
- package/src/lib/sproutsite/types.ts +7 -9
- package/src/lib/sproutsite/urls.ts +3 -3
- package/src/lib/sproutsite/validation.ts +4 -1
- package/src/package/config.ts +24 -9
- package/src/package/content.ts +25 -1
- package/src/package/manifest.ts +1 -1
- package/src/package/page.astro +6 -3
- package/src/package/starter-assets/README.md +6 -3
- package/src/themes/default/colors.ts +190 -0
- package/src/themes/default/components/atoms/HeroBackground/HeroBackground.astro +52 -0
- package/src/themes/default/components/atoms/HeroBackground/HeroBackground.css +23 -0
- package/src/themes/default/components/layout/Columns/Columns.css +1 -1
- package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.astro +8 -5
- package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.css +1 -1
- package/src/themes/default/components/organisms/BlogIndex/BlogIndex.astro +16 -13
- package/src/themes/default/components/organisms/BlogPost/BlogPost.astro +1 -1
- package/src/themes/default/components/organisms/Footer/Footer.astro +1 -1
- package/src/themes/default/components/organisms/Footer/Footer.css +1 -1
- package/src/themes/default/components/organisms/Header/Header.astro +2 -2
- package/src/themes/default/components/organisms/Header/Header.css +10 -7
- package/src/themes/default/components/organisms/Hero/Hero.astro +12 -13
- package/src/themes/default/components/organisms/Hero/Hero.css +56 -30
- package/src/themes/default/components/organisms/PageTitle/PageTitle.astro +19 -0
- package/src/themes/default/layouts/ErrorPage/ErrorPage.astro +7 -6
- package/src/themes/default/layouts/PageLayout/PageLayout.astro +8 -3
- package/src/themes/default/styles/foundation/tokens.css +1 -0
- package/src/themes/default/styles/theme.css +1 -0
- package/src/themes/default/styles/themes/section-tones.css +7 -3
- package/src/themes/default/assets/hero-waves.svg +0 -41
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
.ss-hero__claim {
|
|
45
45
|
margin-top: clamp(1rem, 1.5vw, 1.25rem);
|
|
46
46
|
max-width: 42rem;
|
|
47
|
-
color: var(--color-primary-content);
|
|
47
|
+
color: var(--ss-hero-content, var(--color-primary-content));
|
|
48
48
|
font-family: var(--font-heading);
|
|
49
49
|
font-size: clamp(1.75rem, 2.5vw, 2.25rem);
|
|
50
50
|
font-weight: var(--ss-heading-weight, 500);
|
|
@@ -73,16 +73,23 @@
|
|
|
73
73
|
.btn-outline {
|
|
74
74
|
--btn-color: color-mix(
|
|
75
75
|
in srgb,
|
|
76
|
-
var(--color-primary-content) 56%,
|
|
76
|
+
var(--ss-hero-content, var(--color-primary-content)) 56%,
|
|
77
77
|
transparent
|
|
78
78
|
);
|
|
79
|
-
--btn-rest-fg: var(
|
|
79
|
+
--btn-rest-fg: var(
|
|
80
|
+
--ss-hero-content,
|
|
81
|
+
var(--color-primary-content)
|
|
82
|
+
);
|
|
80
83
|
|
|
81
84
|
&:hover {
|
|
82
|
-
--btn-color: var(
|
|
85
|
+
--btn-color: var(
|
|
86
|
+
--ss-hero-content,
|
|
87
|
+
var(--color-primary-content)
|
|
88
|
+
);
|
|
83
89
|
--btn-bg: color-mix(
|
|
84
90
|
in srgb,
|
|
85
|
-
var(--color-primary-content)
|
|
91
|
+
var(--ss-hero-content, var(--color-primary-content))
|
|
92
|
+
12%,
|
|
86
93
|
transparent
|
|
87
94
|
);
|
|
88
95
|
}
|
|
@@ -93,7 +100,7 @@
|
|
|
93
100
|
margin-top: 1.5rem;
|
|
94
101
|
color: color-mix(
|
|
95
102
|
in srgb,
|
|
96
|
-
var(--color-primary-content) 72%,
|
|
103
|
+
var(--ss-hero-content, var(--color-primary-content)) 72%,
|
|
97
104
|
transparent
|
|
98
105
|
);
|
|
99
106
|
font-size: 0.9375rem;
|
|
@@ -101,33 +108,60 @@
|
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
|
|
104
|
-
.ss-hero__background {
|
|
105
|
-
@apply pointer-events-none absolute inset-0 z-0 size-full object-cover object-center;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
111
|
&.ss-hero--has-background-image {
|
|
109
|
-
|
|
112
|
+
--ss-hero-content: var(--color-brand-content);
|
|
113
|
+
--ss-tone-content: var(--color-brand-content);
|
|
114
|
+
--ss-eyebrow-color: var(--color-brand-content);
|
|
115
|
+
color: var(--color-brand-content);
|
|
110
116
|
|
|
111
|
-
|
|
117
|
+
&:not(.ss-hero--background-svg)::before,
|
|
118
|
+
&.ss-hero--background-svg:not(.ss-hero--theme-1)::before {
|
|
112
119
|
content: '';
|
|
113
120
|
@apply pointer-events-none absolute inset-0 z-[1];
|
|
114
121
|
background:
|
|
115
122
|
linear-gradient(
|
|
116
123
|
90deg,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
color-mix(
|
|
125
|
+
in srgb,
|
|
126
|
+
var(--ss-hero-image-overlay, #021543) 90%,
|
|
127
|
+
transparent
|
|
128
|
+
)
|
|
129
|
+
0%,
|
|
130
|
+
color-mix(
|
|
131
|
+
in srgb,
|
|
132
|
+
var(--ss-hero-image-overlay, #021543) 76%,
|
|
133
|
+
transparent
|
|
134
|
+
)
|
|
135
|
+
46%,
|
|
136
|
+
color-mix(
|
|
137
|
+
in srgb,
|
|
138
|
+
var(--ss-hero-image-overlay, #021543) 42%,
|
|
139
|
+
transparent
|
|
140
|
+
)
|
|
141
|
+
100%
|
|
120
142
|
),
|
|
121
143
|
linear-gradient(
|
|
122
144
|
180deg,
|
|
123
|
-
|
|
124
|
-
|
|
145
|
+
color-mix(
|
|
146
|
+
in srgb,
|
|
147
|
+
var(--ss-hero-image-overlay, #021543) 24%,
|
|
148
|
+
transparent
|
|
149
|
+
),
|
|
150
|
+
color-mix(
|
|
151
|
+
in srgb,
|
|
152
|
+
var(--ss-hero-image-overlay, #021543) 56%,
|
|
153
|
+
transparent
|
|
154
|
+
)
|
|
125
155
|
);
|
|
126
156
|
}
|
|
127
157
|
}
|
|
128
158
|
}
|
|
129
159
|
|
|
130
160
|
.ss-hero--theme-1 {
|
|
161
|
+
--ss-hero-content: var(--color-brand-content);
|
|
162
|
+
--ss-tone-content: var(--color-brand-content);
|
|
163
|
+
--ss-eyebrow-color: var(--color-brand-content);
|
|
164
|
+
color: var(--color-brand-content);
|
|
131
165
|
background-color: var(--color-hero-navy);
|
|
132
166
|
background-image:
|
|
133
167
|
radial-gradient(
|
|
@@ -143,7 +177,7 @@
|
|
|
143
177
|
|
|
144
178
|
&::before {
|
|
145
179
|
content: '';
|
|
146
|
-
@apply pointer-events-none absolute inset-0;
|
|
180
|
+
@apply pointer-events-none absolute inset-0 z-[1];
|
|
147
181
|
background-image:
|
|
148
182
|
linear-gradient(
|
|
149
183
|
90deg,
|
|
@@ -160,27 +194,19 @@
|
|
|
160
194
|
color-mix(in srgb, var(--color-hero-navy) 35%, transparent)
|
|
161
195
|
5rem,
|
|
162
196
|
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. */
|
|
197
|
+
);
|
|
167
198
|
background-size: cover;
|
|
168
199
|
background-position:
|
|
169
200
|
right bottom,
|
|
170
|
-
right bottom
|
|
171
|
-
right top;
|
|
201
|
+
right bottom;
|
|
172
202
|
background-repeat: no-repeat;
|
|
173
203
|
}
|
|
174
204
|
|
|
175
|
-
/* Keep
|
|
176
|
-
*
|
|
205
|
+
/* Keep the overlay subtle on tablets and phones. SVG sizing lives
|
|
206
|
+
* in the shared HeroBackground atom, independently of this class. */
|
|
177
207
|
@media (max-width: 63.999rem) {
|
|
178
208
|
&::before {
|
|
179
209
|
opacity: 0.5;
|
|
180
|
-
background-size:
|
|
181
|
-
cover,
|
|
182
|
-
cover,
|
|
183
|
-
auto 100%;
|
|
184
210
|
}
|
|
185
211
|
}
|
|
186
212
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Eyebrow from '../../atoms/Eyebrow/Eyebrow.astro';
|
|
3
|
+
import HeroBackground from '../../atoms/HeroBackground/HeroBackground.astro';
|
|
4
|
+
import type { SiteConfig } from '../../../../../lib/sproutsite/types.js';
|
|
5
|
+
import { isSvgHeroImage } from '../../../../../lib/sproutsite/hero-background.js';
|
|
3
6
|
|
|
4
7
|
interface Props {
|
|
5
8
|
title: string;
|
|
9
|
+
site: SiteConfig;
|
|
6
10
|
classes: string[];
|
|
7
11
|
eyebrow?: string;
|
|
8
12
|
description?: string;
|
|
@@ -11,6 +15,7 @@ interface Props {
|
|
|
11
15
|
|
|
12
16
|
const {
|
|
13
17
|
title,
|
|
18
|
+
site,
|
|
14
19
|
classes,
|
|
15
20
|
eyebrow,
|
|
16
21
|
description,
|
|
@@ -25,10 +30,24 @@ const {
|
|
|
25
30
|
'ss-hero--small',
|
|
26
31
|
'ss-page-title',
|
|
27
32
|
`ss-page-title--${variant}`,
|
|
33
|
+
{
|
|
34
|
+
'ss-hero--has-background-image': Boolean(
|
|
35
|
+
site.hero['background-image'],
|
|
36
|
+
),
|
|
37
|
+
'ss-hero--background-svg': isSvgHeroImage(
|
|
38
|
+
site.hero['background-image'],
|
|
39
|
+
),
|
|
40
|
+
},
|
|
28
41
|
...classes,
|
|
29
42
|
]}
|
|
30
43
|
aria-labelledby="page-title"
|
|
31
44
|
>
|
|
45
|
+
{site.hero['background-image'] && (
|
|
46
|
+
<HeroBackground
|
|
47
|
+
source={site.hero['background-image']}
|
|
48
|
+
base={site.base}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
32
51
|
<div class="ss-hero__inner ss-page-title__inner site-shell">
|
|
33
52
|
{eyebrow && <Eyebrow>{eyebrow}</Eyebrow>}
|
|
34
53
|
<h1 id="page-title" class="ss-hero__title ss-page-title__title">
|
|
@@ -10,11 +10,12 @@ interface Props {
|
|
|
10
10
|
}
|
|
11
11
|
const { status } = Astro.props;
|
|
12
12
|
const defaultSite = loadSiteConfig();
|
|
13
|
-
const
|
|
14
|
-
defaultSite.locales.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const site =
|
|
13
|
+
const locale =
|
|
14
|
+
defaultSite.i18n.locales.find((candidate) =>
|
|
15
|
+
Astro.url.pathname.startsWith(`${defaultSite.base}${candidate}/`),
|
|
16
|
+
) ?? defaultSite.i18n.defaultLocale;
|
|
17
|
+
const site = loadSiteConfig(locale);
|
|
18
|
+
const german = site.i18n.locale === 'de';
|
|
18
19
|
const introduction = german
|
|
19
20
|
? status === 404
|
|
20
21
|
? 'Diese Adresse führt gerade ins Grüne.'
|
|
@@ -70,7 +71,7 @@ const copy = german
|
|
|
70
71
|
site={site}
|
|
71
72
|
title={copy.eyebrow}
|
|
72
73
|
description={copy.description}
|
|
73
|
-
route={`/${status}${site.
|
|
74
|
+
route={`/${status}${site.i18n.locale === defaultSite.i18n.defaultLocale ? '' : `-${site.i18n.locale}`}.html`}
|
|
74
75
|
noindex
|
|
75
76
|
>
|
|
76
77
|
<Hero
|
|
@@ -6,6 +6,7 @@ import Footer from '../../components/organisms/Footer/Footer.astro';
|
|
|
6
6
|
import type { SiteConfig } from '../../../../lib/sproutsite/types.js';
|
|
7
7
|
import { canonicalUrl, withBase } from '../../../../lib/sproutsite/urls.js';
|
|
8
8
|
import { resolveBranding } from '../../branding.js';
|
|
9
|
+
import { colorStyles } from '../../colors.js';
|
|
9
10
|
interface Props {
|
|
10
11
|
site: SiteConfig;
|
|
11
12
|
title: string;
|
|
@@ -28,10 +29,14 @@ const canonical = noindex
|
|
|
28
29
|
: canonicalUrl(route, site);
|
|
29
30
|
const branding = await resolveBranding(site);
|
|
30
31
|
const socialImage = branding.sharingImage;
|
|
32
|
+
const paletteStyles = colorStyles(
|
|
33
|
+
site.colors,
|
|
34
|
+
`site configuration (${site.i18n.locale})`,
|
|
35
|
+
);
|
|
31
36
|
---
|
|
32
37
|
|
|
33
38
|
<!doctype html>
|
|
34
|
-
<html lang={site.
|
|
39
|
+
<html lang={site.i18n.locale} data-theme="sproutsite" style={paletteStyles}>
|
|
35
40
|
<head>
|
|
36
41
|
<meta charset="utf-8" />
|
|
37
42
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
@@ -95,11 +100,11 @@ const socialImage = branding.sharingImage;
|
|
|
95
100
|
}}
|
|
96
101
|
class:list={{
|
|
97
102
|
'ss-page--landing': layout === 'landing',
|
|
98
|
-
'ss-links--external-icons': site.links?.
|
|
103
|
+
'ss-links--external-icons': site.links?.external?.icon === true,
|
|
99
104
|
}}
|
|
100
105
|
>
|
|
101
106
|
<a class="ss-skip-link" href="#main-content">
|
|
102
|
-
{t(site.
|
|
107
|
+
{t(site.i18n.locale === 'de' ? 'de' : 'en', 'skipToContent')}
|
|
103
108
|
</a>
|
|
104
109
|
{layout !== 'landing' && <Header site={site} route={route} />}
|
|
105
110
|
<main id="main-content">
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
/* Theme components: atoms, molecules, organisms, then layout primitives */
|
|
27
27
|
@import '../components/atoms/BrandLogo/BrandLogo.css';
|
|
28
|
+
@import '../components/atoms/HeroBackground/HeroBackground.css';
|
|
28
29
|
@import '../components/atoms/Badge/Badge.css';
|
|
29
30
|
@import '../components/atoms/Button/Button.css';
|
|
30
31
|
@import '../components/atoms/ContentImage/ContentImage.css';
|
|
@@ -10,16 +10,20 @@
|
|
|
10
10
|
}
|
|
11
11
|
.tone-brand {
|
|
12
12
|
@apply bg-primary text-primary-content;
|
|
13
|
-
--ss-eyebrow-color: var(
|
|
13
|
+
--ss-eyebrow-color: var(
|
|
14
|
+
--ss-tone-content,
|
|
15
|
+
var(--color-primary-content)
|
|
16
|
+
);
|
|
14
17
|
|
|
15
18
|
.content-prose {
|
|
16
19
|
&,
|
|
17
20
|
:where(h2, h3, h4, p, li, strong, code):not(:where(.ss-tabs *)) {
|
|
18
|
-
|
|
21
|
+
color: var(--ss-tone-content, var(--color-primary-content));
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
a:not(:where(.ss-tabs *)) {
|
|
22
|
-
@apply
|
|
25
|
+
@apply decoration-current;
|
|
26
|
+
color: var(--ss-tone-content, var(--color-primary-content));
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
:not(pre) > code:not(:where(.ss-tabs *)) {
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="640" viewBox="0 0 1600 640" fill="none" aria-hidden="true">
|
|
2
|
-
<defs>
|
|
3
|
-
<linearGradient id="back-wave" x1="740" y1="580" x2="1540" y2="130" gradientUnits="userSpaceOnUse">
|
|
4
|
-
<stop stop-color="#0B294A" stop-opacity="0"/>
|
|
5
|
-
<stop offset="0.38" stop-color="#10476B" stop-opacity="0.50"/>
|
|
6
|
-
<stop offset="0.78" stop-color="#0B6075" stop-opacity="0.76"/>
|
|
7
|
-
<stop offset="1" stop-color="#087B78" stop-opacity="0.88"/>
|
|
8
|
-
</linearGradient>
|
|
9
|
-
<linearGradient id="crest-base" x1="1030" y1="390" x2="1550" y2="-20" gradientUnits="userSpaceOnUse">
|
|
10
|
-
<stop stop-color="#0D2B50" stop-opacity="0.10"/>
|
|
11
|
-
<stop offset="0.35" stop-color="#125B86" stop-opacity="0.62"/>
|
|
12
|
-
<stop offset="0.7" stop-color="#078481" stop-opacity="0.90"/>
|
|
13
|
-
<stop offset="1" stop-color="#159A70" stop-opacity="0.92"/>
|
|
14
|
-
</linearGradient>
|
|
15
|
-
<radialGradient id="crest-green" cx="0" cy="0" r="1" gradientTransform="translate(1510 20) rotate(155) scale(350 225)" gradientUnits="userSpaceOnUse">
|
|
16
|
-
<stop stop-color="#73DF48" stop-opacity="0.92"/>
|
|
17
|
-
<stop offset="0.24" stop-color="#40BF61" stop-opacity="0.72"/>
|
|
18
|
-
<stop offset="0.58" stop-color="#159C78" stop-opacity="0.24"/>
|
|
19
|
-
<stop offset="1" stop-color="#159C78" stop-opacity="0"/>
|
|
20
|
-
</radialGradient>
|
|
21
|
-
<linearGradient id="middle-wave" x1="900" y1="450" x2="1540" y2="630" gradientUnits="userSpaceOnUse">
|
|
22
|
-
<stop stop-color="#0D3458" stop-opacity="0.12"/>
|
|
23
|
-
<stop offset="0.48" stop-color="#15567B" stop-opacity="0.75"/>
|
|
24
|
-
<stop offset="1" stop-color="#0B365C" stop-opacity="0.84"/>
|
|
25
|
-
</linearGradient>
|
|
26
|
-
<linearGradient id="front-wave" x1="1040" y1="565" x2="1530" y2="680" gradientUnits="userSpaceOnUse">
|
|
27
|
-
<stop stop-color="#0B2B4E" stop-opacity="0.18"/>
|
|
28
|
-
<stop offset="0.5" stop-color="#10446C" stop-opacity="0.75"/>
|
|
29
|
-
<stop offset="1" stop-color="#092947" stop-opacity="0.88"/>
|
|
30
|
-
</linearGradient>
|
|
31
|
-
<path id="crest-shape" d="M 820 690 C 970 620 1072 504 1166 378 C 1260 252 1334 115 1478 22 C 1544 -20 1611 -36 1680 -40 L 1680 700 Z"/>
|
|
32
|
-
</defs>
|
|
33
|
-
<!-- The SVG is transparent so the hero's existing navy background remains visible. -->
|
|
34
|
-
<path d="M 620 700 C 794 558 898 442 1086 390 C 1272 338 1456 395 1680 265 L 1680 700 Z" fill="url(#back-wave)"/>
|
|
35
|
-
<!-- Organic upper crest with a localized green highlight, not a green wall. -->
|
|
36
|
-
<use href="#crest-shape" fill="url(#crest-base)"/>
|
|
37
|
-
<use href="#crest-shape" fill="url(#crest-green)"/>
|
|
38
|
-
<!-- Low, flowing blue folds. Their curved edges stay inside the visible canvas. -->
|
|
39
|
-
<path d="M 670 700 C 832 621 956 543 1106 532 C 1242 522 1322 579 1458 524 C 1548 488 1618 477 1680 496 L 1680 700 Z" fill="url(#middle-wave)"/>
|
|
40
|
-
<path d="M 880 700 C 1050 653 1168 617 1304 628 C 1440 639 1544 568 1680 596 L 1680 700 Z" fill="url(#front-wave)"/>
|
|
41
|
-
</svg>
|