src/components/image/ImageCinematic.astro
---
/**
* ImageCinematic
* Cinematisch brede afbeelding met donkere overlay en onderschrift
*/
interface Props {
src?: string;
alt?: string;
caption?: string;
}
const {
src = 'https://images.unsplash.com/photo-1497366216548-37526070297c?w=1600&q=80',
alt = 'Modern kantoor interieur in zwart-wit stijl',
caption = 'Het BLURR kantoor in Amsterdam — waar strategie en creativiteit samenkomen.',
} = Astro.props;
---
<figure class="icin">
<div class="icin__frame">
<div class="icin__bars" aria-hidden="true"></div>
<img class="icin__img" src={src} alt={alt} loading="lazy" />
<div class="icin__overlay"></div>
<div class="icin__bars icin__bars--bottom" aria-hidden="true"></div>
</div>
{caption && <figcaption class="icin__caption">{caption}</figcaption>}
</figure>
<style>
.icin {
margin: 0;
padding: 2rem 0;
overflow: hidden;
}
.icin__frame {
position: relative;
width: 100%;
aspect-ratio: 21/9;
overflow: hidden;
}
.icin__img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
filter: grayscale(20%) brightness(0.85);
}
.icin__overlay {
position: absolute;
inset: 0;
background: rgba(10,10,10,0.3);
}
.icin__bars {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 80px;
background: var(--color-primary, #0a0a0a);
z-index: 1;
}
.icin__bars--bottom {
top: auto;
bottom: 0;
}
.icin__caption {
display: block;
text-align: center;
font-size: 0.78rem;
color: #aaa;
font-style: italic;
margin: 0.85rem 1.5rem 0;
letter-spacing: 0.02em;
line-height: 1.6;
}
@media (max-width: 600px) {
.icin__frame { aspect-ratio: 16/9; }
.icin__bars { height: 48px; }
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
src | string | — | Afbeelding URL |
alt | string | — | Alt tekst |
caption | string | — | Bijschrift |
* = verplicht