Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

43 righe
1.6 KiB

  1. import { Portal } from '@/types';
  2. export default function HeroBanner({ portal }: { portal: Partial<Portal> }) {
  3. const themeColor = portal?.themeColor || '#1e3a8a';
  4. return (
  5. <div
  6. className="relative text-white text-center py-20 px-4 min-h-[40vh] flex flex-col justify-center"
  7. style={{
  8. backgroundImage: portal?.heroImageUrl ? `url(${portal.heroImageUrl})` : 'none',
  9. backgroundSize: 'cover',
  10. backgroundPosition: 'center',
  11. backgroundColor: themeColor
  12. }}
  13. >
  14. {/* Dynamic Overlay: Either a solid dark tint, or a fade into the theme color */}
  15. <div
  16. className="absolute inset-0"
  17. style={{
  18. background: portal?.fadeHeroImage
  19. ? `linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, ${themeColor} 100%)`
  20. : 'rgba(0,0,0,0.6)'
  21. }}
  22. ></div>
  23. <div className="relative z-10 max-w-4xl mx-auto flex flex-col items-center">
  24. {portal?.logoUrl && (
  25. <img
  26. src={portal.logoUrl}
  27. alt="Institution Logo"
  28. className="h-24 mb-6 object-contain bg-white/90 p-2 rounded-xl shadow-lg"
  29. />
  30. )}
  31. <h1 className="text-4xl md:text-5xl lg:text-6xl font-bold mb-6 drop-shadow-md">
  32. {portal?.title || 'Welcome to the Network'}
  33. </h1>
  34. <p className="text-lg md:text-2xl drop-shadow-md font-light">
  35. {portal?.welcomeText || 'Please contact administration to set up.'}
  36. </p>
  37. </div>
  38. </div>
  39. );
  40. }