Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/scifi-clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
package main
|
|
|
|
// scifiHeadingBaseClass returns level-specific tracking + weight classes.
|
|
func scifiHeadingBaseClass(level int) string {
|
|
switch level {
|
|
case 1:
|
|
return "scifi-h1 text-4xl md:text-5xl font-medium tracking-tight"
|
|
case 2:
|
|
return "scifi-h2 text-3xl font-medium tracking-tight"
|
|
case 3:
|
|
return "scifi-h3 text-2xl font-medium"
|
|
case 4:
|
|
return "scifi-h4 text-xl font-medium"
|
|
case 5:
|
|
return "scifi-h4 text-lg font-medium"
|
|
case 6:
|
|
return "scifi-h4 text-base font-medium uppercase tracking-widest"
|
|
default:
|
|
return "scifi-h2 text-3xl font-medium tracking-tight"
|
|
}
|
|
}
|
|
|
|
// scifiHeadingComponent renders a heading with an optional mono kicker rail.
|
|
templ scifiHeadingComponent(level int, text, textClass, kicker string) {
|
|
<div class="my-6">
|
|
if kicker != "" {
|
|
<div class="scifi-mono uppercase tracking-widest text-xs text-accent mb-2">
|
|
{ kicker }
|
|
</div>
|
|
}
|
|
switch level {
|
|
case 1:
|
|
<h1 class={ scifiHeadingBaseClass(1), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h1>
|
|
case 2:
|
|
<h2 class={ scifiHeadingBaseClass(2), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h2>
|
|
case 3:
|
|
<h3 class={ scifiHeadingBaseClass(3), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h3>
|
|
case 4:
|
|
<h4 class={ scifiHeadingBaseClass(4), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h4>
|
|
case 5:
|
|
<h5 class={ scifiHeadingBaseClass(5), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h5>
|
|
case 6:
|
|
<h6 class={ scifiHeadingBaseClass(6), "text-muted-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h6>
|
|
default:
|
|
<h2 class={ scifiHeadingBaseClass(2), "text-foreground", textClass } style="font-family: var(--font-heading);">{ text }</h2>
|
|
}
|
|
</div>
|
|
}
|