naslovnice kartic: object-position center 25% na vseh straneh (aktuelles, videos, iskanje, domaca), da glave niso odrezane
This commit is contained in:
parent
df15293ea3
commit
2ec7c259c3
@ -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>
|
||||
)}
|
||||
|
||||
@ -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}%`;
|
||||
}
|
||||
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user