From 1b81a7bcf4d52e44f5bf3d919b866c202074440b Mon Sep 17 00:00:00 2001 From: Mikkel Svartveit Date: Wed, 18 Oct 2023 18:28:09 -0700 Subject: [PATCH] Load low-res thumbnails --- src/components/Photo.astro | 7 +++++-- src/pages/photography/[photo].astro | 2 +- src/pages/photography/index.astro | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Photo.astro b/src/components/Photo.astro index f6adaab..8dfb6c5 100644 --- a/src/components/Photo.astro +++ b/src/components/Photo.astro @@ -3,16 +3,19 @@ import { Image } from "astro:assets"; interface Props { photo: any; + width?: number; + height?: number; class?: string; } -const { photo, class: className } = Astro.props; +const { photo, width, height, class: className } = Astro.props; --- - + diff --git a/src/pages/photography/index.astro b/src/pages/photography/index.astro index 1a34992..90dc7c8 100644 --- a/src/pages/photography/index.astro +++ b/src/pages/photography/index.astro @@ -48,7 +48,7 @@ export const getFileNameFromPath = (path: string) => { class="flex w-full py-2 duration-100 hover:-translate-y-1 rounded-lg" >
- +
))