src/components/cta/CTAWithTestimonial.astro
---
/**
* CTAWithTestimonial
* CTA sectie met een klantcitaat als social proof ernaast.
*/
interface Props {
headline: string;
sub?: string;
primary: { label: string; href: string };
testimonial: { quote: string; name: string; role: string; avatar?: string };
}
const { headline, sub, primary, testimonial } = Astro.props;
---
<section class="ctawt">
<div class="ctawt-inner">
<div class="ctawt-left">
<h2 class="ctawt-headline">{headline}</h2>
{sub && <p class="ctawt-sub">{sub}</p>}
<a href={primary.href} class="ctawt-btn">{primary.label} →</a>
</div>
<div class="ctawt-right">
<blockquote class="ctawt-quote">
<p class="ctawt-quote-text">"{testimonial.quote}"</p>
<footer class="ctawt-quote-footer">
{testimonial.avatar && <img src={testimonial.avatar} alt={testimonial.name} class="ctawt-avatar" />}
<div>
<cite class="ctawt-name">{testimonial.name}</cite>
<span class="ctawt-role">{testimonial.role}</span>
</div>
</footer>
</blockquote>
</div>
</div>
</section>
<style>
.ctawt { background: #f8fafc; padding: 5rem 2rem; border-top: 1px solid #e5e7eb; }
.ctawt-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.ctawt-headline { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 900; color: #0a0a0a; letter-spacing: -0.04em; line-height: 1.15; margin: 0 0 1rem; }
.ctawt-sub { font-size: 1.0625rem; color: #6b7280; line-height: 1.65; margin: 0 0 2rem; }
.ctawt-btn { display: inline-flex; align-items: center; padding: 0.875rem 2rem; 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; }
.ctawt-btn:hover { opacity: 0.88; }
.ctawt-right { }
.ctawt-quote { background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem; padding: 2.5rem; margin: 0; }
.ctawt-quote-text { font-size: 1.125rem; color: #0a0a0a; line-height: 1.65; font-style: italic; margin: 0 0 1.5rem; }
.ctawt-quote-footer { display: flex; align-items: center; gap: 0.875rem; }
.ctawt-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ctawt-name { display: block; font-size: 0.9375rem; font-weight: 700; color: #0a0a0a; font-style: normal; }
.ctawt-role { display: block; font-size: 0.8125rem; color: #6b7280; }
@media (max-width: 768px) { .ctawt-inner { grid-template-columns: 1fr; gap: 2.5rem; } }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
headline * | string | — | Hoofd CTA tekst |
primary * | { label: string; href: string } | — | Primaire knop |
testimonial * | { quote: string; name: string; role: string; avatar?: string } | — | Klantcitaat object |
sub | string | — | Ondertitel |
* = verplicht