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.
@@ -94,13 +94,13 @@ const {
94
94
  .btn--primary {
95
95
  background: var(--gold);
96
96
  border-color: var(--gold);
97
- color: var(--text-light);
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(--text-light);
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(--text-light);
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(--text-light);
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(--text-light);
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(--text-light);
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(--text-light);
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(--text-light);
191
+ color: var(--on-brand);
192
192
  outline: 2px solid var(--gold);
193
193
  outline-offset: 2px;
194
194
  }
@@ -171,7 +171,7 @@ const safe = isSafeEmbedUrl(finalEmbedUrl);
171
171
  border: none;
172
172
  border-radius: var(--radius-sm);
173
173
  background: var(--gold);
174
- color: var(--text-light);
174
+ color: var(--on-brand);
175
175
  cursor: pointer;
176
176
  transition: filter 0.15s ease;
177
177
  }
@@ -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(--text-light);
123
+ color: var(--on-brand);
124
124
  }
125
125
  .cookie-banner__btn--primary:hover { filter: brightness(0.94); }
126
126
  .cookie-banner__btn--ghost {
@@ -64,7 +64,7 @@ const { tags, active } = Astro.props;
64
64
  .posts-filter__chip.is-active {
65
65
  background: var(--gold);
66
66
  border-color: var(--gold);
67
- color: var(--text-light);
67
+ color: var(--on-brand);
68
68
  }
69
69
  .posts-filter__count {
70
70
  font-size: 0.75em;
@@ -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">&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(--text-light); border: none; }
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(--text-light);
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(--text-light); }
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
- <h3 class="b-bento__title">{item.title}</h3>
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(--text-light); }
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: '';