Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/coffee. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
package main
|
|
|
|
// coffeeHeadingBaseClass returns base Tailwind classes for each heading level.
|
|
func coffeeHeadingBaseClass(level int) string {
|
|
switch level {
|
|
case 1:
|
|
return "coffee-display text-5xl leading-tight"
|
|
case 2:
|
|
return "coffee-display text-3xl italic"
|
|
case 3:
|
|
return "coffee-display text-2xl"
|
|
case 4:
|
|
return "coffee-display text-xl"
|
|
case 5:
|
|
return "coffee-display text-lg"
|
|
case 6:
|
|
return "coffee-display text-base"
|
|
default:
|
|
return "coffee-display text-3xl"
|
|
}
|
|
}
|
|
|
|
// coffeeHeadingComponent renders a heading with Coffee display styling and an
|
|
// optional doodle underline for h2+ levels.
|
|
templ coffeeHeadingComponent(level int, text, textClass string) {
|
|
switch level {
|
|
case 1:
|
|
<h1 class={ coffeeHeadingBaseClass(1), "text-primary", textClass }>{ text }</h1>
|
|
case 2:
|
|
<h2 class={ coffeeHeadingBaseClass(2), "text-primary", textClass }>
|
|
<span class="coffee-doodle-underline">{ text }</span>
|
|
</h2>
|
|
case 3:
|
|
<h3 class={ coffeeHeadingBaseClass(3), "text-primary", textClass }>
|
|
<span class="coffee-doodle-underline">{ text }</span>
|
|
</h3>
|
|
case 4:
|
|
<h4 class={ coffeeHeadingBaseClass(4), "text-primary", textClass }>{ text }</h4>
|
|
case 5:
|
|
<h5 class={ coffeeHeadingBaseClass(5), "text-primary", textClass }>{ text }</h5>
|
|
case 6:
|
|
<h6 class={ coffeeHeadingBaseClass(6), "text-primary", textClass }>{ text }</h6>
|
|
default:
|
|
<h2 class={ coffeeHeadingBaseClass(2), "text-primary", textClass }>
|
|
<span class="coffee-doodle-underline">{ text }</span>
|
|
</h2>
|
|
}
|
|
}
|