create-we8 0.1.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/README.md +82 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +97 -0
- package/dist/cli.js.map +1 -0
- package/dist/copy-template.d.ts +12 -0
- package/dist/copy-template.d.ts.map +1 -0
- package/dist/copy-template.js +36 -0
- package/dist/copy-template.js.map +1 -0
- package/dist/files.d.ts +55 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +373 -0
- package/dist/files.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/options.d.ts +78 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +235 -0
- package/dist/options.js.map +1 -0
- package/dist/prompts.d.ts +24 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +66 -0
- package/dist/prompts.js.map +1 -0
- package/dist/scaffold.d.ts +49 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +178 -0
- package/dist/scaffold.js.map +1 -0
- package/package.json +58 -0
- package/template/.env.example +15 -0
- package/template/README.md +202 -0
- package/template/astro.config.mjs +23 -0
- package/template/package.json +29 -0
- package/template/public/favicon.svg +5 -0
- package/template/src/components/AnswerBlock.astro +31 -0
- package/template/src/components/JsonLd.astro +8 -0
- package/template/src/components/PostCard.astro +24 -0
- package/template/src/components/PostCta.astro +61 -0
- package/template/src/components/ResourceCard.astro +40 -0
- package/template/src/components/SiteFooter.astro +19 -0
- package/template/src/components/SiteHead.astro +36 -0
- package/template/src/components/SiteHeader.astro +34 -0
- package/template/src/layouts/BaseLayout.astro +61 -0
- package/template/src/layouts/PostLayout.astro +128 -0
- package/template/src/lib/data.ts +217 -0
- package/template/src/lib/fixture-backend.ts +84 -0
- package/template/src/lib/fixtures.ts +307 -0
- package/template/src/lib/markdown.ts +66 -0
- package/template/src/lib/seo.ts +191 -0
- package/template/src/lib/types.ts +180 -0
- package/template/src/lib/we8-backend.ts +254 -0
- package/template/src/pages/about.astro +96 -0
- package/template/src/pages/authors/[slug].astro +113 -0
- package/template/src/pages/blog/[slug].astro +28 -0
- package/template/src/pages/blog/index.astro +75 -0
- package/template/src/pages/contact.astro +106 -0
- package/template/src/pages/index.astro +106 -0
- package/template/src/pages/llms.txt.ts +64 -0
- package/template/src/pages/resources/[slug].astro +25 -0
- package/template/src/pages/resources.astro +95 -0
- package/template/src/pages/robots.txt.ts +18 -0
- package/template/src/pages/sitemap.xml.ts +22 -0
- package/template/src/styles/global.css +449 -0
- package/template/test/data-layer.test.ts +312 -0
- package/template/test/seo.test.ts +177 -0
- package/template/tsconfig.json +11 -0
- package/template/vitest.config.ts +18 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* One stylesheet, plain CSS, no build step and no framework.
|
|
3
|
+
*
|
|
4
|
+
* Tokens first, then elements, then the handful of components. If you replace
|
|
5
|
+
* this with Tailwind or anything else, nothing outside this file needs to
|
|
6
|
+
* change: the markup uses semantic elements and a small number of class names.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--ink: #16191d;
|
|
11
|
+
--ink-soft: #4a5158;
|
|
12
|
+
--ink-faint: #767d85;
|
|
13
|
+
--paper: #ffffff;
|
|
14
|
+
--paper-soft: #f6f7f8;
|
|
15
|
+
--line: #e2e5e8;
|
|
16
|
+
--accent: #1f5c4c;
|
|
17
|
+
--accent-soft: #eaf2ef;
|
|
18
|
+
|
|
19
|
+
--measure: 68ch;
|
|
20
|
+
--page: 72rem;
|
|
21
|
+
--gap: 1.5rem;
|
|
22
|
+
--radius: 6px;
|
|
23
|
+
|
|
24
|
+
--font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
|
|
25
|
+
sans-serif;
|
|
26
|
+
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
27
|
+
|
|
28
|
+
color-scheme: light dark;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (prefers-color-scheme: dark) {
|
|
32
|
+
:root {
|
|
33
|
+
--ink: #e8eaec;
|
|
34
|
+
--ink-soft: #b3b9bf;
|
|
35
|
+
--ink-faint: #8b9298;
|
|
36
|
+
--paper: #14171a;
|
|
37
|
+
--paper-soft: #1c2024;
|
|
38
|
+
--line: #2c3237;
|
|
39
|
+
--accent: #7fc9b2;
|
|
40
|
+
--accent-soft: #1d2b28;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
*,
|
|
45
|
+
*::before,
|
|
46
|
+
*::after {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
html {
|
|
51
|
+
-webkit-text-size-adjust: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
body {
|
|
55
|
+
margin: 0;
|
|
56
|
+
background: var(--paper);
|
|
57
|
+
color: var(--ink);
|
|
58
|
+
font-family: var(--font-body);
|
|
59
|
+
font-size: 1.0625rem;
|
|
60
|
+
line-height: 1.65;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h1,
|
|
64
|
+
h2,
|
|
65
|
+
h3 {
|
|
66
|
+
line-height: 1.25;
|
|
67
|
+
letter-spacing: -0.01em;
|
|
68
|
+
margin: 2.5rem 0 0.75rem;
|
|
69
|
+
text-wrap: balance;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h1 {
|
|
73
|
+
font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
|
|
74
|
+
margin-top: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
h2 {
|
|
78
|
+
font-size: 1.4rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
h3 {
|
|
82
|
+
font-size: 1.15rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
p,
|
|
86
|
+
ul,
|
|
87
|
+
ol {
|
|
88
|
+
margin: 0 0 1rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
a {
|
|
92
|
+
color: var(--accent);
|
|
93
|
+
text-underline-offset: 0.15em;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
a:focus-visible,
|
|
97
|
+
button:focus-visible,
|
|
98
|
+
input:focus-visible,
|
|
99
|
+
textarea:focus-visible {
|
|
100
|
+
outline: 2px solid var(--accent);
|
|
101
|
+
outline-offset: 2px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
img {
|
|
105
|
+
max-width: 100%;
|
|
106
|
+
height: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
hr {
|
|
110
|
+
border: 0;
|
|
111
|
+
border-top: 1px solid var(--line);
|
|
112
|
+
margin: 2.5rem 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
blockquote {
|
|
116
|
+
margin: 1.5rem 0;
|
|
117
|
+
padding-left: 1rem;
|
|
118
|
+
border-left: 3px solid var(--line);
|
|
119
|
+
color: var(--ink-soft);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
code {
|
|
123
|
+
font-family: var(--font-mono);
|
|
124
|
+
font-size: 0.9em;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Layout ------------------------------------------------------------------ */
|
|
128
|
+
|
|
129
|
+
.skip-link {
|
|
130
|
+
position: absolute;
|
|
131
|
+
left: -9999px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.skip-link:focus {
|
|
135
|
+
left: 1rem;
|
|
136
|
+
top: 1rem;
|
|
137
|
+
z-index: 10;
|
|
138
|
+
background: var(--paper);
|
|
139
|
+
padding: 0.5rem 0.75rem;
|
|
140
|
+
border: 1px solid var(--line);
|
|
141
|
+
border-radius: var(--radius);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.shell {
|
|
145
|
+
width: min(100% - 2.5rem, var(--page));
|
|
146
|
+
margin-inline: auto;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.prose {
|
|
150
|
+
max-width: var(--measure);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.stack > * + * {
|
|
154
|
+
margin-top: var(--gap);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.lede {
|
|
158
|
+
font-size: 1.2rem;
|
|
159
|
+
color: var(--ink-soft);
|
|
160
|
+
max-width: var(--measure);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.meta {
|
|
164
|
+
color: var(--ink-faint);
|
|
165
|
+
font-size: 0.9rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Header and footer ------------------------------------------------------- */
|
|
169
|
+
|
|
170
|
+
.site-header {
|
|
171
|
+
border-bottom: 1px solid var(--line);
|
|
172
|
+
padding: 1rem 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.site-header .shell {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-wrap: wrap;
|
|
178
|
+
gap: 1rem;
|
|
179
|
+
align-items: baseline;
|
|
180
|
+
justify-content: space-between;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.site-header a {
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.wordmark {
|
|
188
|
+
font-weight: 650;
|
|
189
|
+
font-size: 1.1rem;
|
|
190
|
+
color: var(--ink);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.site-nav {
|
|
194
|
+
display: flex;
|
|
195
|
+
gap: 1.25rem;
|
|
196
|
+
flex-wrap: wrap;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.site-nav a {
|
|
200
|
+
color: var(--ink-soft);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.site-nav a[aria-current='page'] {
|
|
204
|
+
color: var(--ink);
|
|
205
|
+
text-decoration: underline;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
main {
|
|
209
|
+
padding: 3rem 0 4rem;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.site-footer {
|
|
213
|
+
border-top: 1px solid var(--line);
|
|
214
|
+
padding: 2rem 0;
|
|
215
|
+
color: var(--ink-faint);
|
|
216
|
+
font-size: 0.9rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.site-footer .shell {
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-wrap: wrap;
|
|
222
|
+
gap: 1rem;
|
|
223
|
+
justify-content: space-between;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Cards and grids --------------------------------------------------------- */
|
|
227
|
+
|
|
228
|
+
.grid {
|
|
229
|
+
display: grid;
|
|
230
|
+
gap: var(--gap);
|
|
231
|
+
grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
|
|
232
|
+
padding: 0;
|
|
233
|
+
list-style: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.card {
|
|
237
|
+
border: 1px solid var(--line);
|
|
238
|
+
border-radius: var(--radius);
|
|
239
|
+
padding: 1.25rem;
|
|
240
|
+
background: var(--paper);
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: column;
|
|
243
|
+
gap: 0.5rem;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.card h2,
|
|
247
|
+
.card h3 {
|
|
248
|
+
margin: 0;
|
|
249
|
+
font-size: 1.1rem;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.card p {
|
|
253
|
+
margin: 0;
|
|
254
|
+
color: var(--ink-soft);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.card a {
|
|
258
|
+
text-decoration: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.card a:hover {
|
|
262
|
+
text-decoration: underline;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.tag {
|
|
266
|
+
display: inline-block;
|
|
267
|
+
font-size: 0.78rem;
|
|
268
|
+
letter-spacing: 0.03em;
|
|
269
|
+
text-transform: uppercase;
|
|
270
|
+
color: var(--ink-faint);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* The answer block -------------------------------------------------------- */
|
|
274
|
+
|
|
275
|
+
.answer {
|
|
276
|
+
border-left: 3px solid var(--accent);
|
|
277
|
+
background: var(--accent-soft);
|
|
278
|
+
border-radius: 0 var(--radius) var(--radius) 0;
|
|
279
|
+
padding: 1rem 1.25rem;
|
|
280
|
+
max-width: var(--measure);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.answer h2 {
|
|
284
|
+
margin: 0 0 0.4rem;
|
|
285
|
+
font-size: 1.05rem;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.answer p {
|
|
289
|
+
margin: 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.answer .meta {
|
|
293
|
+
margin-top: 0.5rem;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Table of contents ------------------------------------------------------- */
|
|
297
|
+
|
|
298
|
+
.toc {
|
|
299
|
+
border: 1px solid var(--line);
|
|
300
|
+
border-radius: var(--radius);
|
|
301
|
+
padding: 1rem 1.25rem;
|
|
302
|
+
max-width: var(--measure);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.toc h2 {
|
|
306
|
+
margin: 0 0 0.5rem;
|
|
307
|
+
font-size: 0.85rem;
|
|
308
|
+
text-transform: uppercase;
|
|
309
|
+
letter-spacing: 0.04em;
|
|
310
|
+
color: var(--ink-faint);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.toc ol {
|
|
314
|
+
margin: 0;
|
|
315
|
+
padding-left: 1.1rem;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.toc li + li {
|
|
319
|
+
margin-top: 0.25rem;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Forms ------------------------------------------------------------------- */
|
|
323
|
+
|
|
324
|
+
.field {
|
|
325
|
+
display: grid;
|
|
326
|
+
gap: 0.35rem;
|
|
327
|
+
margin-bottom: 1rem;
|
|
328
|
+
max-width: 34rem;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.field label {
|
|
332
|
+
font-weight: 600;
|
|
333
|
+
font-size: 0.95rem;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
input,
|
|
337
|
+
textarea {
|
|
338
|
+
font: inherit;
|
|
339
|
+
color: inherit;
|
|
340
|
+
background: var(--paper);
|
|
341
|
+
border: 1px solid var(--line);
|
|
342
|
+
border-radius: var(--radius);
|
|
343
|
+
padding: 0.55rem 0.7rem;
|
|
344
|
+
width: 100%;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
textarea {
|
|
348
|
+
min-height: 9rem;
|
|
349
|
+
resize: vertical;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.button,
|
|
353
|
+
button {
|
|
354
|
+
font: inherit;
|
|
355
|
+
font-weight: 600;
|
|
356
|
+
cursor: pointer;
|
|
357
|
+
border: 1px solid var(--accent);
|
|
358
|
+
background: var(--accent);
|
|
359
|
+
color: var(--paper);
|
|
360
|
+
border-radius: var(--radius);
|
|
361
|
+
padding: 0.55rem 1.1rem;
|
|
362
|
+
text-decoration: none;
|
|
363
|
+
display: inline-block;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
@media (prefers-color-scheme: dark) {
|
|
367
|
+
.button,
|
|
368
|
+
button {
|
|
369
|
+
color: #10201c;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.button.secondary,
|
|
374
|
+
button.secondary {
|
|
375
|
+
background: transparent;
|
|
376
|
+
color: var(--accent);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.honeypot {
|
|
380
|
+
position: absolute;
|
|
381
|
+
left: -9999px;
|
|
382
|
+
width: 1px;
|
|
383
|
+
height: 1px;
|
|
384
|
+
overflow: hidden;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
[data-we8-status] {
|
|
388
|
+
margin-top: 0.75rem;
|
|
389
|
+
font-weight: 600;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* Consent banner ---------------------------------------------------------- */
|
|
393
|
+
|
|
394
|
+
[data-we8-consent] {
|
|
395
|
+
position: fixed;
|
|
396
|
+
inset-inline: 0;
|
|
397
|
+
bottom: 0;
|
|
398
|
+
z-index: 20;
|
|
399
|
+
background: var(--paper);
|
|
400
|
+
border-top: 1px solid var(--line);
|
|
401
|
+
padding: 1rem;
|
|
402
|
+
display: flex;
|
|
403
|
+
flex-wrap: wrap;
|
|
404
|
+
gap: 1rem;
|
|
405
|
+
align-items: center;
|
|
406
|
+
justify-content: center;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
[data-we8-consent][hidden] {
|
|
410
|
+
display: none;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-we8-consent-body] {
|
|
414
|
+
max-width: 46ch;
|
|
415
|
+
font-size: 0.92rem;
|
|
416
|
+
color: var(--ink-soft);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
[data-we8-consent-body] p {
|
|
420
|
+
margin: 0;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
[data-we8-consent-actions] {
|
|
424
|
+
display: flex;
|
|
425
|
+
gap: 0.5rem;
|
|
426
|
+
flex-wrap: wrap;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
[data-we8-consent-actions] button {
|
|
430
|
+
font-size: 0.9rem;
|
|
431
|
+
padding: 0.4rem 0.8rem;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
[data-we8-consent-choice='partial'],
|
|
435
|
+
[data-we8-consent-choice='declined'] {
|
|
436
|
+
background: transparent;
|
|
437
|
+
color: var(--accent);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Notices ----------------------------------------------------------------- */
|
|
441
|
+
|
|
442
|
+
.notice {
|
|
443
|
+
border: 1px dashed var(--line);
|
|
444
|
+
border-radius: var(--radius);
|
|
445
|
+
padding: 0.9rem 1.1rem;
|
|
446
|
+
color: var(--ink-soft);
|
|
447
|
+
font-size: 0.92rem;
|
|
448
|
+
max-width: var(--measure);
|
|
449
|
+
}
|