ferst-core 0.15.0 → 0.17.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.
- package/NOTICE +63 -31
- package/README.md +13 -4
- package/bin/ferst-media.mjs +96 -0
- package/bin/ferst-modules.mjs +17 -2
- package/components/BlockRenderer.astro +131 -129
- package/components/Card.astro +53 -51
- package/components/MembersAccount.astro +370 -0
- package/components/PostCard.astro +138 -136
- package/components/SiteHeader.astro +32 -14
- package/components/blocks/Grid.astro +49 -48
- package/components/blocks/Heading.astro +4 -1
- package/components/islands/BookMonth.tsx +95 -0
- package/components/islands/MembersAccount.tsx +392 -0
- package/components/recipes/Banner.astro +146 -146
- package/components/recipes/Book.astro +1147 -926
- package/components/recipes/FeatureCards.astro +112 -118
- package/components/recipes/Gallery.astro +57 -59
- package/components/recipes/Hero.astro +112 -10
- package/components/recipes/LatestPosts.astro +295 -292
- package/components/recipes/Locations.astro +146 -143
- package/components/recipes/Marquee.astro +75 -75
- package/components/recipes/MediaCards.astro +213 -219
- package/components/recipes/MembersContent.astro +176 -0
- package/components/recipes/Pricing.astro +149 -150
- package/components/recipes/Stats.astro +150 -157
- package/components/recipes/Tiles.astro +342 -296
- package/content/blocks.ts +1091 -1024
- package/content/cookies.ts +14 -0
- package/content/imageSlots.mjs +542 -0
- package/content/recipe-questions.ts +81 -80
- package/content/schemas.ts +13 -11
- package/examples/recipes.ts +5 -0
- package/fonts/OFL.txt +1332 -287
- package/fonts/anton-latin-400-normal.woff2 +0 -0
- package/fonts/bangers-latin-400-normal.woff2 +0 -0
- package/fonts/bebas-neue-latin-400-normal.woff2 +0 -0
- package/fonts/bowlby-one-latin-400-normal.woff2 +0 -0
- package/fonts/fredoka-latin-400-normal.woff2 +0 -0
- package/fonts/fredoka-latin-600-normal.woff2 +0 -0
- package/fonts/fredoka-latin-700-normal.woff2 +0 -0
- package/fonts/knewave-latin-400-normal.woff2 +0 -0
- package/fonts/lora-latin-400-normal.woff2 +0 -0
- package/fonts/lora-latin-600-normal.woff2 +0 -0
- package/fonts/lora-latin-700-normal.woff2 +0 -0
- package/fonts/merriweather-latin-400-normal.woff2 +0 -0
- package/fonts/merriweather-latin-600-normal.woff2 +0 -0
- package/fonts/merriweather-latin-700-normal.woff2 +0 -0
- package/fonts/nunito-latin-400-normal.woff2 +0 -0
- package/fonts/nunito-latin-600-normal.woff2 +0 -0
- package/fonts/nunito-latin-700-normal.woff2 +0 -0
- package/fonts/oswald-latin-400-normal.woff2 +0 -0
- package/fonts/oswald-latin-600-normal.woff2 +0 -0
- package/fonts/oswald-latin-700-normal.woff2 +0 -0
- package/fonts/rubik-dirt-latin-400-normal.woff2 +0 -0
- package/integration.mjs +319 -263
- package/layouts/Base.astro +8 -16
- package/lib/book.ts +416 -378
- package/lib/fonts.ts +130 -0
- package/lib/gridRows.ts +197 -0
- package/lib/image-fields.ts +140 -0
- package/lib/image-size.mjs +108 -73
- package/lib/image-sizes.ts +16 -0
- package/lib/logo-header.ts +46 -0
- package/lib/media-check.mjs +524 -0
- package/lib/members-account.ts +276 -0
- package/lib/members.ts +115 -0
- package/lib/theme-preview.ts +203 -140
- package/lib/themeTokens.ts +235 -220
- package/package.json +80 -71
- package/routes/account.astro +16 -0
- package/routes/cookie-policy.astro +28 -28
- package/styles/fonts.css +239 -76
- package/styles/theme.css +228 -160
- 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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<div class="b-post-
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
.b-latest-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
border-top:
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
flex
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
text-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
.b-post-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
:global([data-content-align='
|
|
290
|
-
justify-content:
|
|
291
|
-
}
|
|
292
|
-
|
|
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">›</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>
|