feat(magazine-bold): bundle fonts (@font-face + preset typography) and declare icon packs

Wire the three bundled fonts.json families the CMS never loads (Archivo Black
display, Inter body, IBM Plex Mono mono) via @font-face against the served
/templates/magazine-bold/fonts/*.woff2 paths + template:magazine-bold:<Family>
typography refs in all five presets. Declare required_icon_packs: [lucide,
simple-icons] so the sprite sheets materialize on fresh installs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-06 21:14:29 +08:00
parent a0789ebe13
commit b85d5479ec
2 changed files with 44 additions and 0 deletions

View File

@ -13,6 +13,12 @@ theme_presets: presets.json
bundled_fonts: fonts.json bundled_fonts: fonts.json
master_pages: master_pages.json master_pages: master_pages.json
# Icon packs referenced by theme templates (static: lucide + simple-icons;
# dynamic defaults resolve to lucide, e.g. the divider's `lucide:diamond`).
# Declared so /icons/<pack>.svg is materialized on fresh installs — without it
# the sprite can 404 and every sprite icon renders invisible.
required_icon_packs: [lucide, simple-icons]
system_templates: system_templates:
- key: magazine-bold - key: magazine-bold
title: Magazine Bold title: Magazine Bold
@ -127,6 +133,19 @@ css:
* families. * families.
*/ */
/* Bundled display/body/mono faces. The host does not yet emit @font-face
* for bundled_fonts (LoadedPlugin.BundledFonts is unconsumed), so the theme
* declares its own faces against the served artifact paths
* (/templates/magazine-bold/fonts/...). Presets set typography.fontHeading/
* body/mono to template:magazine-bold:<Family> so --font-heading|body|mono
* resolve to these families. Families/weights mirror fonts.json exactly. */
@font-face { font-family: 'Archivo Black'; src: url('/templates/magazine-bold/fonts/archivo-black-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/magazine-bold/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/magazine-bold/fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/magazine-bold/fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/templates/magazine-bold/fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/templates/magazine-bold/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@layer utilities { @layer utilities {
:root { :root {
--mb-measure: 68ch; --mb-measure: 68ch;

View File

@ -5,6 +5,11 @@
"description": "The default. Off-white newsprint ground and near-black ink by day, ink-black with a fluoro hot-magenta accent by night.", "description": "The default. Off-white newsprint ground and near-black ink by day, ink-black with a fluoro hot-magenta accent by night.",
"theme": { "theme": {
"mode": "both", "mode": "both",
"typography": {
"fontHeading": "template:magazine-bold:Archivo Black",
"fontBody": "template:magazine-bold:Inter",
"fontMono": "template:magazine-bold:IBM Plex Mono"
},
"lightColors": { "lightColors": {
"background": "38 30% 96%", "background": "38 30% 96%",
"foreground": "0 0% 8%", "foreground": "0 0% 8%",
@ -55,6 +60,11 @@
"description": "The same newsprint/ink neutrals with an electric-blue accent — cooler, sportier drop energy.", "description": "The same newsprint/ink neutrals with an electric-blue accent — cooler, sportier drop energy.",
"theme": { "theme": {
"mode": "both", "mode": "both",
"typography": {
"fontHeading": "template:magazine-bold:Archivo Black",
"fontBody": "template:magazine-bold:Inter",
"fontMono": "template:magazine-bold:IBM Plex Mono"
},
"lightColors": { "lightColors": {
"background": "38 30% 96%", "background": "38 30% 96%",
"foreground": "0 0% 8%", "foreground": "0 0% 8%",
@ -105,6 +115,11 @@
"description": "Cooler chalk ground and an acid-lime accent — a fresh, contemporary edge. Deeper ink-black night desk.", "description": "Cooler chalk ground and an acid-lime accent — a fresh, contemporary edge. Deeper ink-black night desk.",
"theme": { "theme": {
"mode": "both", "mode": "both",
"typography": {
"fontHeading": "template:magazine-bold:Archivo Black",
"fontBody": "template:magazine-bold:Inter",
"fontMono": "template:magazine-bold:IBM Plex Mono"
},
"lightColors": { "lightColors": {
"background": "60 15% 97%", "background": "60 15% 97%",
"foreground": "0 0% 8%", "foreground": "0 0% 8%",
@ -155,6 +170,11 @@
"description": "Newsprint ground with a fluorescent green accent — rave-flyer energy. Ink-black night with a glowing lime-green pop.", "description": "Newsprint ground with a fluorescent green accent — rave-flyer energy. Ink-black night with a glowing lime-green pop.",
"theme": { "theme": {
"mode": "both", "mode": "both",
"typography": {
"fontHeading": "template:magazine-bold:Archivo Black",
"fontBody": "template:magazine-bold:Inter",
"fontMono": "template:magazine-bold:IBM Plex Mono"
},
"lightColors": { "lightColors": {
"background": "38 28% 95%", "background": "38 28% 95%",
"foreground": "0 0% 8%", "foreground": "0 0% 8%",
@ -205,6 +225,11 @@
"description": "Warm newsprint and a hazard-orange accent — hi-vis workwear energy. Ink-black night with a glowing tangerine pop.", "description": "Warm newsprint and a hazard-orange accent — hi-vis workwear energy. Ink-black night with a glowing tangerine pop.",
"theme": { "theme": {
"mode": "both", "mode": "both",
"typography": {
"fontHeading": "template:magazine-bold:Archivo Black",
"fontBody": "template:magazine-bold:Inter",
"fontMono": "template:magazine-bold:IBM Plex Mono"
},
"lightColors": { "lightColors": {
"background": "38 32% 95%", "background": "38 32% 95%",
"foreground": "0 0% 8%", "foreground": "0 0% 8%",