Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/kindergarten. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
29 lines
799 B
Plaintext
29 lines
799 B
Plaintext
package main
|
|
|
|
// bigCTAComponent renders the oversized pill CTA.
|
|
templ bigCTAComponent(data BigCTAData) {
|
|
<section class="kg-big-cta" data-block="kindergarten:big_cta">
|
|
<div class="kg-container">
|
|
if data.Label != "" {
|
|
<a href={ templ.SafeURL(data.Href) } class={ "kg-pill", "kg-crayon-underline", ctaColorClass(data.ColorVariant) }>{ data.Label }</a>
|
|
} else {
|
|
<span class="kg-empty" data-empty="true">Add a label and link to publish this call-to-action.</span>
|
|
}
|
|
</div>
|
|
</section>
|
|
}
|
|
|
|
// ctaColorClass picks the modifier class for the four-color CTA variants.
|
|
func ctaColorClass(variant string) string {
|
|
switch variant {
|
|
case "red":
|
|
return "kg-pill-red"
|
|
case "blue":
|
|
return "kg-pill-blue"
|
|
case "green":
|
|
return "kg-pill-green"
|
|
default:
|
|
return "kg-pill-yellow"
|
|
}
|
|
}
|