src/components/image/ImageProfile.astro
---
interface Props {
src?: string;
alt?: string;
name?: string;
role?: string;
bio?: string;
linkedin?: string;
}
const {
src = '',
alt = 'Profielfoto',
name = 'Lotte van den Berg',
role = 'Strategy Director',
bio = 'Lotte begeleidt merken van positionering tot performance. Met 10 jaar ervaring in B2B en e-commerce weet ze precies hoe je een merk laat groeien.',
linkedin = '#',
} = Astro.props;
---
<div class="ipr">
<div class="ipr__avatar">
{src ? (
<img class="ipr__img" src={src} alt={alt} />
) : (
<div class="ipr__placeholder" aria-label={alt}></div>
)}
</div>
<div class="ipr__info">
<p class="ipr__name">{name}</p>
<p class="ipr__role">{role}</p>
{bio && <p class="ipr__bio">{bio}</p>}
{linkedin && (
<a class="ipr__link" href={linkedin} aria-label={`LinkedIn van ${name}`}>LinkedIn →</a>
)}
</div>
</div>
<style>
:root {
--color-accent: #6366f1;
--color-primary: #0a0a0a;
}
.ipr {
display: flex;
align-items: flex-start;
gap: 1.5rem;
padding: 1.5rem;
background: #fff;
border: 1px solid #eee;
border-radius: 12px;
}
.ipr__avatar {
flex-shrink: 0;
width: 80px;
height: 80px;
border-radius: 50%;
overflow: hidden;
border: 3px solid var(--color-accent, #6366f1);
}
.ipr__img {
width: 100%;
height: 100%;
object-fit: cover;
}
.ipr__placeholder {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #c8c8f0 0%, #a0a0e0 100%);
}
.ipr__info { flex: 1; }
.ipr__name {
font-size: 1.1rem;
font-weight: 700;
color: var(--color-primary, #0a0a0a);
margin: 0 0 0.2rem;
}
.ipr__role {
font-size: 0.85rem;
font-weight: 600;
color: var(--color-accent, #6366f1);
margin: 0 0 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.ipr__bio {
font-size: 0.9rem;
color: #555;
line-height: 1.6;
margin: 0 0 0.75rem;
}
.ipr__link {
font-size: 0.85rem;
font-weight: 600;
color: var(--color-accent, #6366f1);
text-decoration: none;
}
.ipr__link:hover { text-decoration: underline; }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
src | string | — | Profielfoto URL |
alt | string | — | Alt-tekst |
name | string | — | Naam |
role | string | — | Functietitel |
bio | string | — | Korte bio |
linkedin | string | — | LinkedIn URL |
* = verplicht