src/components/video/VideoTestimonial2.astro
---
/**
* VideoTestimonial2
* Video-testimonial raster met miniaturen
*/
interface Props {
headline?: string;
items?: { name: string; role: string; company: string; duration?: string }[];
}
const {
headline = 'Klanten aan het woord',
items = [
{ name: 'Sophie Bakker', role: 'Marketing Manager', company: 'FreshDrop', duration: '2:14' },
{ name: 'Niels de Vries', role: 'Directeur', company: 'BouwPlus BV', duration: '3:07' },
{ name: 'Layla Hassan', role: 'E-commerce Lead', company: 'Skinify', duration: '1:58' },
{ name: 'Tom van Rijn', role: 'Founder', company: 'PetBox NL', duration: '4:33' },
],
} = Astro.props;
const colors = ['#1e1b4b', '#0f172a', '#1a0a2e', '#0c1a2e'];
---
<section class="vt2">
<div class="vt2__inner">
{headline && <h2 class="vt2__headline">{headline}</h2>}
<div class="vt2__grid">
{items.map((item, i) => (
<div class="vt2__card" style={`--card-bg: ${colors[i % colors.length]}`}>
<div class="vt2__thumb">
<button class="vt2__play-btn" aria-label={`Bekijk testimonial van ${item.name}`}>
<span class="vt2__play-icon" aria-hidden="true">▶</span>
</button>
{item.duration && <span class="vt2__dur">{item.duration}</span>}
</div>
<div class="vt2__info">
<p class="vt2__name">{item.name}</p>
<p class="vt2__role">{item.role} · {item.company}</p>
</div>
</div>
))}
</div>
</div>
</section>
<style>
.vt2 {
background: #f9f9fb;
padding: 4rem 1.5rem;
}
.vt2__inner {
max-width: 1000px;
margin: 0 auto;
}
.vt2__headline {
font-size: 1.75rem;
font-weight: 700;
color: var(--color-primary, #0a0a0a);
margin: 0 0 2rem;
}
.vt2__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 1.25rem;
}
.vt2__card {
border-radius: 12px;
overflow: hidden;
background: #fff;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
transition: transform 0.2s, box-shadow 0.2s;
cursor: pointer;
}
.vt2__card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.vt2__thumb {
aspect-ratio: 4/3;
background: var(--card-bg, #1e1b4b);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.vt2__play-btn {
background: rgba(255,255,255,0.15);
border: 2px solid rgba(255,255,255,0.4);
width: 52px;
height: 52px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.vt2__play-btn:hover { background: rgba(255,255,255,0.28); }
.vt2__play-icon {
color: #fff;
font-size: 1.1rem;
padding-left: 3px;
}
.vt2__dur {
position: absolute;
bottom: 0.5rem;
right: 0.6rem;
background: rgba(0,0,0,0.65);
color: #fff;
font-size: 0.7rem;
font-weight: 600;
padding: 0.15rem 0.4rem;
border-radius: 4px;
font-variant-numeric: tabular-nums;
}
.vt2__info {
padding: 0.85rem 1rem;
}
.vt2__name {
font-size: 0.9rem;
font-weight: 700;
color: var(--color-primary, #0a0a0a);
margin: 0 0 0.2rem;
}
.vt2__role {
font-size: 0.76rem;
color: #888;
margin: 0;
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
headline | string | — | Sectietitel |
items | { name: string; role: string; company: string; duration?: string }[] | — | Testimonial items |
* = verplicht