src/components/cta/CTADark.astro
---
/**
* CTADark
* Donkere CTA sectie met grote headline en twee knoppen.
*/
interface Props {
headline: string;
sub?: string;
primary: { label: string; href: string };
secondary?: { label: string; href: string };
badge?: string;
}
const { headline, sub, primary, secondary, badge } = Astro.props;
---
<section class="ctad">
<div class="ctad-inner">
{badge && <span class="ctad-badge">{badge}</span>}
<h2 class="ctad-headline">{headline}</h2>
{sub && <p class="ctad-sub">{sub}</p>}
<div class="ctad-btns">
<a href={primary.href} class="ctad-btn-primary">{primary.label}</a>
{secondary && <a href={secondary.href} class="ctad-btn-secondary">{secondary.label}</a>}
</div>
</div>
</section>
<style>
.ctad { background: #0a0a0a; padding: 6rem 2rem; }
.ctad-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.ctad-badge { display: inline-block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent,#6366f1); background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); padding: 0.3rem 0.875rem; border-radius: 999px; margin-bottom: 1.5rem; }
.ctad-headline { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; color: #fff; letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 1.25rem; }
.ctad-sub { font-size: 1.0625rem; color: rgba(255,255,255,0.55); line-height: 1.65; margin: 0 0 2.5rem; }
.ctad-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.ctad-btn-primary { padding: 0.875rem 2.25rem; background: var(--color-accent,#6366f1); color: #fff; font-weight: 700; font-size: 0.9375rem; border-radius: 0.5rem; text-decoration: none; transition: opacity 0.2s; }
.ctad-btn-primary:hover { opacity: 0.88; }
.ctad-btn-secondary { padding: 0.875rem 2.25rem; border: 1.5px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.75); font-weight: 600; font-size: 0.9375rem; border-radius: 0.5rem; text-decoration: none; transition: all 0.2s; }
.ctad-btn-secondary:hover { border-color: rgba(255,255,255,0.45); color: #fff; }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
headline * | string | — | Hoofd CTA tekst |
sub | string | — | Ondertitel |
primary * | { label: string; href: string } | — | Primaire knop |
secondary | { label: string; href: string } | — | Secundaire knop |
badge | string | — | Badge boven de headline |
* = verplicht