showing a full height image in image page

This commit is contained in:
2025-08-25 14:34:55 +01:00
parent 61d2b81e8c
commit 6523b10699
2 changed files with 13 additions and 2 deletions

View File

@ -12,3 +12,14 @@ export const ImageComponent: Component<{ ID: string }> = (props) => {
</A>
);
};
export const ImageComponentFullHeight: Component<{ ID: string }> = (props) => {
return (
<A href={`/image/${props.ID}`} class="w-full flex justify-center">
<img
class="flex w-full object-cover rounded-xl"
src={`${base}/images/${props.ID}`}
/>
</A>
);
};

View File

@ -1,4 +1,4 @@
import { ImageComponent } from "@components/image";
import { ImageComponentFullHeight } from "@components/image";
import { useSearchImageContext } from "@contexts/SearchImageContext";
import { useParams } from "@solidjs/router";
import { For, type Component } from "solid-js";
@ -15,7 +15,7 @@ export const ImagePage: Component = () => {
return (
<main class="flex flex-col items-center gap-4">
<div class="w-full bg-white rounded-xl p-4">
<ImageComponent ID={imageId} />
<ImageComponentFullHeight ID={imageId} />
</div>
<div class="w-full bg-white rounded-xl p-4 flex flex-col gap-4">
<h2 class="font-bold text-2xl">Description</h2>