Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/cyberpunk. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
package main
|
|
|
|
// neonEdgeClass returns the per-accent neon-edge utility class.
|
|
func neonEdgeClass(accent string) string {
|
|
switch accent {
|
|
case "cyan":
|
|
return "neon-edge-cyan"
|
|
case "lime":
|
|
return "neon-edge-lime"
|
|
default:
|
|
return "neon-edge-magenta"
|
|
}
|
|
}
|
|
|
|
// featureCardNeonComponent renders the cyberpunk:feature_card_neon block.
|
|
templ featureCardNeonComponent(data FeatureCardNeonData) {
|
|
<article
|
|
data-block="cyberpunk:feature_card_neon"
|
|
data-accent={ data.Accent }
|
|
class={ "cyberpunk-feature-card p-6 rounded-lg h-full flex flex-col gap-4", neonEdgeClass(data.Accent) }
|
|
style="background-color: hsl(var(--card)); color: hsl(var(--card-foreground)); border: 1px solid hsl(var(--border));"
|
|
>
|
|
if data.Icon != "" {
|
|
<div class="cyberpunk-feature-icon w-10 h-10 flex items-center justify-center rounded-md" style="background-color: hsl(var(--secondary));">
|
|
<img src={ data.Icon } alt="" class="w-6 h-6" onerror="this.style.display='none'"/>
|
|
</div>
|
|
}
|
|
<h3 class="cyberpunk-feature-title text-lg font-semibold" style="color: hsl(var(--foreground)); font-family: var(--font-heading, 'Space Grotesk', system-ui, sans-serif);">
|
|
{ data.Title }
|
|
</h3>
|
|
if data.Body != "" {
|
|
<div class="cyberpunk-feature-body text-sm leading-relaxed" style="color: hsl(var(--muted-foreground));">
|
|
@templ.Raw(data.Body)
|
|
</div>
|
|
}
|
|
</article>
|
|
}
|