diff --git a/src/components/HeroCard.astro b/src/components/HeroCard.astro index b8db077..66fb020 100644 --- a/src/components/HeroCard.astro +++ b/src/components/HeroCard.astro @@ -15,7 +15,7 @@ interface Props { } const { - data: { title, cover, icon, date, reviewRating }, + data: { title, cover, icon, date, rating }, collection, body, id, @@ -28,11 +28,11 @@ const link = translatePath(`/${collection}/${id.split("/")[0]}`); --- + classes={`max-h-250px grid gradient border-1 border-neutral overflow-hidden ${cover ? "grid-rows-[200px_1fr] xs:grid-rows-none xs:grid-cols-[1fr_200px]" : ""}`}> { - (date || body || reviewRating !== undefined) && ( - + (date || body || rating !== undefined) && ( + ) } diff --git a/src/components/Image.astro b/src/components/Image.astro index 332aa55..5c65dd2 100644 --- a/src/components/Image.astro +++ b/src/components/Image.astro @@ -15,12 +15,12 @@ interface Props { } async function checkImage(image: ImageMetadata) { - const src = image.src; + const src = typeof image === "string" ? image : image.src; if (!src) return false; try { if (src.startsWith("/@fs") || src.startsWith("/_astro")) return true; const res = await inferRemoteSize(src); - if (res.format) { + console.log(res) image.format = res.format; return true; } else { diff --git a/src/components/card/Metadata.svelte b/src/components/card/Metadata.svelte index 51762ca..225c585 100644 --- a/src/components/card/Metadata.svelte +++ b/src/components/card/Metadata.svelte @@ -1,6 +1,7 @@