mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-31 15:53:15 +00:00
Import image from path
Update page title based on post/project title Use more optimised Image element leg
This commit is contained in:
parent
5c41d81288
commit
44a15873f4
9 changed files with 60 additions and 25 deletions
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
import "../styles/styles.scss";
|
||||
|
||||
import { Image } from "astro:assets";
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
src?: string,
|
||||
|
@ -28,7 +30,7 @@ const { title, src, alt } = Astro.props;
|
|||
<body>
|
||||
<div class="banner">
|
||||
{src && (
|
||||
<img src={src} alt={alt} />
|
||||
<Image src={src} width="1080" height="700" loading="eager" alt={alt} />
|
||||
<script>
|
||||
const img = document.querySelector(".banner > img");
|
||||
document.addEventListener("scroll", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue