Revamp invite page banner styling and layout.

Updated the invite page banner to use a more dynamic and visually appealing design with a background image or fallback styling. Added a text overlay for improved readability and enhanced the fallback display when an image is unavailable.
This commit is contained in:
2025-03-14 16:14:32 +01:00
parent 08f5661c99
commit f65500902c

View File

@@ -123,45 +123,52 @@ const InvitationPage = () => {
<div className="mx-auto max-w-4xl px-4 py-6"> <div className="mx-auto max-w-4xl px-4 py-6">
{/* Wooden Sign Title */} {/* Wooden Sign Title */}
<div <div className="mx-auto max-w-6xl px-0 py-10">
className="mx-auto mb-10 mt-6 rounded-lg p-6 text-center" <div
style={{ className="relative overflow-hidden rounded-xl bg-cover bg-center"
backgroundColor: colors.secondary, style={{
color: colors.text, backgroundImage: eventTheme?.foreground_image_url
boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)", ? `url(${getServerFileUrl(eventTheme.foreground_image_url)})`
}} : "none",
> backgroundColor: !eventTheme?.foreground_image_url
<h1 className="text-4xl font-bold md:text-5xl" style={headingStyle}> ? colors.secondary
{event.title} : undefined,
</h1> }}
<h2 className="mt-2 text-xl md:text-2xl" style={headingStyle}> >
Safari Adventure {/* Overlay to ensure text readability */}
</h2>
</div>
{/* Safari Animals Banner */}
<div className="mb-8 flex justify-center">
{eventTheme?.foreground_image_url ? (
<div className="relative h-64 w-full max-w-4xl md:h-64">
<Image
src={getServerFileUrl(eventTheme.foreground_image_url) || ""}
alt="Safari Animals"
fill
className="object-contain"
priority
/>
</div>
) : (
<div <div
className="flex h-48 w-full max-w-2xl items-center justify-center rounded-lg border-2 md:h-64" className="absolute inset-0 bg-accent-foreground/30
style={{ backdrop-blur-sm"
borderColor: colors.primary, ></div>
backgroundColor: "rgba(255, 255, 255, 0.5)",
}} {/* Content */}
> <div className="relative flex flex-col items-center justify-center text-center p-10">
<p className="text-center text-lg">Safari Animals Illustration</p> <h1
className="text-4xl md:text-5xl font-bold text-white drop-shadow-md"
style={headingStyle}
>
{event.title}
</h1>
<h2
className="mt-3 text-xl md:text-2xl text-white/80 drop-shadow"
style={headingStyle}
>
Safari Adventure
</h2>
</div> </div>
)}
{/* Fallback when image is not available */}
{!eventTheme?.foreground_image_url && (
<div
className="relative py-24 text-lg text-center italic text-white"
style={{ color: colors.text }}
>
Safari Animals Illustration
</div>
)}
</div>
</div> </div>
{/* Date/Time with Elephant */} {/* Date/Time with Elephant */}
<InfoCard <InfoCard
imageSrc={getAssetUrl("elephant")} imageSrc={getAssetUrl("elephant")}