mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-28 06:13:15 +00:00
45 lines
1.4 KiB
Text
45 lines
1.4 KiB
Text
---
|
|
import "../styles/styles.scss";
|
|
|
|
interface Props {
|
|
title: string;
|
|
src?: string,
|
|
alt: string,
|
|
}
|
|
|
|
const { title, src, alt } = Astro.props;
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="description" content="Astro description" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<meta name="generator" content={Astro.generator} />
|
|
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
|
|
|
<title>{title}</title>
|
|
</head>
|
|
<body>
|
|
<div class="banner">
|
|
{src && (
|
|
<img src={src} alt={alt} />
|
|
<script>
|
|
const img = document.querySelector(".banner > img");
|
|
document.addEventListener("scroll", () => {
|
|
img.style.top = `${window.scrollY}px`;
|
|
img.style.filter = `blur(${window.scrollY / 100}px)`;
|
|
})
|
|
</script>
|
|
)}
|
|
</div>
|
|
<main>
|
|
<slot />
|
|
</main>
|
|
</body>
|
|
</html>
|