themes-y2k/heading_override.templ
Alex Dunmow 49f9c90589 initial: theme plugin y2k
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/y2k.

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

42 lines
1.3 KiB
Plaintext

package main
// y2kHeadingBaseClass returns the per-level Tailwind sizing classes.
func y2kHeadingBaseClass(level int) string {
switch level {
case 1:
return "text-5xl md:text-6xl"
case 2:
return "text-3xl md:text-4xl"
case 3:
return "text-2xl"
case 4:
return "text-xl"
case 5:
return "text-lg"
case 6:
return "text-base"
default:
return "text-3xl md:text-4xl"
}
}
// y2kHeadingComponent renders a heading with chrome stroke + drop shadow.
templ y2kHeadingComponent(level int, text, textClass string) {
switch level {
case 1:
<h1 class={ "y2k-heading font-bold text-foreground", y2kHeadingBaseClass(1), textClass }>{ text }</h1>
case 2:
<h2 class={ "y2k-heading font-bold text-foreground", y2kHeadingBaseClass(2), textClass }>{ text }</h2>
case 3:
<h3 class={ "y2k-heading font-semibold text-foreground", y2kHeadingBaseClass(3), textClass }>{ text }</h3>
case 4:
<h4 class={ "y2k-heading font-semibold text-foreground", y2kHeadingBaseClass(4), textClass }>{ text }</h4>
case 5:
<h5 class={ "y2k-heading font-semibold text-foreground", y2kHeadingBaseClass(5), textClass }>{ text }</h5>
case 6:
<h6 class={ "y2k-heading font-semibold text-foreground", y2kHeadingBaseClass(6), textClass }>{ text }</h6>
default:
<h2 class={ "y2k-heading font-bold text-foreground", y2kHeadingBaseClass(2), textClass }>{ text }</h2>
}
}