Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/editorial. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
package main
|
|
|
|
// editorialHeadingComponent renders an editorial-styled heading. H1 carries
|
|
// the optional kicker. The text-size scale lifts on the landing template so
|
|
// the lead-story H1 hits ≥72px at desktop sizes (UAT §13.9).
|
|
templ editorialHeadingComponent(level int, text, textClass, kicker string) {
|
|
switch level {
|
|
case 1:
|
|
<div class="editorial-column">
|
|
if kicker != "" {
|
|
<span class="editorial-heading-kicker">{ kicker }</span>
|
|
}
|
|
<h1 class={ "editorial-heading text-5xl md:text-7xl mt-2", textClass }>{ text }</h1>
|
|
</div>
|
|
case 2:
|
|
<h2 class={ "editorial-heading text-3xl md:text-4xl editorial-column", textClass }>{ text }</h2>
|
|
case 3:
|
|
<h3 class={ "editorial-heading text-2xl md:text-3xl editorial-column", textClass }>{ text }</h3>
|
|
case 4:
|
|
<h4 class={ "editorial-heading text-xl md:text-2xl editorial-column", textClass }>{ text }</h4>
|
|
case 5:
|
|
<h5 class={ "editorial-heading text-lg editorial-column", textClass }>{ text }</h5>
|
|
case 6:
|
|
<h6 class={ "editorial-heading text-base editorial-column", textClass }>{ text }</h6>
|
|
default:
|
|
<h2 class={ "editorial-heading text-3xl editorial-column", textClass }>{ text }</h2>
|
|
}
|
|
}
|