sproutsite 0.5.13 → 0.5.15

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 (34) hide show
  1. package/README.md +23 -1
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/VERSION +1 -1
  4. package/package.json +3 -1
  5. package/src/lib/sproutsite/legal-identity.ts +85 -0
  6. package/src/lib/sproutsite/privacy-infrastructure.ts +70 -0
  7. package/src/lib/sproutsite/rehype-links.ts +24 -5
  8. package/src/lib/sproutsite/site-config.ts +54 -1
  9. package/src/lib/sproutsite/types.ts +16 -1
  10. package/src/lib/sproutsite/urls.ts +31 -0
  11. package/src/lib/sproutsite/validation.ts +56 -0
  12. package/src/package/components.ts +2 -0
  13. package/src/package/config.ts +7 -1
  14. package/src/themes/default/assets/arrow-up-right.svg +2 -0
  15. package/src/themes/default/assets/footer-waves.svg +38 -0
  16. package/src/themes/default/components/atoms/Button/Button.astro +16 -3
  17. package/src/themes/default/components/molecules/Card/Card.css +4 -0
  18. package/src/themes/default/components/molecules/Feature/Feature.css +4 -0
  19. package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.astro +13 -3
  20. package/src/themes/default/components/molecules/LanguageSwitcher/LanguageSwitcher.css +25 -0
  21. package/src/themes/default/components/molecules/LegalIdentity/LegalIdentity.astro +92 -0
  22. package/src/themes/default/components/molecules/LegalIdentity/LegalIdentity.css +22 -0
  23. package/src/themes/default/components/molecules/PrivacyInfrastructure/PrivacyInfrastructure.astro +89 -0
  24. package/src/themes/default/components/molecules/PrivacyInfrastructure/PrivacyInfrastructure.css +16 -0
  25. package/src/themes/default/components/organisms/Footer/Footer.astro +127 -32
  26. package/src/themes/default/components/organisms/Footer/Footer.css +208 -27
  27. package/src/themes/default/components/organisms/Header/Header.astro +8 -12
  28. package/src/themes/default/components/organisms/Header/Header.css +4 -4
  29. package/src/themes/default/layouts/PageLayout/PageLayout.astro +7 -2
  30. package/src/themes/default/styles/foundation/base.css +5 -0
  31. package/src/themes/default/styles/foundation/links.css +28 -0
  32. package/src/themes/default/styles/foundation/prose.css +6 -1
  33. package/src/themes/default/styles/theme.css +3 -0
  34. package/third-party-licenses/simple-icons-LICENSE +30 -0
