naslovnice kartic: object-position center 25% na vseh straneh (aktuelles, videos, iskanje, domaca), da glave niso odrezane

This commit is contained in:
claude 2026-08-19 22:27:33 +02:00
parent df15293ea3
commit 2ec7c259c3
4 changed files with 6 additions and 6 deletions

View File

@ -142,7 +142,7 @@ export default function AktuellesPage() {
src={a.coverImage}
alt={a.title}
loading="lazy"
className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
style={{ objectPosition: "center 25%" }} className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
/>
</div>
)}

View File

@ -142,9 +142,9 @@ function GalleryHeroCard({ images }: { images: GalleryImage[] }) {
}
function getObjectPosition(coverImage: string | null, focalPoints?: Record<string, { x: number; y: number }>): string {
if (!coverImage || !focalPoints) return "center 20%";
if (!coverImage || !focalPoints) return "center 25%";
const fp = focalPoints[coverImage];
if (!fp) return "center 20%";
if (!fp) return "center 25%";
return `${fp.x}% ${fp.y}%`;
}

View File

@ -130,7 +130,7 @@ export default function SearchPage() {
<img
src={article.coverImage}
alt={article.title}
className="w-24 h-24 sm:w-32 sm:h-20 object-cover rounded-md flex-shrink-0"
style={{ objectPosition: "center 25%" }} className="w-24 h-24 sm:w-32 sm:h-20 object-cover rounded-md flex-shrink-0"
/>
)}
<div className="flex-1 min-w-0">
@ -165,7 +165,7 @@ export default function SearchPage() {
<img
src={video.thumbnail}
alt={video.title}
className="w-full h-full object-cover rounded-md"
style={{ objectPosition: "center 25%" }} className="w-full h-full object-cover rounded-md"
/>
<div className="absolute inset-0 flex items-center justify-center">
<div className="w-8 h-8 rounded-full bg-primary/80 flex items-center justify-center">

View File

@ -36,7 +36,7 @@ function VideoCard({ article }: { article: Article }) {
<img
src={thumbSrc}
alt={article.title}
className="w-full aspect-video object-cover transition-transform duration-500 group-hover:scale-105"
style={{ objectPosition: "center 25%" }} className="w-full aspect-video object-cover transition-transform duration-500 group-hover:scale-105"
loading="lazy"
/>
</div>