Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/pastel-dream. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
39 lines
1.3 KiB
Go
39 lines
1.3 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 Pastel Dream theme.
|
|
var Registration = plugin.PluginRegistration{
|
|
Name: "pastel-dream",
|
|
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 Pastel Dream CSS to be appended to the host Tailwind input.
|
|
// This includes keyframes (pastel-shimmer, breathe), the --radius-soft variable,
|
|
// watercolor utility classes, font-family fallback stacks, and reduced-motion guards.
|
|
func ThemeCSSManifest() *plugin.CSSManifest {
|
|
css, err := assetsFS.ReadFile("assets/css/pastel-dream.css")
|
|
if err != nil {
|
|
return &plugin.CSSManifest{}
|
|
}
|
|
return &plugin.CSSManifest{
|
|
InputCSSAppend: string(css),
|
|
}
|
|
}
|