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>
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
package main
|
|
|
|
// pastelHeadingBaseClass returns the Tailwind size/weight class for a level.
|
|
// H1 and H2 get the display face; H3+ uses the body face.
|
|
func pastelHeadingBaseClass(level int) string {
|
|
switch level {
|
|
case 1:
|
|
return "font-display text-5xl md:text-6xl leading-tight brush-underline"
|
|
case 2:
|
|
return "font-display text-4xl md:text-5xl leading-tight brush-underline"
|
|
case 3:
|
|
return "font-body text-3xl font-semibold tracking-tight"
|
|
case 4:
|
|
return "font-body text-2xl font-semibold"
|
|
case 5:
|
|
return "font-body text-xl font-medium"
|
|
case 6:
|
|
return "font-body text-lg font-medium"
|
|
default:
|
|
return "font-body text-3xl font-semibold tracking-tight"
|
|
}
|
|
}
|
|
|
|
// pastelHeadingComponent renders a heading with pastel-dream styling.
|
|
templ pastelHeadingComponent(level int, text, textClass string) {
|
|
switch level {
|
|
case 1:
|
|
<h1 class={ pastelHeadingBaseClass(1), textClass } style="color: hsl(var(--foreground));">{ text }</h1>
|
|
case 2:
|
|
<h2 class={ pastelHeadingBaseClass(2), textClass } style="color: hsl(var(--foreground));">{ text }</h2>
|
|
case 3:
|
|
<h3 class={ pastelHeadingBaseClass(3), textClass } style="color: hsl(var(--foreground));">{ text }</h3>
|
|
case 4:
|
|
<h4 class={ pastelHeadingBaseClass(4), textClass } style="color: hsl(var(--foreground));">{ text }</h4>
|
|
case 5:
|
|
<h5 class={ pastelHeadingBaseClass(5), textClass } style="color: hsl(var(--foreground));">{ text }</h5>
|
|
case 6:
|
|
<h6 class={ pastelHeadingBaseClass(6), textClass } style="color: hsl(var(--foreground));">{ text }</h6>
|
|
default:
|
|
<h2 class={ pastelHeadingBaseClass(2), textClass } style="color: hsl(var(--foreground));">{ text }</h2>
|
|
}
|
|
}
|