Vorschau zeigt immer das ganze Bild, eingepasst mit Rand (1.0.1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-28 16:39:16 +00:00
parent 14aaa16b30
commit dce39774a2
13 changed files with 17 additions and 17 deletions

View file

@ -10,10 +10,10 @@ defineProps({
<template>
<article class="ih:group ih:flex ih:flex-col ih:overflow-hidden ih:rounded-lg ih:border ih:bg-card ih:shadow-xs ih:transition-shadow ih:hover:shadow-md">
<!-- Kunstwerke nicht beschneiden: ganzes Bild auf ruhigem Grund -->
<Link :href="item.url" prefetch class="ih:relative ih:grid ih:aspect-[4/3] ih:place-items-center ih:overflow-hidden ih:bg-muted ih:p-3">
<img v-if="item.thumb_url" :src="item.thumb_url" :alt="item.title" loading="lazy" class="ih:max-h-full ih:max-w-full ih:object-contain ih:shadow-sm ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]" />
<ImageOff v-else class="ih:size-8 ih:text-muted-foreground" :stroke-width="1.5" />
<!-- Immer das ganze Bild: in die Fläche eingepasst, mit Rand – nie ein Ausschnitt -->
<Link :href="item.url" prefetch class="ih:relative ih:block ih:aspect-[4/3] ih:overflow-hidden ih:bg-muted ih:p-3 ih:pt-9">
<img v-if="item.thumb_url" :src="item.thumb_url" :alt="item.title" loading="lazy" class="ih:size-full ih:object-contain ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]" />
<span v-else class="ih:grid ih:size-full ih:place-items-center"><ImageOff class="ih:size-8 ih:text-muted-foreground" :stroke-width="1.5" /></span>
<StatusBadge :lent="item.lent" class="ih:absolute ih:top-2 ih:left-2" />
</Link>
<div class="ih:flex ih:flex-1 ih:flex-col ih:gap-1 ih:p-3">

View file

@ -9,7 +9,7 @@ defineProps({ pending: { type: Array, required: true } });
<Panel title="Verleih – offene Anfragen" action-label="Zu den Anfragen" action-href="/verleih/anfragen">
<ul v-if="pending.length" class="ih:-mx-5 ih:divide-y ih:border-t">
<li v-for="r in pending" :key="r.id" class="ih:flex ih:items-center ih:gap-3 ih:px-5 ih:py-2.5">
<img v-if="r.item?.thumb_url" :src="r.item.thumb_url" alt="" class="ih:size-10 ih:rounded ih:bg-muted ih:object-contain" />
<img v-if="r.item?.thumb_url" :src="r.item.thumb_url" alt="" class="ih:size-10 ih:rounded ih:bg-muted ih:object-contain ih:p-0.5" />
<div class="ih:min-w-0 ih:flex-1">
<Link :href="r.item?.url ?? '/verleih/anfragen'" class="ih:block ih:truncate ih:text-sm ih:font-medium ih:hover:underline">{{ r.item?.title }}</Link>
<p class="ih:truncate ih:text-xs ih:text-muted-foreground">{{ r.user?.name }} · nach {{ r.location }}</p>

View file

@ -58,8 +58,8 @@ const period = (r) => [r.from ? `ab ${formatDate(r.from)}` : null, r.until ? `bi
<h2 id="offen" class="ih:mb-3 ih:text-sm ih:font-semibold">Offen <span class="ih:text-muted-foreground">({{ pending.length }})</span></h2>
<div v-if="pending.length" class="ih:grid ih:gap-3">
<article v-for="request in pending" :key="request.id" class="ih:grid ih:gap-4 ih:rounded-lg ih:border ih:bg-card ih:p-4 ih:sm:grid-cols-[7rem_minmax(0,1fr)_auto] ih:sm:items-center">
<Link :href="request.item?.url ?? '#'" class="ih:grid ih:aspect-[4/3] ih:w-28 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted">
<img v-if="request.item?.thumb_url" :src="request.item.thumb_url" :alt="request.item.title" class="ih:max-h-full ih:max-w-full ih:object-contain" />
<Link :href="request.item?.url ?? '#'" class="ih:grid ih:aspect-[4/3] ih:w-28 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted ih:p-1.5">
<img v-if="request.item?.thumb_url" :src="request.item.thumb_url" :alt="request.item.title" class="ih:size-full ih:object-contain" />
<ImageOff v-else class="ih:size-6 ih:text-muted-foreground" />
</Link>
<div class="ih:grid ih:min-w-0 ih:gap-1.5">

View file

@ -142,7 +142,7 @@ const period = (from, until) =>
<!-- Vergrößerung -->
<div v-if="zoom" class="ih:fixed ih:inset-0 ih:z-50 ih:grid ih:place-items-center ih:bg-black/85 ih:p-4" role="dialog" aria-modal="true" :aria-label="item.title" @click="zoom = false">
<img :src="item.image_url" :alt="item.title" class="ih:max-h-full ih:max-w-full ih:object-contain" />
<img :src="item.image_url" :alt="item.title" class="ih:size-full ih:object-contain" />
<button type="button" class="ih:absolute ih:top-4 ih:right-4 ih:grid ih:size-10 ih:place-items-center ih:rounded-full ih:bg-white/15 ih:text-white" aria-label="Schließen" @click.stop="zoom = false"><X /></button>
</div>
</AppLayout>