create-website-build-kit 0.1.8 → 0.1.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-website-build-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Scaffold a production marketing site \u2014 Astro on Cloudflare Workers, with the gates, the migration playbook and the accessibility work already wired.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -29,7 +29,22 @@ const isCurrent = (href: string) => (href === '/' ? path === '/' : path.startsWi
|
|
|
29
29
|
{/* Text until there is a logo. A brand mark referenced before the file
|
|
30
30
|
exists renders as a broken image on every page, which is worse than
|
|
31
31
|
plain type — swap this for <img> once the artwork is in place, and
|
|
32
|
-
look at it on both a light and a dark background before shipping.
|
|
32
|
+
look at it on both a light and a dark background before shipping.
|
|
33
|
+
|
|
34
|
+
⚠ SIZE IT BY HEIGHT, NOT WIDTH, AND KEEP IT UNDER --header-h.
|
|
35
|
+
`inline-size: 12rem; block-size: auto` on a wide mark computes to
|
|
36
|
+
whatever its aspect ratio says — on a real build a 520×227 logo came
|
|
37
|
+
out 87px tall in an 88px bar, so the LOGO was setting the header's
|
|
38
|
+
height instead of the token.
|
|
39
|
+
|
|
40
|
+
That is not cosmetic. FOUR offsets are computed from --header-h:
|
|
41
|
+
this header's min-block-size, `.under-header`'s reserve, and
|
|
42
|
+
scroll-padding-top / scroll-margin-top, which are what stop an
|
|
43
|
+
anchor target landing underneath the fixed nav. A header taller than
|
|
44
|
+
its token leaves all four short by the same amount, and none of them
|
|
45
|
+
errors.
|
|
46
|
+
|
|
47
|
+
`block-size: clamp(2.25rem, 3.4vw, 2.75rem); inline-size: auto` */}
|
|
33
48
|
{business.name}
|
|
34
49
|
</a>
|
|
35
50
|
|
|
@@ -29,7 +29,7 @@ const { title, lede, breadcrumbs, class: className = '' } = Astro.props;
|
|
|
29
29
|
const crumbs = breadcrumbs ?? [];
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
<section class:list={['hero', 'under-header',
|
|
32
|
+
<section class:list={['hero', 'under-header', className]}>
|
|
33
33
|
<div class="container">
|
|
34
34
|
{
|
|
35
35
|
crumbs.length > 0 && (
|
|
@@ -59,6 +59,31 @@ const crumbs = breadcrumbs ?? [];
|
|
|
59
59
|
</section>
|
|
60
60
|
|
|
61
61
|
<style>
|
|
62
|
+
/*
|
|
63
|
+
* ⚠ THE RHYTHM BELONGS TO THE NEXT SECTION, NOT TO THIS ONE.
|
|
64
|
+
*
|
|
65
|
+
* This carried `.section--tight`, which is a SHORTHAND — it sets padding-block
|
|
66
|
+
* at both ends. Every page opens its following section with a rhythm class of
|
|
67
|
+
* its own, so two stacked: a measured 160px hole on the template's own
|
|
68
|
+
* /contact/, 176px on all four PageHero pages of a real build, and up to 232px
|
|
69
|
+
* where the next section is `.section` rather than `.section--tight`.
|
|
70
|
+
*
|
|
71
|
+
* Nothing could see it. Build green, types green, axe green, tells green — a
|
|
72
|
+
* hole is only visible by looking at the page.
|
|
73
|
+
*
|
|
74
|
+
* ⚠ AND THE SHORTHAND CLOBBERED THE HEADER OFFSET. `.under-header` reserves
|
|
75
|
+
* the fixed header's height on padding-block-START, and global.css warns in
|
|
76
|
+
* as many words that "a scoped component style would out-specify" it. A
|
|
77
|
+
* shorthand from this component is exactly such a style: on a real build it
|
|
78
|
+
* discarded the reserve and put the hero behind the nav.
|
|
79
|
+
*
|
|
80
|
+
* padding-block-END only, therefore. The offset stays with `.under-header`,
|
|
81
|
+
* the rhythm stays with whatever section comes next.
|
|
82
|
+
*/
|
|
83
|
+
.hero {
|
|
84
|
+
padding-block-end: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
62
87
|
.hero__crumbs ol {
|
|
63
88
|
display: flex;
|
|
64
89
|
flex-wrap: wrap;
|
|
@@ -241,6 +241,16 @@ b {
|
|
|
241
241
|
* height or the heading sits behind the nav. Applied by each opening section
|
|
242
242
|
* rather than a blanket `main > :first-child` rule, which a scoped component
|
|
243
243
|
* style would out-specify.
|
|
244
|
+
*
|
|
245
|
+
* ⚠ AND ONE DID. A component wrote `padding-block: <a> <b>` on the same element
|
|
246
|
+
* — a SHORTHAND, so it set padding-block-start too, out-specified this, and
|
|
247
|
+
* the hero sat behind the nav on a real build. On the element that carries
|
|
248
|
+
* `.under-header`, set `padding-block-end` and never the shorthand.
|
|
249
|
+
*
|
|
250
|
+
* ⚠ NOT MOVED TO `main`, WHICH WOULD BE UN-OVERRIDABLE. The header's background
|
|
251
|
+
* is opaque `var(--bg)`, so padding on `main` would leave a strip of body
|
|
252
|
+
* colour behind it wherever a first section has a background of its own. The
|
|
253
|
+
* per-section reserve is deliberate; the shorthand is the bug.
|
|
244
254
|
*/
|
|
245
255
|
.under-header {
|
|
246
256
|
padding-block-start: calc(var(--header-h) + var(--space-2xl));
|
|
@@ -197,6 +197,11 @@
|
|
|
197
197
|
appeared should spring. */
|
|
198
198
|
|
|
199
199
|
/* ── Chrome ────────────────────────────────────────────────────────────── */
|
|
200
|
+
/* ⚠ FOUR THINGS READ THIS: the header's min-block-size, `.under-header`'s
|
|
201
|
+
reserve, and scroll-padding-top / scroll-margin-top, which keep an anchor
|
|
202
|
+
target clear of the fixed nav. If the rendered header is taller than this
|
|
203
|
+
— a logo sized by width is the usual cause — all four are short by the same
|
|
204
|
+
amount and nothing reports it. Measure the bar, do not assume it. */
|
|
200
205
|
--header-h: 4.5rem;
|
|
201
206
|
--z-header: 100;
|
|
202
207
|
--z-menu: 110;
|
package/template/wrangler.jsonc
CHANGED
|
@@ -7,6 +7,21 @@
|
|
|
7
7
|
// the Astro adapter resolves its environment at build time and silently
|
|
8
8
|
// ignores `deploy --env`, which is how a staging deploy lands on production.
|
|
9
9
|
//
|
|
10
|
+
// ⚠ AND IT IGNORES `--config` THE SAME WAY, which is the next flag anyone
|
|
11
|
+
// reaches for. @astrojs/cloudflare generates dist/server/wrangler.json —
|
|
12
|
+
// the config actually deployed, the one carrying `main` and the real asset
|
|
13
|
+
// directory — and builds it from the DEFAULT config path only. So
|
|
14
|
+
// `wrangler deploy --config wrangler.production.jsonc` either fails with
|
|
15
|
+
// "Cannot use assets with a binding in an assets-only Worker" (the
|
|
16
|
+
// hand-written file has no `main`), or, if you work around that by
|
|
17
|
+
// deploying the generated file instead, ships with whatever name and routes
|
|
18
|
+
// THIS file held, whatever was built.
|
|
19
|
+
//
|
|
20
|
+
// One config is the reason that cannot happen here. A project that grows a
|
|
21
|
+
// second one has to rewrite dist/server/wrangler.json between build and
|
|
22
|
+
// deploy, because there is no adapter option for it. Found on a shipped
|
|
23
|
+
// build that needed two.
|
|
24
|
+
//
|
|
10
25
|
// npm run deploy:staging → builds staging, deploys this worker
|
|
11
26
|
// npm run deploy:production → builds production, deploys this worker
|
|
12
27
|
//
|