fix: KöPi - Bild Proxy mit Referer, Adresse, kein Produktuntertitel
This commit is contained in:
@@ -35,42 +35,45 @@ function OfferCard({ offer }) {
|
||||
display:'flex', flexDirection:'column',
|
||||
}}>
|
||||
{/* Produktbild */}
|
||||
<div style={{ height:160, background:'#fff', display:'flex', alignItems:'center', justifyContent:'center', flexShrink:0, overflow:'hidden', position:'relative' }}>
|
||||
{offer.image
|
||||
? <img src={`/api/tools/koepi/img?url=${encodeURIComponent(offer.image)}`}
|
||||
alt={offer.name} style={{ maxHeight:'100%', maxWidth:'100%', objectFit:'contain' }}
|
||||
onError={e => { e.target.style.display='none'; }}
|
||||
/>
|
||||
: null
|
||||
}
|
||||
{offer.badge && (
|
||||
<div style={{ position:'absolute', top:6, left:6, background:'#e2001a', color:'#fff',
|
||||
borderRadius:4, padding:'2px 6px', fontSize:9, fontFamily:'monospace', fontWeight:700 }}>
|
||||
{offer.badge}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{offer.image && (
|
||||
<div style={{ height:160, background:'#f5f5f5', display:'flex', alignItems:'center', justifyContent:'center', flexShrink:0, overflow:'hidden', position:'relative' }}>
|
||||
<img
|
||||
src={`/api/tools/koepi/img?url=${encodeURIComponent(offer.image)}`}
|
||||
alt="König Pilsener"
|
||||
style={{ maxHeight:'100%', maxWidth:'100%', objectFit:'contain' }}
|
||||
onError={e => { e.target.parentElement.style.display='none'; }}
|
||||
/>
|
||||
{offer.oldPrice && (
|
||||
<div style={{ position:'absolute', top:6, left:6, background:'#e2001a', color:'#fff',
|
||||
borderRadius:4, padding:'2px 6px', fontSize:9, fontFamily:'monospace', fontWeight:700 }}>
|
||||
-29%
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div style={{ padding:'12px 14px', flex:1, display:'flex', flexDirection:'column', gap:5 }}>
|
||||
{/* Händler Badge */}
|
||||
<div style={{
|
||||
display:'inline-block', alignSelf:'flex-start',
|
||||
background:`${color}22`, border:`1px solid ${color}55`,
|
||||
borderRadius:4, padding:'2px 8px',
|
||||
color, fontFamily:'monospace', fontSize:10, fontWeight:700,
|
||||
}}>{offer.retailer}</div>
|
||||
{/* Händler Badge + Adresse */}
|
||||
<div>
|
||||
<div style={{
|
||||
display:'inline-block',
|
||||
background:`${color}22`, border:`1px solid ${color}55`,
|
||||
borderRadius:4, padding:'2px 8px', marginBottom:3,
|
||||
color, fontFamily:'monospace', fontSize:10, fontWeight:700,
|
||||
}}>{offer.retailer}</div>
|
||||
{offer.address && (
|
||||
<div style={{ color:'rgba(255,255,255,0.3)', fontFamily:'monospace', fontSize:9 }}>
|
||||
📍 {offer.address}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Name + Marke */}
|
||||
{/* König Pilsener */}
|
||||
<div style={{ color:'#fff', fontFamily:'monospace', fontSize:13, fontWeight:600, lineHeight:1.3 }}>
|
||||
König Pilsener
|
||||
</div>
|
||||
{offer.name && offer.name.toLowerCase() !== 'könig pilsener' && (
|
||||
<div style={{ color:'rgba(255,255,255,0.5)', fontFamily:'monospace', fontSize:11 }}>
|
||||
{offer.name}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Beschreibung/Flaschengröße */}
|
||||
{/* Flaschengröße/Beschreibung */}
|
||||
{offer.description && (
|
||||
<div style={{ color:'rgba(255,255,255,0.55)', fontFamily:'monospace', fontSize:10, lineHeight:1.5 }}>
|
||||
{offer.description}
|
||||
|
||||
Reference in New Issue
Block a user