ferst-core 0.9.2 → 0.9.4
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/components/Button.astro +8 -8
- package/components/CalendarEmbed.astro +1 -1
- package/components/CookieBanner.astro +1 -1
- package/components/PostsFilter.astro +1 -1
- package/components/SiteFooter.astro +1 -0
- package/components/SiteHeader.astro +1 -1
- package/components/StickyCallout.astro +1 -1
- package/components/recipes/Announcement.astro +1 -1
- package/components/recipes/Bento.astro +4 -2
- package/components/recipes/Hero.astro +533 -533
- package/components/recipes/LatestPosts.astro +1 -1
- package/components/recipes/LinkRow.astro +3 -1
- package/components/recipes/Locations.astro +1 -1
- package/components/recipes/MapEmbed.astro +1 -1
- package/components/recipes/Pricing.astro +1 -1
- package/components/recipes/Steps.astro +1 -1
- package/components/recipes/Tiles.astro +4 -2
- package/components/recipes/Video.astro +1 -1
- package/content/accessibility.ts +62 -0
- package/content/schemas.ts +2 -1
- package/integration.mjs +39 -3
- package/layouts/Base.astro +17 -2
- package/lib/contrast.ts +146 -0
- package/lib/pages.ts +18 -0
- package/lib/seo.mjs +16 -0
- package/lib/structured-data.mjs +37 -11
- package/lib/themeDefaults.ts +15 -0
- package/lib/themeTokens.ts +11 -9
- package/package.json +1 -1
- package/routes/accessibility.astro +44 -0
- package/styles/theme.css +2 -0
package/components/Button.astro
CHANGED
|
@@ -94,13 +94,13 @@ const {
|
|
|
94
94
|
.btn--primary {
|
|
95
95
|
background: var(--gold);
|
|
96
96
|
border-color: var(--gold);
|
|
97
|
-
color: var(--
|
|
97
|
+
color: var(--on-brand);
|
|
98
98
|
}
|
|
99
99
|
.btn--primary:hover,
|
|
100
100
|
.btn--primary:focus-visible {
|
|
101
101
|
background: color-mix(in srgb, var(--gold) 85%, #000);
|
|
102
102
|
border-color: color-mix(in srgb, var(--gold) 85%, #000);
|
|
103
|
-
color: var(--
|
|
103
|
+
color: var(--on-brand);
|
|
104
104
|
}
|
|
105
105
|
.btn--primary:focus-visible {
|
|
106
106
|
outline: 2px solid var(--gold);
|
|
@@ -122,7 +122,7 @@ const {
|
|
|
122
122
|
darkens the accent via color-mix, which works for any brand colour. */
|
|
123
123
|
.btn--cta {
|
|
124
124
|
background: var(--gold);
|
|
125
|
-
color: var(--
|
|
125
|
+
color: var(--on-brand);
|
|
126
126
|
border: none;
|
|
127
127
|
border-radius: 8px;
|
|
128
128
|
font-family: var(--font-body);
|
|
@@ -145,11 +145,11 @@ const {
|
|
|
145
145
|
|
|
146
146
|
.btn--cta:hover {
|
|
147
147
|
background: color-mix(in srgb, var(--gold) 85%, #000);
|
|
148
|
-
color: var(--
|
|
148
|
+
color: var(--on-brand);
|
|
149
149
|
}
|
|
150
150
|
.btn--cta:focus-visible {
|
|
151
151
|
background: color-mix(in srgb, var(--gold) 85%, #000);
|
|
152
|
-
color: var(--
|
|
152
|
+
color: var(--on-brand);
|
|
153
153
|
outline: 2px solid var(--gold);
|
|
154
154
|
outline-offset: 2px;
|
|
155
155
|
}
|
|
@@ -161,7 +161,7 @@ const {
|
|
|
161
161
|
margin-top: auto;
|
|
162
162
|
align-self: var(--content-self, flex-start);
|
|
163
163
|
background: var(--gold);
|
|
164
|
-
color: var(--
|
|
164
|
+
color: var(--on-brand);
|
|
165
165
|
border: none;
|
|
166
166
|
border-radius: 8px;
|
|
167
167
|
font-family: var(--font-body);
|
|
@@ -184,11 +184,11 @@ const {
|
|
|
184
184
|
|
|
185
185
|
.btn--compact:hover {
|
|
186
186
|
background: color-mix(in srgb, var(--gold) 85%, #000);
|
|
187
|
-
color: var(--
|
|
187
|
+
color: var(--on-brand);
|
|
188
188
|
}
|
|
189
189
|
.btn--compact:focus-visible {
|
|
190
190
|
background: color-mix(in srgb, var(--gold) 85%, #000);
|
|
191
|
-
color: var(--
|
|
191
|
+
color: var(--on-brand);
|
|
192
192
|
outline: 2px solid var(--gold);
|
|
193
193
|
outline-offset: 2px;
|
|
194
194
|
}
|
|
@@ -120,7 +120,7 @@ const { policyHref = '/cookie-policy/' } = Astro.props;
|
|
|
120
120
|
.cookie-banner__btn--primary {
|
|
121
121
|
border: none;
|
|
122
122
|
background: var(--gold);
|
|
123
|
-
color: var(--
|
|
123
|
+
color: var(--on-brand);
|
|
124
124
|
}
|
|
125
125
|
.cookie-banner__btn--primary:hover { filter: brightness(0.94); }
|
|
126
126
|
.cookie-banner__btn--ghost {
|
|
@@ -85,6 +85,7 @@ const year = new Date().getFullYear();
|
|
|
85
85
|
{footerLinks.map((link) => (
|
|
86
86
|
<a href={link.href} set:html={link.label} />
|
|
87
87
|
))}
|
|
88
|
+
{import.meta.env.FERST_ROUTES_ACCESSIBILITY !== false && <a href="/accessibility/">Accessibility</a>}
|
|
88
89
|
<button type="button" id="footer-cookie-preferences">Cookie preferences</button>
|
|
89
90
|
</nav>
|
|
90
91
|
<p class="footer-copy">© {year} All rights reserved.</p>
|
|
@@ -398,7 +398,7 @@ const primaryNavLongestMatch = Math.max(-1, ...primaryNavMatchLengths);
|
|
|
398
398
|
white-space: nowrap;
|
|
399
399
|
}
|
|
400
400
|
.nav-cta:hover,
|
|
401
|
-
.nav-cta.active { background: color-mix(in srgb, var(--gold) 85%, #000); color: var(--
|
|
401
|
+
.nav-cta.active { background: color-mix(in srgb, var(--gold) 85%, #000); color: var(--on-brand); border: none; }
|
|
402
402
|
[data-theme="dark"] .nav-cta { background: var(--gold); color: var(--dark-bg); border: none; }
|
|
403
403
|
[data-theme="dark"] .nav-cta:hover,
|
|
404
404
|
[data-theme="dark"] .nav-cta.active { background: color-mix(in srgb, var(--gold) 85%, #fff); color: var(--dark-bg); border: none; }
|
|
@@ -111,7 +111,7 @@ const paras = text.split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
|
|
111
111
|
gap: 0.5rem;
|
|
112
112
|
padding: 0.6rem 1.05rem;
|
|
113
113
|
background: var(--gold);
|
|
114
|
-
color: var(--
|
|
114
|
+
color: var(--on-brand);
|
|
115
115
|
border-radius: 999px;
|
|
116
116
|
box-shadow: var(--shadow-md);
|
|
117
117
|
cursor: pointer;
|
|
@@ -33,7 +33,7 @@ const key = `ferst-dismissed-${id}`;
|
|
|
33
33
|
font-size: 0.9rem;
|
|
34
34
|
text-align: center;
|
|
35
35
|
}
|
|
36
|
-
.b-announce[data-tone='accent'] { background: var(--gold); color: var(--
|
|
36
|
+
.b-announce[data-tone='accent'] { background: var(--gold); color: var(--on-brand); }
|
|
37
37
|
.b-announce[data-tone='neutral'] { background: var(--bg-section); color: var(--fg); }
|
|
38
38
|
.b-announce__text { margin: 0; line-height: 1.4; }
|
|
39
39
|
.b-announce__link {
|
|
@@ -23,6 +23,8 @@ interface Props {
|
|
|
23
23
|
items?: Item[];
|
|
24
24
|
}
|
|
25
25
|
const { title, intro, items = [] } = Astro.props;
|
|
26
|
+
// Headings stay in order: items sit one level under the block's title, or take its place.
|
|
27
|
+
const ItemHeading = title ? 'h3' : 'h2';
|
|
26
28
|
// Alignment overrides (BlockLayout): the title + intro default to centred; the block's
|
|
27
29
|
// own `align`, or `headingAlign` for the title alone, overrides it from the page data.
|
|
28
30
|
const { align: blockAlign, headingAlign } = Astro.props as { align?: 'start' | 'center' | 'end'; headingAlign?: 'start' | 'center' | 'end' };
|
|
@@ -46,7 +48,7 @@ const headAlign = headingAlign ?? blockAlign ?? 'center';
|
|
|
46
48
|
<span class="b-bento__icon"><Icon name={item.icon} size={24} /></span>
|
|
47
49
|
)}
|
|
48
50
|
{item.eyebrow && <span class="b-bento__eyebrow">{item.eyebrow}</span>}
|
|
49
|
-
<
|
|
51
|
+
<ItemHeading class="b-bento__title">{item.title}</ItemHeading>
|
|
50
52
|
{item.text && <p class="b-bento__text">{item.text}</p>}
|
|
51
53
|
</Tag>
|
|
52
54
|
);
|
|
@@ -106,7 +108,7 @@ const headAlign = headingAlign ?? blockAlign ?? 'center';
|
|
|
106
108
|
}
|
|
107
109
|
.b-bento__item[data-variant='surface'] { background: var(--bg-surface); border: var(--card-border); box-shadow: var(--shadow-md); }
|
|
108
110
|
.b-bento__item[data-variant='filled'] { background: var(--gold-light); }
|
|
109
|
-
.b-bento__item[data-variant='gradient'] { background: linear-gradient(135deg, var(--gold), var(--accent-2, var(--gold))); color: var(--
|
|
111
|
+
.b-bento__item[data-variant='gradient'] { background: linear-gradient(135deg, var(--gold), var(--accent-2, var(--gold))); color: var(--on-brand); }
|
|
110
112
|
.b-bento__item[data-variant='image'] { color: #fff; justify-content: flex-end; min-height: 11rem; }
|
|
111
113
|
.b-bento__item[data-variant='image']::before {
|
|
112
114
|
content: '';
|