feat(coffee): bundled-font @font-face + preset typography (fonts workaround)
Bundle Fraunces/Work Sans/Caveat via @font-face against served /templates/coffee/fonts/*.woff2 (host never emits @font-face for bundled_fonts). Set typography.fontHeading=Fraunces / fontBody=Work Sans in all 5 presets so --font-heading/--font-body resolve to the bundled families. gotham@1.2.0 precedent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0212c79ea5
commit
fed5f50823
@ -114,7 +114,21 @@ css:
|
|||||||
* the BlockNinja font variables (--font-heading, --font-body, --font-mono) with
|
* the BlockNinja font variables (--font-heading, --font-body, --font-mono) with
|
||||||
* the fallback stacks below — never hardcoded, so the admin font picker works.
|
* the fallback stacks below — never hardcoded, so the admin font picker works.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Bundled faces. The host does not yet emit @font-face for bundled_fonts
|
||||||
|
* (LoadedPlugin.BundledFonts is unconsumed — cms WO-BUNDLED-FONTS-DEAD-CODE),
|
||||||
|
* so the theme declares its own faces against the served artifact paths
|
||||||
|
* (/templates/coffee/fonts/...). Families/weights mirror fonts.json exactly.
|
||||||
|
* Presets set typography.fontHeading/body to template:coffee:<Family> so
|
||||||
|
* --font-heading/--font-body resolve to Fraunces/Work Sans; Caveat backs the
|
||||||
|
* hand-accent fallback stack. */
|
||||||
|
@font-face { font-family: 'Fraunces'; src: url('/templates/coffee/fonts/fraunces-latin-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
|
||||||
|
@font-face { font-family: 'Fraunces'; src: url('/templates/coffee/fonts/fraunces-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
|
||||||
|
@font-face { font-family: 'Work Sans'; src: url('/templates/coffee/fonts/worksans-latin-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
|
||||||
|
@font-face { font-family: 'Work Sans'; src: url('/templates/coffee/fonts/worksans-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
|
||||||
|
@font-face { font-family: 'Caveat'; src: url('/templates/coffee/fonts/caveat-latin-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
|
||||||
|
@font-face { font-family: 'Caveat'; src: url('/templates/coffee/fonts/caveat-latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--coffee-heading-fallback: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
|
--coffee-heading-fallback: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
|
||||||
--coffee-body-fallback: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
--coffee-body-fallback: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
|||||||
20
presets.json
20
presets.json
@ -5,6 +5,10 @@
|
|||||||
"description": "Cream paper and espresso ink with a terracotta accent. Daylight cafe.",
|
"description": "Cream paper and espresso ink with a terracotta accent. Daylight cafe.",
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "both",
|
"mode": "both",
|
||||||
|
"typography": {
|
||||||
|
"fontHeading": "template:coffee:Fraunces",
|
||||||
|
"fontBody": "template:coffee:Work Sans"
|
||||||
|
},
|
||||||
"lightColors": {
|
"lightColors": {
|
||||||
"background": "36 30% 96%",
|
"background": "36 30% 96%",
|
||||||
"foreground": "25 35% 18%",
|
"foreground": "25 35% 18%",
|
||||||
@ -55,6 +59,10 @@
|
|||||||
"description": "Espresso-deep base with a copper accent. Evening roastery.",
|
"description": "Espresso-deep base with a copper accent. Evening roastery.",
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "both",
|
"mode": "both",
|
||||||
|
"typography": {
|
||||||
|
"fontHeading": "template:coffee:Fraunces",
|
||||||
|
"fontBody": "template:coffee:Work Sans"
|
||||||
|
},
|
||||||
"lightColors": {
|
"lightColors": {
|
||||||
"background": "36 30% 96%",
|
"background": "36 30% 96%",
|
||||||
"foreground": "25 35% 18%",
|
"foreground": "25 35% 18%",
|
||||||
@ -105,6 +113,10 @@
|
|||||||
"description": "Warmer ivory paper with a deeper terracotta accent. Bakery counter.",
|
"description": "Warmer ivory paper with a deeper terracotta accent. Bakery counter.",
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "both",
|
"mode": "both",
|
||||||
|
"typography": {
|
||||||
|
"fontHeading": "template:coffee:Fraunces",
|
||||||
|
"fontBody": "template:coffee:Work Sans"
|
||||||
|
},
|
||||||
"lightColors": {
|
"lightColors": {
|
||||||
"background": "32 35% 92%",
|
"background": "32 35% 92%",
|
||||||
"foreground": "22 40% 16%",
|
"foreground": "22 40% 16%",
|
||||||
@ -155,6 +167,10 @@
|
|||||||
"description": "Slate-black menu board with chalk-white lettering and a chalk-cream accent.",
|
"description": "Slate-black menu board with chalk-white lettering and a chalk-cream accent.",
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "both",
|
"mode": "both",
|
||||||
|
"typography": {
|
||||||
|
"fontHeading": "template:coffee:Fraunces",
|
||||||
|
"fontBody": "template:coffee:Work Sans"
|
||||||
|
},
|
||||||
"lightColors": {
|
"lightColors": {
|
||||||
"background": "40 20% 94%",
|
"background": "40 20% 94%",
|
||||||
"foreground": "200 12% 16%",
|
"foreground": "200 12% 16%",
|
||||||
@ -205,6 +221,10 @@
|
|||||||
"description": "Soft sage green and oat cream for tea rooms and matcha bars.",
|
"description": "Soft sage green and oat cream for tea rooms and matcha bars.",
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "both",
|
"mode": "both",
|
||||||
|
"typography": {
|
||||||
|
"fontHeading": "template:coffee:Fraunces",
|
||||||
|
"fontBody": "template:coffee:Work Sans"
|
||||||
|
},
|
||||||
"lightColors": {
|
"lightColors": {
|
||||||
"background": "44 32% 94%",
|
"background": "44 32% 94%",
|
||||||
"foreground": "120 15% 18%",
|
"foreground": "120 15% 18%",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user