themes-magazine-bold/registration.go
Alex Dunmow fe754f634b initial: theme plugin magazine-bold
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/magazine-bold.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:38 +08:00

40 lines
1.5 KiB
Go

package main
import (
"io/fs"
"net/http"
"git.dev.alexdunmow.com/block/core/blocks"
"git.dev.alexdunmow.com/block/core/plugin"
"git.dev.alexdunmow.com/block/core/templates"
)
// Registration is the compile-time plugin registration for the Magazine Bold template.
var Registration = plugin.PluginRegistration{
Name: "magazine-bold",
Version: plugin.ParseModVersion(pluginModBytes),
Register: func(tr templates.TemplateRegistry, br blocks.BlockRegistry) error {
return Register(tr, br)
},
Assets: func() http.Handler { return AssetsHandler() },
Schemas: func() fs.FS { return Schemas() },
ThemePresets: func() []byte { return ThemePresets() },
BundledFonts: func() []byte { return BundledFonts() },
MasterPages: func() []plugin.MasterPageDefinition { return DefaultMasterPages() },
CSSManifest: func() *plugin.CSSManifest { return ThemeCSSManifest() },
}
// ThemeCSSManifest returns the CSS manifest for Magazine Bold. The
// InputCSSAppend payload is appended into the host Tailwind input so the
// theme's display-type utilities (`.text-folio`, `.text-deck`,
// `.font-display`, etc.) and hairline rules ship with the compiled CSS.
//
// NOTE: per docs/FONTS.md, this pass does NOT inject @font-face declarations.
// The CMS emits @font-face automatically for fonts assigned via the picker.
// We only inject custom utility CSS here.
func ThemeCSSManifest() *plugin.CSSManifest {
return &plugin.CSSManifest{
InputCSSAppend: magazineBoldUtilityCSS,
}
}