showing a full height image in image page
This commit is contained in:
@ -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>
|
||||
);
|
||||
};
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user