themes-corporate-modernist/email_wrapper.go
Alex Dunmow 4713787bbd initial: theme plugin corporate-modernist
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/corporate-modernist.

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

22 lines
687 B
Go

package main
import (
"bytes"
"context"
"git.dev.alexdunmow.com/block/core/templates"
)
// CorporateModernistEmailWrapper wraps body content in a 600px-wide
// Corporate Modernist email. Tokens are locked to the navy-classic light
// preset regardless of the active site preset, in line with §10 of the
// spec, to maximise email-client compatibility.
//
// Colours are expressed via hsl() with the navy-classic HSL triples; no
// hex literals appear in the source.
func CorporateModernistEmailWrapper(body string, emailCtx templates.EmailContext) string {
var buf bytes.Buffer
_ = emailWrapperComponent(emailCtx, body).Render(context.Background(), &buf)
return buf.String()
}