| @@ -850,7 +850,7 @@ export default function AdminDashboard() { | |||||
| {/* Hero Upload with Remove Button */} | {/* Hero Upload with Remove Button */} | ||||
| <div> | <div> | ||||
| <label className="block text-sm font-semibold text-gray-700 mb-1">Hero Background Image</label> | |||||
| <label className="block text-sm font-semibold text-gray-700 mb-1">Background Image</label> | |||||
| <div className="flex items-center gap-3 flex-wrap"> | <div className="flex items-center gap-3 flex-wrap"> | ||||
| <label className="cursor-pointer bg-gray-100 hover:bg-gray-200 text-gray-800 font-semibold text-sm px-4 py-2 rounded-full transition-colors"> | <label className="cursor-pointer bg-gray-100 hover:bg-gray-200 text-gray-800 font-semibold text-sm px-4 py-2 rounded-full transition-colors"> | ||||
| <input type="file" accept="image/*" onChange={e => handleUpload(e, 'heroImageUrl', true)} hidden /> | <input type="file" accept="image/*" onChange={e => handleUpload(e, 'heroImageUrl', true)} hidden /> | ||||
| @@ -860,8 +860,8 @@ export default function AdminDashboard() { | |||||
| </div> | </div> | ||||
| {portal.heroImageUrl && ( | {portal.heroImageUrl && ( | ||||
| <div className="mt-2 relative rounded shadow border inline-block w-full"> | <div className="mt-2 relative rounded shadow border inline-block w-full"> | ||||
| <img src={withBasePath(portal.heroImageUrl)} className="h-32 w-full object-cover rounded" alt="Hero Preview" /> | |||||
| <a href={withBasePath(portal.heroImageUrl)} download={extractFileName(portal.heroImageUrl)} className="absolute top-2 right-12 bg-gray-700 hover:bg-gray-800 text-white w-8 h-8 flex items-center justify-center rounded-full text-sm font-bold shadow-lg" title="Download" aria-label="Download hero">⬇</a> | |||||
| <img src={withBasePath(portal.heroImageUrl)} className="h-32 w-full object-cover rounded" alt="Background preview" /> | |||||
| <a href={withBasePath(portal.heroImageUrl)} download={extractFileName(portal.heroImageUrl)} className="absolute top-2 right-12 bg-gray-700 hover:bg-gray-800 text-white w-8 h-8 flex items-center justify-center rounded-full text-sm font-bold shadow-lg" title="Download" aria-label="Download background">⬇</a> | |||||
| <button onClick={() => setPortal({...portal, heroImageUrl: ''})} className="absolute top-2 right-2 bg-red-500 text-white w-8 h-8 flex items-center justify-center rounded-full text-sm font-bold hover:bg-red-600 shadow-lg">✕</button> | <button onClick={() => setPortal({...portal, heroImageUrl: ''})} className="absolute top-2 right-2 bg-red-500 text-white w-8 h-8 flex items-center justify-center rounded-full text-sm font-bold hover:bg-red-600 shadow-lg">✕</button> | ||||
| </div> | </div> | ||||
| )} | )} | ||||