Fixed image taking whole page on post page

This commit is contained in:
HangerThem 2026-08-04 14:47:00 +02:00
parent 4b84b65d76
commit f120dfbc4d

View file

@ -9,7 +9,7 @@ type ImageWrapperProps = {
export function ImageWrapper({ src, alt, isListing }: ImageWrapperProps) { export function ImageWrapper({ src, alt, isListing }: ImageWrapperProps) {
return ( return (
<figure className={cn('flex flex-col items-center gap-1 mb-4 w-full h-full')}> <figure className={cn('flex flex-col items-center gap-1 mb-4 w-full', isListing && 'h-full')}>
<div className="border border-border rounded-xl w-full overflow-hidden flex-1"> <div className="border border-border rounded-xl w-full overflow-hidden flex-1">
<div <div
className="flex items-center gap-2 px-2 h-6 border-b border-border w-full bg-fg/10" className="flex items-center gap-2 px-2 h-6 border-b border-border w-full bg-fg/10"
@ -25,11 +25,11 @@ export function ImageWrapper({ src, alt, isListing }: ImageWrapperProps) {
<Image <Image
src={`/posts/${src}`} src={`/posts/${src}`}
alt={alt ?? ''} alt={alt ?? ''}
width={isListing ? 400 : 1800} width={isListing ? 400 : 900}
height={isListing ? 240 : 1200} height={isListing ? 240 : 600}
quality={isListing ? 75 : 100} quality={isListing ? 75 : 100}
priority={true} priority={true}
className="w-auto mx-auto object-cover h-full" className="w-full mx-auto object-contain h-full max-h-150"
/> />
</div> </div>
{!isListing && alt && ( {!isListing && alt && (