TestimonialsCoverPhoto Social Proof
Grote cover-foto testimonial — één highlighted quote, gradient overlay, rating sterren.
src/components/social-proof/TestimonialsCoverPhoto.astro
---
/**
* TestimonialsCoverPhoto
* Grote cover-foto testimonial — één highlighted quote met achtergrondafbeelding.
*/
interface Props {
quote: string;
author: string;
role?: string;
company?: string;
avatar?: string;
imageSrc: string;
imageAlt?: string;
logoSrc?: string;
rating?: number;
}
const {
quote,
author,
role,
company,
avatar,
imageSrc,
imageAlt = '',
logoSrc,
rating,
} = Astro.props;
---
<section class="tcp" data-component="testimonials-cover-photo">
<div class="tcp__inner">
<div class="tcp__card">
<div class="tcp__photo">
<img src={imageSrc} alt={imageAlt} class="tcp__photo-img" />
<div class="tcp__photo-overlay"></div>
</div>
<div class="tcp__content">
{logoSrc && <img src={logoSrc} alt={company ?? ''} class="tcp__logo" />}
{rating && (
<div class="tcp__stars">
{Array.from({ length: rating }).map(() => (
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
</svg>
))}
</div>
)}
<blockquote class="tcp__quote">
<svg class="tcp__quote-icon" width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
<path d="M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z"/>
</svg>
<p class="tcp__quote-text">{quote}</p>
</blockquote>
<div class="tcp__author">
{avatar && <img src={avatar} alt={author} class="tcp__avatar" />}
<div>
<div class="tcp__author-name">{author}</div>
{(role || company) && (
<div class="tcp__author-meta">
{role}{role && company ? ' · ' : ''}{company}
</div>
)}
</div>
</div>
</div>
</div>
</div>
</section>
<style>
.tcp {
background: var(--color-bg, #fff);
padding: 5rem 1.5rem;
}
.tcp__inner {
max-width: 1100px;
margin: 0 auto;
}
.tcp__card {
position: relative;
border-radius: calc(var(--radius, 0.5rem) * 3);
overflow: hidden;
min-height: 480px;
display: flex;
align-items: stretch;
}
.tcp__photo {
position: absolute;
inset: 0;
}
.tcp__photo-img {
width: 100%;
height: 100%;
object-fit: cover;
}
.tcp__photo-overlay {
position: absolute;
inset: 0;
background: linear-gradient(105deg, rgba(0,0,0,0.75) 40%, rgba(0,0,0,0.2) 100%);
}
.tcp__content {
position: relative;
z-index: 1;
padding: 3.5rem 4rem;
max-width: 600px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 1.5rem;
}
.tcp__logo {
height: 28px;
object-fit: contain;
object-position: left;
filter: brightness(0) invert(1);
opacity: 0.9;
}
.tcp__stars {
display: flex;
gap: 3px;
color: #f59e0b;
}
.tcp__quote-icon {
color: var(--color-accent, #6366f1);
margin-bottom: 0.625rem;
}
.tcp__quote-text {
font-size: clamp(1.125rem, 2vw, 1.5rem);
font-weight: 500;
line-height: 1.55;
color: #fff;
}
.tcp__author {
display: flex;
align-items: center;
gap: 0.875rem;
}
.tcp__avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
border: 2px solid rgba(255,255,255,0.3);
}
.tcp__author-name {
font-weight: 700;
font-size: 0.9375rem;
color: #fff;
}
.tcp__author-meta {
font-size: 0.8125rem;
color: rgba(255,255,255,0.6);
}
@media (max-width: 640px) {
.tcp__content { padding: 2.5rem 1.75rem; }
.tcp__card { min-height: 400px; }
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
quote * | string | — | Quote tekst |
author * | string | — | Naam auteur |
imageSrc * | string | — | Cover foto URL |
role | string | — | Functietitel |
company | string | — | Bedrijfsnaam |
rating | number | — | Ster-rating (1-5) |
* = verplicht