@@ -1,13 +1,15 @@
1
1
  @layer components {
2
2
  .ss-footer {
3
- @apply border-t text-primary-content;
4
- border-color: color-mix(
5
- in srgb,
6
- var(--color-hero-ocean) 55%,
7
- var(--color-hero-navy)
8
- );
3
+ border-top: 1px solid
4
+ color-mix(
5
+ in srgb,
6
+ var(--color-hero-ocean) 55%,
7
+ var(--color-hero-navy)
8
+ );
9
+ color: var(--color-primary-content);
9
10
  background-color: var(--color-hero-navy);
10
11
  background-image:
12
+ url('../../../assets/footer-waves.svg'),
11
13
  radial-gradient(
12
14
  ellipse at 88% 100%,
13
15
  color-mix(in srgb, var(--color-hero-ocean) 32%, transparent),
@@ -18,45 +20,224 @@
18
20
  var(--color-hero-navy) 32%,
19
21
  var(--color-hero-midnight)
20
22
  );
23
+ background-repeat: no-repeat;
24
+ background-position:
25
+ right bottom,
26
+ center,
27
+ center;
28
+ background-size:
29
+ max(100%, 100rem) auto,
30
+ cover,
31
+ cover;
21
32
 
22
33
  .ss-footer__inner {
23
- @apply flex flex-wrap items-center justify-between gap-x-4 gap-y-8 py-10 text-sm;
34
+ padding-block: 4.5rem 9rem;
35
+ font-size: 1rem;
36
+ line-height: 1.6;
24
37
 
25
- .ss-footer__text {
26
- @apply flex flex-wrap items-center gap-x-6 gap-y-8;
38
+ a {
39
+ color: inherit;
40
+ text-decoration: none;
41
+ border-radius: 0.25rem;
42
+ &:hover {
43
+ color: var(--color-hero-cyan);
44
+ text-decoration: underline;
45
+ text-underline-offset: 0.25em;
46
+ }
47
+ &:focus-visible {
48
+ outline-color: var(--color-hero-green);
49
+ }
50
+ }
51
+ ul {
52
+ list-style: none;
53
+ margin: 0;
54
+ padding: 0;
55
+ }
27
56
 
57
+ .ss-footer__top {
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: 2rem;
28
61
  .ss-footer__brand {
29
- position: relative;
30
-
31
62
  > a {
32
- display: block;
33
- color: var(--color-primary-content);
63
+ display: inline-block;
34
64
  text-decoration: none;
65
+ &:hover {
66
+ text-decoration: underline;
67
+ }
35
68
  }
36
-
37
- .ss-footer__version {
38
- @apply whitespace-nowrap text-xs;
39
- position: absolute;
40
- top: calc(100% + 0.375rem);
41
- left: 0;
69
+ .ss-brand-logo {
70
+ font-size: 2rem;
71
+ gap: 0.25rem;
72
+ img {
73
+ width: 3rem;
74
+ height: 3rem;
75
+ }
76
+ }
77
+ p {
78
+ max-width: 28ch;
79
+ margin: 1rem 0 0;
80
+ font-size: 1.125rem;
81
+ }
82
+ }
83
+ .ss-footer__heading {
84
+ margin: 0 0 0.75rem;
85
+ font-size: 1.125rem;
86
+ line-height: 1.4;
87
+ font-weight: 700;
88
+ }
89
+ .ss-footer__group {
90
+ a {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 0.75rem;
94
+ min-height: 2.75rem;
95
+ padding-block: 0.375rem;
96
+ }
97
+ .ss-footer__link-icon,
98
+ .ss-footer__chevron {
99
+ display: inline-flex;
100
+ flex: none;
101
+ }
102
+ .ss-footer__chevron {
103
+ margin-inline-start: auto;
104
+ order: 1;
105
+ }
106
+ .ss-footer__link-icon {
107
+ margin-inline-end: 0.5rem;
108
+ }
109
+ a::after {
110
+ /* Offset the flex gap to match inline link arrows. */
111
+ margin-inline-start: calc(0.2em - 0.75rem);
112
+ }
113
+ }
114
+ .ss-footer__social {
115
+ border-bottom: 1px solid
116
+ color-mix(in srgb, currentColor 30%, transparent);
117
+ padding-block: 1.75rem;
118
+ ul {
119
+ display: flex;
120
+ flex-wrap: wrap;
121
+ gap: 1rem;
122
+ }
123
+ a {
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ width: 2.875rem;
128
+ height: 2.875rem;
129
+ border-radius: 0.625rem;
130
+ background: color-mix(
131
+ in srgb,
132
+ currentColor 12%,
133
+ transparent
134
+ );
135
+ &:hover {
136
+ background: color-mix(
137
+ in srgb,
138
+ var(--color-hero-cyan) 20%,
139
+ transparent
140
+ );
141
+ }
42
142
  }
43
143
  }
44
144
  }
145
+ .ss-footer__bottom {
146
+ display: flex;
147
+ flex-direction: column;
148
+ align-items: center;
149
+ gap: 1rem;
150
+ margin-top: 2rem;
151
+ padding-top: 1.75rem;
152
+ border-top: 1px solid
153
+ color-mix(in srgb, currentColor 30%, transparent);
154
+ font-size: 0.875rem;
155
+ .ss-footer__credits {
156
+ display: flex;
157
+ align-items: center;
158
+ gap: 1rem;
45
159
 
46
- .ss-footer__links {
47
- @apply flex flex-wrap gap-2;
160
+ > span + span::before {
161
+ content: '·';
162
+ margin-inline-end: 1rem;
163
+ }
164
+ }
165
+ .ss-footer__utilities,
166
+ .ss-footer__links {
167
+ display: flex;
168
+ flex-wrap: wrap;
169
+ align-items: center;
170
+ justify-content: center;
171
+ gap: 0.5rem 1rem;
172
+ }
173
+ .ss-footer__links {
174
+ li {
175
+ display: flex;
176
+ align-items: center;
177
+ gap: 1rem;
178
+ + li::before {
179
+ content: '·';
180
+ }
181
+ }
182
+ a {
183
+ display: inline-flex;
184
+ align-items: center;
185
+ min-height: 2.75rem;
186
+ }
187
+ }
188
+ }
189
+ }
190
+ @media (width < 64rem) {
191
+ .ss-footer__inner {
192
+ padding-top: var(--spacing-section);
48
193
 
49
- li {
50
- @apply inline-flex items-center gap-2;
194
+ .ss-footer__top .ss-footer__social {
195
+ padding-top: 0;
51
196
  }
52
197
 
53
- a {
54
- color: var(--color-primary-content);
198
+ .ss-footer__top .ss-footer__brand {
199
+ border-bottom: 1px solid
200
+ color-mix(in srgb, currentColor 30%, transparent);
201
+ padding-bottom: 2rem;
202
+ }
203
+ .ss-footer__top:has(.ss-footer__social) + .ss-footer__bottom {
204
+ border-top: 0;
205
+ margin-top: 0;
55
206
  }
56
207
  }
208
+ }
209
+ @media (width >= 64rem) {
210
+ .ss-footer__inner {
211
+ padding-top: var(--spacing-section);
212
+ padding-bottom: var(--spacing-section);
57
213
 
58
- a:focus-visible {
59
- outline-color: var(--color-hero-green);
214
+ .ss-footer__top {
215
+ flex-direction: row;
216
+ flex-wrap: wrap;
217
+ column-gap: 3rem;
218
+ .ss-footer__brand {
219
+ flex: 2 1 16rem;
220
+ }
221
+ .ss-footer__group,
222
+ .ss-footer__social {
223
+ flex: 1 1 8rem;
224
+ }
225
+ .ss-footer__group {
226
+ .ss-footer__chevron {
227
+ display: none;
228
+ }
229
+ }
230
+ .ss-footer__social {
231
+ border: 0;
232
+ padding: 0;
233
+ }
234
+ }
235
+ .ss-footer__bottom {
236
+ flex-direction: row;
237
+ justify-content: space-between;
238
+ margin-top: 3rem;
239
+ padding-top: 0.5rem;
240
+ }
60
241
  }
61
242
  }
62
243
  }
@@ -8,7 +8,7 @@ import { t } from '../../../i18n/index.js';
8
8
  import type { Link, SiteConfig } from '../../../../../lib/sproutsite/types.js';
9
9
  import {
10
10
  contentHref,
11
- isExternalWebLink,
11
+ externalLinkAttributes,
12
12
  } from '../../../../../lib/sproutsite/urls.js';
13
13
 
14
14
  interface Props {
@@ -72,7 +72,10 @@ const hasLanguageSwitcher = site.header.links.some(
72
72
  />
73
73
  );
74
74
  }
75
- const external = isExternalWebLink(link.href, site.url);
75
+ const externalAttributes = externalLinkAttributes(
76
+ link.href,
77
+ site,
78
+ );
76
79
  // Icon validates configured names against Lucide at render time.
77
80
  const icon = link.icon as
78
81
  ComponentProps<typeof Icon>['name'] | undefined;
@@ -83,12 +86,8 @@ const hasLanguageSwitcher = site.header.links.some(
83
86
  href={link.href}
84
87
  variant={link.variant}
85
88
  size="md"
86
- target={external ? '_blank' : undefined}
87
- rel={
88
- external
89
- ? 'noopener noreferrer'
90
- : undefined
91
- }
89
+ target={externalAttributes.target}
90
+ rel={externalAttributes.rel}
92
91
  aria-current={
93
92
  isActive(link) ? 'page' : undefined
94
93
  }
@@ -104,10 +103,7 @@ const hasLanguageSwitcher = site.header.links.some(
104
103
  <a
105
104
  class="ss-header__link btn btn-ghost btn-sm"
106
105
  href={contentHref(link.href, site)}
107
- target={external ? '_blank' : undefined}
108
- rel={
109
- external ? 'noopener noreferrer' : undefined
110
- }
106
+ {...externalAttributes}
111
107
  aria-current={
112
108
  isActive(link) ? 'page' : undefined
113
109
  }
@@ -14,7 +14,7 @@
14
14
  @apply flex flex-wrap items-center justify-between gap-x-8 gap-y-3 py-[2.1875rem] transition-[padding] duration-200;
15
15
 
16
16
  .ss-header__brand {
17
- @apply inline-flex items-center gap-3 text-lg font-bold text-primary-content no-underline hover:no-underline;
17
+ @apply inline-flex items-center gap-3 text-lg font-bold text-primary-content no-underline hover:underline;
18
18
  }
19
19
 
20
20
  .ss-header__link,
@@ -35,7 +35,7 @@
35
35
 
36
36
  .ss-header__cta {
37
37
  .ss-button {
38
- @apply m-0 !text-lg no-underline hover:no-underline;
38
+ @apply m-0 !text-lg no-underline hover:underline;
39
39
 
40
40
  &[aria-current='page'] {
41
41
  @apply outline-2 outline-offset-2;
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  .ss-header__link {
48
- @apply relative !gap-2.5 !text-lg !text-primary-content no-underline hover:no-underline;
48
+ @apply relative !gap-2.5 !text-lg !text-primary-content no-underline hover:underline;
49
49
  border-color: transparent !important;
50
50
  box-shadow: none !important;
51
51
 
@@ -200,7 +200,7 @@
200
200
  border: 0;
201
201
  border-radius: 0;
202
202
  font-size: 1.5rem !important;
203
- font-weight: 500 !important;
203
+ font-weight: 600 !important;
204
204
  line-height: 1.35;
205
205
  text-align: start;
206
206
  white-space: normal;
@@ -95,7 +95,12 @@ const socialImage = new URL(socialCard.src, site.url).href;
95
95
  <meta name="twitter:title" content={documentTitle} />
96
96
  <meta name="twitter:description" content={description} />
97
97
  </head>
98
- <body class:list={{ 'ss-page--landing': layout === 'landing' }}>
98
+ <body
99
+ class:list={{
100
+ 'ss-page--landing': layout === 'landing',
101
+ 'ss-links--external-icons': site.links?.externalIcon === true,
102
+ }}
103
+ >
99
104
  <a class="ss-skip-link" href="#main-content">
100
105
  {t(site.language === 'de' ? 'de' : 'en', 'skipToContent')}
101
106
  </a>
@@ -103,6 +108,6 @@ const socialImage = new URL(socialCard.src, site.url).href;
103
108
  <main id="main-content">
104
109
  <slot />
105
110
  </main>
106
- <Footer site={site} />
111
+ <Footer site={site} route={route} />
107
112
  </body>
108
113
  </html>
@@ -13,6 +13,11 @@
13
13
  @apply flex-1;
14
14
  }
15
15
 
16
+ b,
17
+ strong {
18
+ font-weight: 600;
19
+ }
20
+
16
21
  a {
17
22
  @apply no-underline underline-offset-6 hover:underline;
18
23
  }
@@ -0,0 +1,28 @@
1
+ @layer components {
2
+ a {
3
+ text-decoration: none;
4
+
5
+ &:hover {
6
+ text-decoration: underline;
7
+ }
8
+
9
+ .ss-links--external-icons
10
+ &:is(
11
+ [data-external-link],
12
+ [target='_blank'],
13
+ [href^='mailto:' i],
14
+ [href^='tel:' i]
15
+ )::after {
16
+ content: '';
17
+ display: inline-block;
18
+ flex: none;
19
+ width: 0.85em;
20
+ height: 0.85em;
21
+ margin-inline-start: 0.2em;
22
+ vertical-align: -0.05em;
23
+ background-color: currentColor;
24
+ mask: url('../../assets/arrow-up-right.svg') center / contain
25
+ no-repeat;
26
+ }
27
+ }
28
+ }
@@ -1,12 +1,17 @@
1
1
  /* Markdown typography rendered by Astro Content Collections. */
2
2
  @layer components {
3
3
  .content-prose {
4
- @apply prose max-w-none prose-headings:scroll-mt-8 prose-a:text-primary prose-a:font-medium prose-a:decoration-2;
4
+ @apply prose max-w-none prose-headings:scroll-mt-8 prose-a:text-primary prose-a:font-semibold prose-a:decoration-2;
5
5
 
6
6
  a {
7
7
  @apply no-underline hover:underline;
8
8
  }
9
9
 
10
+ b,
11
+ strong {
12
+ font-weight: 600;
13
+ }
14
+
10
15
  h1 {
11
16
  font-size: var(--text-heading-1);
12
17
  @apply mb-5 font-bold;
@@ -15,6 +15,7 @@
15
15
  @import './foundation/fonts.css';
16
16
  @import './foundation/tokens.css';
17
17
  @import './foundation/base.css';
18
+ @import './foundation/links.css';
18
19
  @import './foundation/prose.css';
19
20
  @import './foundation/focus.css';
20
21
  @import './foundation/layout.css';
@@ -37,6 +38,8 @@
37
38
  @import '../components/molecules/ContentTable/ContentTable.css';
38
39
  @import '../components/molecules/Card/Card.css';
39
40
  @import '../components/molecules/Feature/Feature.css';
41
+ @import '../components/molecules/LegalIdentity/LegalIdentity.css';
42
+ @import '../components/molecules/PrivacyInfrastructure/PrivacyInfrastructure.css';
40
43
  @import '../components/molecules/Accordion/Accordion.css';
41
44
  @import '../components/molecules/AccordionItem/AccordionItem.css';
42
45
  @import '../components/molecules/CardActions/CardActions.css';
@@ -0,0 +1,30 @@
1
+ # CC0 1.0 Universal
2
+
3
+ ## Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an “owner”) of an original work of authorship and/or a database (each, a “Work”).
6
+
7
+ Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works (“Commons”) that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
8
+
9
+ For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the “Affirmer”), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
10
+
11
+ 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights (“Copyright and Related Rights”). Copyright and Related Rights include, but are not limited to, the following:
12
+ 1. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
13
+ 2. moral rights retained by the original author(s) and/or performer(s);
14
+ 3. publicity and privacy rights pertaining to a person’s image or likeness depicted in a Work;
15
+ 4. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(i), below;
16
+ 5. rights protecting the extraction, dissemination, use and reuse of data in a Work;
17
+ 6. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
18
+ 7. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
19
+
20
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer’s heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer’s express Statement of Purpose.
21
+
22
+ 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “License”). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer’s express Statement of Purpose.
23
+
24
+ 4. Limitations and Disclaimers.
25
+ 1. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
26
+ 2. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
27
+ 3. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
28
+ 4. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
29
+
30
+ For more information, please see <https://creativecommons.org/publicdomain/zero/1.0>.