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
package/styles/fonts.css CHANGED
@@ -1,76 +1,239 @@
1
- /* Self-hosted fonts — see scripts/setup-fonts.mjs for how public/fonts/ gets
2
- populated (from @fontsource, regenerated on `npm install`, gitignored).
3
- Loaded same-origin instead of from fonts.googleapis.com/fonts.gstatic.com
4
- so visiting this site no longer sends every visitor's IP to Google on
5
- every page (see /cookie-policy/). Latin subset, normal style only —
6
- every weight below is one actually referenced somewhere in src/; no
7
- unicode-range needed since each file ships exactly one subset.
8
-
9
- Inter, Playfair Display, and Poppins are all SIL Open Font License 1.1 —
10
- self-hosting/redistribution is explicitly permitted. */
11
-
12
- @font-face {
13
- font-family: 'Inter';
14
- font-style: normal;
15
- font-weight: 400;
16
- font-display: swap;
17
- src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
18
- }
19
- @font-face {
20
- font-family: 'Inter';
21
- font-style: normal;
22
- font-weight: 500;
23
- font-display: swap;
24
- src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
25
- }
26
- @font-face {
27
- font-family: 'Inter';
28
- font-style: normal;
29
- font-weight: 600;
30
- font-display: swap;
31
- src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
32
- }
33
-
34
- @font-face {
35
- font-family: 'Playfair Display';
36
- font-style: normal;
37
- font-weight: 700;
38
- font-display: swap;
39
- src: url('/fonts/playfair-display-latin-700-normal.woff2') format('woff2');
40
- }
41
-
42
- @font-face {
43
- font-family: 'Poppins';
44
- font-style: normal;
45
- font-weight: 300;
46
- font-display: swap;
47
- src: url('/fonts/poppins-latin-300-normal.woff2') format('woff2');
48
- }
49
- @font-face {
50
- font-family: 'Poppins';
51
- font-style: normal;
52
- font-weight: 400;
53
- font-display: swap;
54
- src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2');
55
- }
56
- @font-face {
57
- font-family: 'Poppins';
58
- font-style: normal;
59
- font-weight: 500;
60
- font-display: swap;
61
- src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2');
62
- }
63
- @font-face {
64
- font-family: 'Poppins';
65
- font-style: normal;
66
- font-weight: 600;
67
- font-display: swap;
68
- src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2');
69
- }
70
- @font-face {
71
- font-family: 'Poppins';
72
- font-style: normal;
73
- font-weight: 700;
74
- font-display: swap;
75
- src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2');
76
- }
1
+ /* Self-hosted fonts. The files ship in the package (fonts/, from @fontsource) and the
2
+ ferst() integration serves them in dev and copies them into every build's /fonts/.
3
+ Loaded same-origin instead of from fonts.googleapis.com/fonts.gstatic.com
4
+ so visiting this site no longer sends every visitor's IP to Google on
5
+ every page (see /cookie-policy/). Latin subset, normal style only; no
6
+ unicode-range needed since each file ships exactly one subset.
7
+
8
+ Every face here is in lib/fonts.ts (the one list theme pickers read), and the tests
9
+ hold this file and that list to each other. All are SIL Open Font License 1.1, so
10
+ self-hosting and redistribution are permitted (fonts/OFL.txt). */
11
+
12
+ @font-face {
13
+ font-family: 'Inter';
14
+ font-style: normal;
15
+ font-weight: 400;
16
+ font-display: swap;
17
+ src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
18
+ }
19
+ @font-face {
20
+ font-family: 'Inter';
21
+ font-style: normal;
22
+ font-weight: 500;
23
+ font-display: swap;
24
+ src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
25
+ }
26
+ @font-face {
27
+ font-family: 'Inter';
28
+ font-style: normal;
29
+ font-weight: 600;
30
+ font-display: swap;
31
+ src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
32
+ }
33
+
34
+ @font-face {
35
+ font-family: 'Playfair Display';
36
+ font-style: normal;
37
+ font-weight: 700;
38
+ font-display: swap;
39
+ src: url('/fonts/playfair-display-latin-700-normal.woff2') format('woff2');
40
+ }
41
+
42
+ @font-face {
43
+ font-family: 'Poppins';
44
+ font-style: normal;
45
+ font-weight: 300;
46
+ font-display: swap;
47
+ src: url('/fonts/poppins-latin-300-normal.woff2') format('woff2');
48
+ }
49
+ @font-face {
50
+ font-family: 'Poppins';
51
+ font-style: normal;
52
+ font-weight: 400;
53
+ font-display: swap;
54
+ src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2');
55
+ }
56
+ @font-face {
57
+ font-family: 'Poppins';
58
+ font-style: normal;
59
+ font-weight: 500;
60
+ font-display: swap;
61
+ src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2');
62
+ }
63
+ @font-face {
64
+ font-family: 'Poppins';
65
+ font-style: normal;
66
+ font-weight: 600;
67
+ font-display: swap;
68
+ src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2');
69
+ }
70
+ @font-face {
71
+ font-family: 'Poppins';
72
+ font-style: normal;
73
+ font-weight: 700;
74
+ font-display: swap;
75
+ src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2');
76
+ }
77
+
78
+ /* ── The curated set (lib/fonts.ts lists them, with their moods and roles) ──
79
+ Each downloads only when a theme picks it; none is preloaded. A single-weight
80
+ display face declares the whole weight range, so a bold heading shows the face
81
+ as drawn rather than a synthesised bold. */
82
+
83
+ @font-face {
84
+ font-family: 'Nunito';
85
+ font-style: normal;
86
+ font-weight: 400;
87
+ font-display: swap;
88
+ src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2');
89
+ }
90
+ @font-face {
91
+ font-family: 'Nunito';
92
+ font-style: normal;
93
+ font-weight: 600;
94
+ font-display: swap;
95
+ src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2');
96
+ }
97
+ @font-face {
98
+ font-family: 'Nunito';
99
+ font-style: normal;
100
+ font-weight: 700;
101
+ font-display: swap;
102
+ src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2');
103
+ }
104
+
105
+ @font-face {
106
+ font-family: 'Fredoka';
107
+ font-style: normal;
108
+ font-weight: 400;
109
+ font-display: swap;
110
+ src: url('/fonts/fredoka-latin-400-normal.woff2') format('woff2');
111
+ }
112
+ @font-face {
113
+ font-family: 'Fredoka';
114
+ font-style: normal;
115
+ font-weight: 600;
116
+ font-display: swap;
117
+ src: url('/fonts/fredoka-latin-600-normal.woff2') format('woff2');
118
+ }
119
+ @font-face {
120
+ font-family: 'Fredoka';
121
+ font-style: normal;
122
+ font-weight: 700;
123
+ font-display: swap;
124
+ src: url('/fonts/fredoka-latin-700-normal.woff2') format('woff2');
125
+ }
126
+
127
+ @font-face {
128
+ font-family: 'Lora';
129
+ font-style: normal;
130
+ font-weight: 400;
131
+ font-display: swap;
132
+ src: url('/fonts/lora-latin-400-normal.woff2') format('woff2');
133
+ }
134
+ @font-face {
135
+ font-family: 'Lora';
136
+ font-style: normal;
137
+ font-weight: 600;
138
+ font-display: swap;
139
+ src: url('/fonts/lora-latin-600-normal.woff2') format('woff2');
140
+ }
141
+ @font-face {
142
+ font-family: 'Lora';
143
+ font-style: normal;
144
+ font-weight: 700;
145
+ font-display: swap;
146
+ src: url('/fonts/lora-latin-700-normal.woff2') format('woff2');
147
+ }
148
+
149
+ @font-face {
150
+ font-family: 'Merriweather';
151
+ font-style: normal;
152
+ font-weight: 400;
153
+ font-display: swap;
154
+ src: url('/fonts/merriweather-latin-400-normal.woff2') format('woff2');
155
+ }
156
+ @font-face {
157
+ font-family: 'Merriweather';
158
+ font-style: normal;
159
+ font-weight: 600;
160
+ font-display: swap;
161
+ src: url('/fonts/merriweather-latin-600-normal.woff2') format('woff2');
162
+ }
163
+ @font-face {
164
+ font-family: 'Merriweather';
165
+ font-style: normal;
166
+ font-weight: 700;
167
+ font-display: swap;
168
+ src: url('/fonts/merriweather-latin-700-normal.woff2') format('woff2');
169
+ }
170
+
171
+ @font-face {
172
+ font-family: 'Anton';
173
+ font-style: normal;
174
+ font-weight: 100 900;
175
+ font-display: swap;
176
+ src: url('/fonts/anton-latin-400-normal.woff2') format('woff2');
177
+ }
178
+
179
+ @font-face {
180
+ font-family: 'Bebas Neue';
181
+ font-style: normal;
182
+ font-weight: 100 900;
183
+ font-display: swap;
184
+ src: url('/fonts/bebas-neue-latin-400-normal.woff2') format('woff2');
185
+ }
186
+
187
+ @font-face {
188
+ font-family: 'Oswald';
189
+ font-style: normal;
190
+ font-weight: 400;
191
+ font-display: swap;
192
+ src: url('/fonts/oswald-latin-400-normal.woff2') format('woff2');
193
+ }
194
+ @font-face {
195
+ font-family: 'Oswald';
196
+ font-style: normal;
197
+ font-weight: 600;
198
+ font-display: swap;
199
+ src: url('/fonts/oswald-latin-600-normal.woff2') format('woff2');
200
+ }
201
+ @font-face {
202
+ font-family: 'Oswald';
203
+ font-style: normal;
204
+ font-weight: 700;
205
+ font-display: swap;
206
+ src: url('/fonts/oswald-latin-700-normal.woff2') format('woff2');
207
+ }
208
+
209
+ @font-face {
210
+ font-family: 'Bangers';
211
+ font-style: normal;
212
+ font-weight: 100 900;
213
+ font-display: swap;
214
+ src: url('/fonts/bangers-latin-400-normal.woff2') format('woff2');
215
+ }
216
+
217
+ @font-face {
218
+ font-family: 'Bowlby One';
219
+ font-style: normal;
220
+ font-weight: 100 900;
221
+ font-display: swap;
222
+ src: url('/fonts/bowlby-one-latin-400-normal.woff2') format('woff2');
223
+ }
224
+
225
+ @font-face {
226
+ font-family: 'Knewave';
227
+ font-style: normal;
228
+ font-weight: 100 900;
229
+ font-display: swap;
230
+ src: url('/fonts/knewave-latin-400-normal.woff2') format('woff2');
231
+ }
232
+
233
+ @font-face {
234
+ font-family: 'Rubik Dirt';
235
+ font-style: normal;
236
+ font-weight: 100 900;
237
+ font-display: swap;
238
+ src: url('/fonts/rubik-dirt-latin-400-normal.woff2') format('woff2');
239
+ }