ferst-core 0.14.0 → 0.16.0

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 (62) hide show
  1. package/README.md +13 -4
  2. package/bin/ferst-media.mjs +96 -0
  3. package/cms/config.template.yml +11 -0
  4. package/components/Card.astro +53 -51
  5. package/components/PostCard.astro +138 -136
  6. package/components/SiteHeader.astro +1356 -1273
  7. package/components/blocks/Grid.astro +49 -48
  8. package/components/blocks/Heading.astro +4 -1
  9. package/components/recipes/Banner.astro +146 -146
  10. package/components/recipes/Book.astro +39 -4
  11. package/components/recipes/FeatureCards.astro +112 -118
  12. package/components/recipes/Gallery.astro +57 -59
  13. package/components/recipes/Hero.astro +638 -533
  14. package/components/recipes/LatestPosts.astro +295 -292
  15. package/components/recipes/Locations.astro +146 -143
  16. package/components/recipes/Marquee.astro +75 -75
  17. package/components/recipes/MediaCards.astro +213 -219
  18. package/components/recipes/Pricing.astro +149 -150
  19. package/components/recipes/Stats.astro +150 -157
  20. package/components/recipes/Tiles.astro +342 -296
  21. package/content/blocks.ts +1072 -1024
  22. package/content/imageSlots.mjs +542 -0
  23. package/content/schemas.ts +35 -2
  24. package/examples/recipes.ts +4 -0
  25. package/fonts/OFL.txt +1332 -287
  26. package/fonts/anton-latin-400-normal.woff2 +0 -0
  27. package/fonts/bangers-latin-400-normal.woff2 +0 -0
  28. package/fonts/bebas-neue-latin-400-normal.woff2 +0 -0
  29. package/fonts/bowlby-one-latin-400-normal.woff2 +0 -0
  30. package/fonts/fredoka-latin-400-normal.woff2 +0 -0
  31. package/fonts/fredoka-latin-600-normal.woff2 +0 -0
  32. package/fonts/fredoka-latin-700-normal.woff2 +0 -0
  33. package/fonts/knewave-latin-400-normal.woff2 +0 -0
  34. package/fonts/lora-latin-400-normal.woff2 +0 -0
  35. package/fonts/lora-latin-600-normal.woff2 +0 -0
  36. package/fonts/lora-latin-700-normal.woff2 +0 -0
  37. package/fonts/merriweather-latin-400-normal.woff2 +0 -0
  38. package/fonts/merriweather-latin-600-normal.woff2 +0 -0
  39. package/fonts/merriweather-latin-700-normal.woff2 +0 -0
  40. package/fonts/nunito-latin-400-normal.woff2 +0 -0
  41. package/fonts/nunito-latin-600-normal.woff2 +0 -0
  42. package/fonts/nunito-latin-700-normal.woff2 +0 -0
  43. package/fonts/oswald-latin-400-normal.woff2 +0 -0
  44. package/fonts/oswald-latin-600-normal.woff2 +0 -0
  45. package/fonts/oswald-latin-700-normal.woff2 +0 -0
  46. package/fonts/rubik-dirt-latin-400-normal.woff2 +0 -0
  47. package/integration.mjs +253 -249
  48. package/layouts/Base.astro +13 -3
  49. package/lib/book.ts +94 -1
  50. package/lib/fonts.ts +130 -0
  51. package/lib/gridRows.ts +197 -0
  52. package/lib/image-fields.ts +140 -0
  53. package/lib/image-size.mjs +108 -0
  54. package/lib/image-sizes.ts +16 -0
  55. package/lib/logo-header.ts +46 -0
  56. package/lib/media-check.mjs +524 -0
  57. package/lib/theme-preview.ts +203 -140
  58. package/lib/themeTokens.ts +235 -220
  59. package/package.json +3 -2
  60. package/styles/fonts.css +239 -76
  61. package/styles/theme.css +228 -160
  62. package/lib/gridColumns.ts +0 -22
