aboutsummaryrefslogtreecommitdiff
path: root/web/src/components/Hero.astro
blob: 94c7e34c85bd04ade2abf074ae11126691ec433b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
import {type ImageMetadata} from "astro";
import {Picture} from "astro:assets";

export type Props = {
	image: ImageMetadata,
	alt: string
}
---
<div class="relative text-white overflow-hidden h-80">
	<div class="inset-0 absolute pointer-events-none">
		<Picture src={Astro.props.image} alt={Astro.props.alt}
				 class="object-cover object-center w-full h-full"></Picture>
		<div class="absolute inset-0 bg-black opacity-30"></div>
	</div>
	<div class="relative z-10 flex flex-col justify-center items-center h-full text-center">
		<slot/>
	</div>
</div>