Horoskopska stran: slike znamenj (image_url + /api/horoscopes/images)
This commit is contained in:
@@ -43,6 +43,7 @@ interface AIHoroscope {
|
||||
tip: string;
|
||||
weekly: string;
|
||||
monthly: string;
|
||||
imageUrl?: string | null;
|
||||
}
|
||||
|
||||
function StarRating({ count }: { count: number }) {
|
||||
@@ -161,6 +162,14 @@ function SignGrid({ onSelect, selectedIndex, aiHoroscopes }: { onSelect: (i: num
|
||||
}`}
|
||||
data-testid={`button-sign-grid-${sign.name.toLowerCase()}`}
|
||||
>
|
||||
{(horoscope as any).imageUrl && (
|
||||
<img
|
||||
src={(horoscope as any).imageUrl}
|
||||
alt={`Sternzeichen ${sign.name}`}
|
||||
loading="lazy"
|
||||
className="w-full h-24 object-cover rounded-lg mb-3"
|
||||
/>
|
||||
)}
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<span className="text-2xl">{sign.symbol}</span>
|
||||
<div>
|
||||
@@ -227,6 +236,15 @@ function SignDetail({ signIndex, onNavigate, aiHoroscopes }: { signIndex: number
|
||||
|
||||
<div className="space-y-0">
|
||||
<div className="bg-card rounded-xl border border-card-border p-6 md:p-8" data-testid={`card-horoscope-${sign.name.toLowerCase()}`}>
|
||||
{(horoscope as any).imageUrl && (
|
||||
<img
|
||||
src={(horoscope as any).imageUrl}
|
||||
alt={`Tageshoroskop ${sign.name}`}
|
||||
loading="lazy"
|
||||
className="w-full rounded-xl mb-6 object-cover aspect-[3/2]"
|
||||
data-testid="img-horoscope-sign"
|
||||
/>
|
||||
)}
|
||||
<div className="flex items-start gap-4 mb-6">
|
||||
<div className={`w-20 h-20 rounded-2xl ${ec.bg} border ${ec.border} flex items-center justify-center flex-shrink-0`}>
|
||||
<span className="text-5xl">{sign.symbol}</span>
|
||||
|
||||
Reference in New Issue
Block a user