@@ -1,292 +1,295 @@
1
- ---
2
- /**
3
- * LatestPosts — a Level-2 recipe that surfaces the posts capability inside a page:
4
- * the N most-recent published posts (optionally filtered to a tag), as a card grid
5
- * or a compact list, with a "view all" link. This is the block that bridges the
6
- * posts *capability* into the block *system*, so a homepage "Latest news" needs no
7
- * per-client custom code. The posts are queried at build time from the client's
8
- * own posts collection (empty state renders when there are none).
9
- */
10
- import PostCard from '../PostCard.astro';
11
- import Heading from '../blocks/Heading.astro';
12
- import Button from '../Button.astro';
13
- import { getIndexPosts, getPostsByTag } from '../../lib/posts';
14
- import { isRecent, postLink } from '../../content/posts';
15
-
16
- interface Props {
17
- title?: string;
18
- intro?: string;
19
- limit?: number;
20
- tag?: string;
21
- layout?: 'grid' | 'list';
22
- /** In the list layout, badge posts newer than this many days as "New" (0 = off). */
23
- newWithinDays?: number;
24
- viewAllHref?: string;
25
- viewAllLabel?: string;
26
- }
27
- const {
28
- title,
29
- intro,
30
- limit = 3,
31
- tag,
32
- layout = 'grid',
33
- newWithinDays = 14,
34
- viewAllHref = '/posts',
35
- viewAllLabel = 'All posts',
36
- } = Astro.props;
37
-
38
- const all = tag ? await getPostsByTag(tag) : await getIndexPosts();
39
- const posts = all.slice(0, Math.max(1, limit));
40
-
41
- const fmt = (date: Date | string) => {
42
- const d = date instanceof Date ? date : new Date(date);
43
- return Number.isNaN(d.valueOf())
44
- ? { iso: undefined as string | undefined, label: '' }
45
- : { iso: d.toISOString().slice(0, 10), label: d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }) };
46
- };
47
-
48
- // The "New" badge marks only the single most-recent post, and only if it was
49
- // published within `newWithinDays` of build time — so a site that posts often
50
- // doesn't end up flagging every row (which would make the badge meaningless).
51
- // Recomputed each build (a site rebuilds on publish, so it stays fresh); isRecent
52
- // lives in the pure posts module so it's unit-tested independently.
53
- const nowMs = Date.now();
54
- const isNew = (date: Date | string) => isRecent(date, newWithinDays, nowMs);
55
- ---
56
-
57
- <section class="b-latest-posts">
58
- {(title || intro) && (
59
- <div class="b-latest-posts__head">
60
- {title && <Heading text={title} level={2} />}
61
- {intro && <p class="b-latest-posts__intro">{intro}</p>}
62
- </div>
63
- )}
64
-
65
- {posts.length === 0 ? (
66
- <p class="b-latest-posts__empty">No posts yet.</p>
67
- ) : layout === 'list' ? (
68
- <ul class="b-latest-posts__list">
69
- {posts.map((p, i) => {
70
- const { iso, label } = fmt(p.data.date);
71
- const { href, newTab } = postLink(p);
72
- const cats = (p.data.tags ?? []).slice(0, 2);
73
- return (
74
- <li class="b-post-row">
75
- {p.data.heroImage && (
76
- <a class="b-post-row__media" href={href} target={newTab ? '_blank' : undefined} rel={newTab ? 'noopener' : undefined} tabindex="-1" aria-hidden="true">
77
- <img src={p.data.heroImage} alt="" loading="lazy" />
78
- </a>
79
- )}
80
- <div class="b-post-row__main">
81
- {cats.length > 0 && (
82
- <span class="b-post-row__cat">{cats.join(' · ')}</span>
83
- )}
84
- <h3 class="b-post-row__title"><a href={href} target={newTab ? '_blank' : undefined} rel={newTab ? 'noopener' : undefined}>{p.data.title}</a></h3>
85
- </div>
86
- <div class="b-post-row__aside">
87
- {i === 0 && isNew(p.data.date) && <span class="b-post-row__new">New</span>}
88
- {label && <time class="b-post-row__date" datetime={iso}>{label}</time>}
89
- <span class="b-post-row__chevron" aria-hidden="true">&rsaquo;</span>
90
- </div>
91
- </li>
92
- );
93
- })}
94
- </ul>
95
- ) : (
96
- <div class="b-latest-posts__grid">
97
- {posts.map((p) => {
98
- const { href, newTab } = postLink(p);
99
- return (
100
- <PostCard
101
- href={href}
102
- newTab={newTab}
103
- moreLabel={newTab ? 'Open PDF' : undefined}
104
- title={p.data.title}
105
- date={p.data.date}
106
- summary={p.data.summary}
107
- heroImage={p.data.heroImage}
108
- tagLabels={p.data.tags}
109
- />
110
- );
111
- })}
112
- </div>
113
- )}
114
-
115
- {posts.length > 0 && viewAllHref && (
116
- <div class="b-latest-posts__more">
117
- <Button href={viewAllHref} variant="secondary" size="sm">{viewAllLabel}</Button>
118
- </div>
119
- )}
120
- </section>
121
-
122
- <style>
123
- .b-latest-posts {
124
- display: flex;
125
- flex-direction: column;
126
- gap: 1.75rem;
127
- max-width: 72rem;
128
- margin-inline: auto;
129
- padding-inline: 1rem;
130
- }
131
- .b-latest-posts__head {
132
- display: flex;
133
- flex-direction: column;
134
- gap: 0.6rem;
135
- }
136
- .b-latest-posts__intro {
137
- margin: 0;
138
- color: var(--muted);
139
- font-size: 1.0625rem;
140
- line-height: 1.6;
141
- max-width: var(--max);
142
- }
143
- /* Grid — mirrors the posts index/tag layout (any image ratio cropped by PostCard). */
144
- .b-latest-posts__grid {
145
- display: grid;
146
- grid-template-columns: 1fr;
147
- gap: 1.5rem;
148
- }
149
- @media (min-width: 40em) {
150
- .b-latest-posts__grid { grid-template-columns: repeat(2, 1fr); }
151
- }
152
- @media (min-width: 60em) {
153
- .b-latest-posts__grid { grid-template-columns: repeat(3, 1fr); }
154
- }
155
- /* Compact miniature list — a thumbnail + category + title per row with the date
156
- (and an optional "New" badge) on the right, split by hairlines. Stays short
157
- however many posts it shows; the whole row is one click target. */
158
- .b-latest-posts__list {
159
- list-style: none;
160
- margin: 0;
161
- padding: 0;
162
- display: flex;
163
- flex-direction: column;
164
- }
165
- .b-post-row {
166
- position: relative;
167
- display: flex;
168
- align-items: center;
169
- gap: 1rem;
170
- padding: 0.85rem 0;
171
- border-top: 1px solid var(--border);
172
- }
173
- .b-post-row:first-child {
174
- border-top: 0;
175
- }
176
- /* Thumbnail — a small square, cover-cropped (never stretched). */
177
- .b-post-row__media {
178
- flex: 0 0 auto;
179
- display: block;
180
- width: 3.25rem;
181
- height: 3.25rem;
182
- border-radius: var(--radius-sm);
183
- overflow: hidden;
184
- background: var(--bg-section);
185
- }
186
- .b-post-row .b-post-row__media img {
187
- width: 100%;
188
- height: 100%;
189
- object-fit: cover;
190
- display: block;
191
- }
192
- .b-post-row__main {
193
- flex: 1 1 auto;
194
- min-width: 0;
195
- display: flex;
196
- flex-direction: column;
197
- gap: 0.25rem;
198
- }
199
- /* Category chip — the post's tags, joined, as a small brand-tinted pill. */
200
- .b-post-row__cat {
201
- align-self: var(--content-self, flex-start);
202
- max-width: 100%;
203
- padding: 0.1rem 0.5rem;
204
- border-radius: var(--radius-pill);
205
- background: var(--bg-tag);
206
- color: var(--muted);
207
- font-family: var(--font-heading);
208
- font-size: 0.66rem;
209
- font-weight: 700;
210
- letter-spacing: 0.06em;
211
- text-transform: uppercase;
212
- white-space: nowrap;
213
- overflow: hidden;
214
- text-overflow: ellipsis;
215
- }
216
- .b-post-row__title {
217
- margin: 0;
218
- font-size: 1.05rem;
219
- line-height: 1.35;
220
- }
221
- .b-post-row__title a {
222
- color: var(--fg);
223
- font-family: var(--font-heading);
224
- font-weight: 600;
225
- }
226
- .b-post-row:hover .b-post-row__title a {
227
- color: var(--gold);
228
- }
229
- /* Stretch the title link across the whole row so any part of it is clickable. */
230
- .b-post-row__title a::after {
231
- content: '';
232
- position: absolute;
233
- inset: 0;
234
- }
235
- .b-post-row__aside {
236
- flex: 0 0 auto;
237
- display: flex;
238
- align-items: center;
239
- gap: 0.6rem 0.8rem;
240
- }
241
- .b-post-row__new {
242
- padding: 0.12rem 0.45rem;
243
- border-radius: var(--radius-pill);
244
- background: var(--gold);
245
- color: var(--on-brand);
246
- font-family: var(--font-heading);
247
- font-size: 0.62rem;
248
- font-weight: 700;
249
- letter-spacing: 0.06em;
250
- text-transform: uppercase;
251
- }
252
- .b-post-row__date {
253
- color: var(--muted);
254
- font-size: 0.85rem;
255
- white-space: nowrap;
256
- font-variant-numeric: tabular-nums;
257
- }
258
- .b-post-row__chevron {
259
- color: var(--muted);
260
- font-size: 1.25rem;
261
- line-height: 1;
262
- }
263
- .b-post-row:hover .b-post-row__chevron {
264
- color: var(--gold);
265
- }
266
- /* On narrow screens keep the title on the left and let the date tuck under the
267
- "New" badge if needed; the chevron drops (touch targets are the whole row). */
268
- @media (max-width: 30rem) {
269
- .b-post-row__chevron {
270
- display: none;
271
- }
272
- .b-post-row__aside {
273
- flex-direction: column;
274
- align-items: flex-end;
275
- gap: 0.25rem;
276
- }
277
- }
278
- .b-latest-posts__empty {
279
- margin: 0;
280
- color: var(--muted);
281
- }
282
- .b-latest-posts__more {
283
- display: flex;
284
- }
285
- /* Follow the page's content-alignment for the "view all" action. */
286
- :global([data-content-align='center']) .b-latest-posts__more {
287
- justify-content: center;
288
- }
289
- :global([data-content-align='end']) .b-latest-posts__more {
290
- justify-content: flex-end;
291
- }
292
- </style>
1
+ ---
2
+ /**
3
+ * LatestPosts — a Level-2 recipe that surfaces the posts capability inside a page:
4
+ * the N most-recent published posts (optionally filtered to a tag), as a card grid
5
+ * or a compact list, with a "view all" link. This is the block that bridges the
6
+ * posts *capability* into the block *system*, so a homepage "Latest news" needs no
7
+ * per-client custom code. The posts are queried at build time from the client's
8
+ * own posts collection (empty state renders when there are none).
9
+ */
10
+ import PostCard from '../PostCard.astro';
11
+ import Heading from '../blocks/Heading.astro';
12
+ import Button from '../Button.astro';
13
+ import { getIndexPosts, getPostsByTag } from '../../lib/posts';
14
+ import { isRecent, postLink } from '../../content/posts';
15
+ import { planGrid } from '../../lib/gridRows';
16
+
17
+ interface Props {
18
+ title?: string;
19
+ intro?: string;
20
+ limit?: number;
21
+ tag?: string;
22
+ layout?: 'grid' | 'list';
23
+ /** In the list layout, badge posts newer than this many days as "New" (0 = off). */
24
+ newWithinDays?: number;
25
+ viewAllHref?: string;
26
+ viewAllLabel?: string;
27
+ /** How the ragged last row lays out (lib/gridRows). */
28
+ lastRow?: 'auto' | 'fill' | 'center';
29
+ }
30
+ const {
31
+ title,
32
+ intro,
33
+ limit = 3,
34
+ tag,
35
+ layout = 'grid',
36
+ newWithinDays = 14,
37
+ viewAllHref = '/posts',
38
+ viewAllLabel = 'All posts',
39
+ lastRow = 'auto',
40
+ } = Astro.props;
41
+
42
+ const all = tag ? await getPostsByTag(tag) : await getIndexPosts();
43
+ const posts = all.slice(0, Math.max(1, limit));
44
+ // The grid layout's rows, planned per screen (lib/gridRows): up to three cards to a row.
45
+ const rows = planGrid(posts.length, { columns: 3, item: 'latestPosts', lastRow });
46
+
47
+ const fmt = (date: Date | string) => {
48
+ const d = date instanceof Date ? date : new Date(date);
49
+ return Number.isNaN(d.valueOf())
50
+ ? { iso: undefined as string | undefined, label: '' }
51
+ : { iso: d.toISOString().slice(0, 10), label: d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }) };
52
+ };
53
+
54
+ // The "New" badge marks only the single most-recent post, and only if it was
55
+ // published within `newWithinDays` of build time — so a site that posts often
56
+ // doesn't end up flagging every row (which would make the badge meaningless).
57
+ // Recomputed each build (a site rebuilds on publish, so it stays fresh); isRecent
58
+ // lives in the pure posts module so it's unit-tested independently.
59
+ const nowMs = Date.now();
60
+ const isNew = (date: Date | string) => isRecent(date, newWithinDays, nowMs);
61
+ ---
62
+
63
+ <section class="b-latest-posts">
64
+ {(title || intro) && (
65
+ <div class="b-latest-posts__head">
66
+ {title && <Heading text={title} level={2} />}
67
+ {intro && <p class="b-latest-posts__intro">{intro}</p>}
68
+ </div>
69
+ )}
70
+
71
+ {posts.length === 0 ? (
72
+ <p class="b-latest-posts__empty">No posts yet.</p>
73
+ ) : layout === 'list' ? (
74
+ <ul class="b-latest-posts__list">
75
+ {posts.map((p, i) => {
76
+ const { iso, label } = fmt(p.data.date);
77
+ const { href, newTab } = postLink(p);
78
+ const cats = (p.data.tags ?? []).slice(0, 2);
79
+ return (
80
+ <li class="b-post-row">
81
+ {p.data.heroImage && (
82
+ <a class="b-post-row__media" href={href} target={newTab ? '_blank' : undefined} rel={newTab ? 'noopener' : undefined} tabindex="-1" aria-hidden="true">
83
+ <img src={p.data.heroImage} alt="" loading="lazy" />
84
+ </a>
85
+ )}
86
+ <div class="b-post-row__main">
87
+ {cats.length > 0 && (
88
+ <span class="b-post-row__cat">{cats.join(' · ')}</span>
89
+ )}
90
+ <h3 class="b-post-row__title"><a href={href} target={newTab ? '_blank' : undefined} rel={newTab ? 'noopener' : undefined}>{p.data.title}</a></h3>
91
+ </div>
92
+ <div class="b-post-row__aside">
93
+ {i === 0 && isNew(p.data.date) && <span class="b-post-row__new">New</span>}
94
+ {label && <time class="b-post-row__date" datetime={iso}>{label}</time>}
95
+ <span class="b-post-row__chevron" aria-hidden="true">&rsaquo;</span>
96
+ </div>
97
+ </li>
98
+ );
99
+ })}
100
+ </ul>
101
+ ) : (
102
+ <div class="b-latest-posts__grid ferst-rows" data-cols={rows.cols} style={rows.gridStyle}>
103
+ {posts.map((p, i) => {
104
+ const { href, newTab } = postLink(p);
105
+ return (
106
+ <PostCard
107
+ href={href}
108
+ newTab={newTab}
109
+ moreLabel={newTab ? 'Open PDF' : undefined}
110
+ title={p.data.title}
111
+ date={p.data.date}
112
+ summary={p.data.summary}
113
+ heroImage={p.data.heroImage}
114
+ tagLabels={p.data.tags}
115
+ style={rows.itemStyles[i]}
116
+ />
117
+ );
118
+ })}
119
+ </div>
120
+ )}
121
+
122
+ {posts.length > 0 && viewAllHref && (
123
+ <div class="b-latest-posts__more">
124
+ <Button href={viewAllHref} variant="secondary" size="sm">{viewAllLabel}</Button>
125
+ </div>
126
+ )}
127
+ </section>
128
+
129
+ <style>
130
+ .b-latest-posts {
131
+ display: flex;
132
+ flex-direction: column;
133
+ gap: 1.75rem;
134
+ width: 100%; /* the full content width, whatever its items hold (lib/gridRows) */
135
+ max-width: 72rem;
136
+ margin-inline: auto;
137
+ padding-inline: 1rem;
138
+ }
139
+ .b-latest-posts__head {
140
+ display: flex;
141
+ flex-direction: column;
142
+ gap: 0.6rem;
143
+ }
144
+ .b-latest-posts__intro {
145
+ margin: 0;
146
+ color: var(--muted);
147
+ font-size: 1.0625rem;
148
+ line-height: 1.6;
149
+ max-width: var(--max);
150
+ }
151
+ /* Grid — mirrors the posts index/tag layout (any image ratio cropped by PostCard). */
152
+ .b-latest-posts__grid {
153
+ display: grid;
154
+ gap: 1.5rem;
155
+ }
156
+ /* Rows come from lib/gridRows (the global .ferst-rows rules): even rows where the
157
+ count allows by using fewer columns, else full rows and a tidied last row. */
158
+ /* Compact miniature list — a thumbnail + category + title per row with the date
159
+ (and an optional "New" badge) on the right, split by hairlines. Stays short
160
+ however many posts it shows; the whole row is one click target. */
161
+ .b-latest-posts__list {
162
+ list-style: none;
163
+ margin: 0;
164
+ padding: 0;
165
+ display: flex;
166
+ flex-direction: column;
167
+ }
168
+ .b-post-row {
169
+ position: relative;
170
+ display: flex;
171
+ align-items: center;
172
+ gap: 1rem;
173
+ padding: 0.85rem 0;
174
+ border-top: 1px solid var(--border);
175
+ }
176
+ .b-post-row:first-child {
177
+ border-top: 0;
178
+ }
179
+ /* Thumbnail — a small square, cover-cropped (never stretched). */
180
+ .b-post-row__media {
181
+ flex: 0 0 auto;
182
+ display: block;
183
+ width: 3.25rem;
184
+ height: 3.25rem;
185
+ border-radius: var(--radius-sm);
186
+ overflow: hidden;
187
+ background: var(--bg-section);
188
+ }
189
+ .b-post-row .b-post-row__media img {
190
+ width: 100%;
191
+ height: 100%;
192
+ object-fit: cover;
193
+ display: block;
194
+ }
195
+ .b-post-row__main {
196
+ flex: 1 1 auto;
197
+ min-width: 0;
198
+ display: flex;
199
+ flex-direction: column;
200
+ gap: 0.25rem;
201
+ }
202
+ /* Category chip — the post's tags, joined, as a small brand-tinted pill. */
203
+ .b-post-row__cat {
204
+ align-self: var(--content-self, flex-start);
205
+ max-width: 100%;
206
+ padding: 0.1rem 0.5rem;
207
+ border-radius: var(--radius-pill);
208
+ background: var(--bg-tag);
209
+ color: var(--muted);
210
+ font-family: var(--font-heading);
211
+ font-size: 0.66rem;
212
+ font-weight: 700;
213
+ letter-spacing: 0.06em;
214
+ text-transform: uppercase;
215
+ white-space: nowrap;
216
+ overflow: hidden;
217
+ text-overflow: ellipsis;
218
+ }
219
+ .b-post-row__title {
220
+ margin: 0;
221
+ font-size: 1.05rem;
222
+ line-height: 1.35;
223
+ }
224
+ .b-post-row__title a {
225
+ color: var(--fg);
226
+ font-family: var(--font-heading);
227
+ font-weight: 600;
228
+ }
229
+ .b-post-row:hover .b-post-row__title a {
230
+ color: var(--gold);
231
+ }
232
+ /* Stretch the title link across the whole row so any part of it is clickable. */
233
+ .b-post-row__title a::after {
234
+ content: '';
235
+ position: absolute;
236
+ inset: 0;
237
+ }
238
+ .b-post-row__aside {
239
+ flex: 0 0 auto;
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 0.6rem 0.8rem;
243
+ }
244
+ .b-post-row__new {
245
+ padding: 0.12rem 0.45rem;
246
+ border-radius: var(--radius-pill);
247
+ background: var(--gold);
248
+ color: var(--on-brand);
249
+ font-family: var(--font-heading);
250
+ font-size: 0.62rem;
251
+ font-weight: 700;
252
+ letter-spacing: 0.06em;
253
+ text-transform: uppercase;
254
+ }
255
+ .b-post-row__date {
256
+ color: var(--muted);
257
+ font-size: 0.85rem;
258
+ white-space: nowrap;
259
+ font-variant-numeric: tabular-nums;
260
+ }
261
+ .b-post-row__chevron {
262
+ color: var(--muted);
263
+ font-size: 1.25rem;
264
+ line-height: 1;
265
+ }
266
+ .b-post-row:hover .b-post-row__chevron {
267
+ color: var(--gold);
268
+ }
269
+ /* On narrow screens keep the title on the left and let the date tuck under the
270
+ "New" badge if needed; the chevron drops (touch targets are the whole row). */
271
+ @media (max-width: 30rem) {
272
+ .b-post-row__chevron {
273
+ display: none;
274
+ }
275
+ .b-post-row__aside {
276
+ flex-direction: column;
277
+ align-items: flex-end;
278
+ gap: 0.25rem;
279
+ }
280
+ }
281
+ .b-latest-posts__empty {
282
+ margin: 0;
283
+ color: var(--muted);
284
+ }
285
+ .b-latest-posts__more {
286
+ display: flex;
287
+ }
288
+ /* Follow the page's content-alignment for the "view all" action. */
289
+ :global([data-content-align='center']) .b-latest-posts__more {
290
+ justify-content: center;
291
+ }
292
+ :global([data-content-align='end']) .b-latest-posts__more {
293
+ justify-content: flex-end;
294
+ }
295
+ </style>