2 Commits

Author SHA1 Message Date
bd4f9bb526 Update src/app/page.tsx 2025-12-29 08:56:49 +00:00
c7c17b839d Update src/app/layout.tsx 2025-12-29 08:56:48 +00:00
2 changed files with 97 additions and 65 deletions

View File

@@ -1277,4 +1277,4 @@ export default function RootLayout({
</ServiceWrapper> </ServiceWrapper>
</html> </html>
); );
} }

View File

@@ -13,6 +13,7 @@ import { useState } from 'react';
export default function LandingPage() { export default function LandingPage() {
const [selectedRoom, setSelectedRoom] = useState<string | null>(null); const [selectedRoom, setSelectedRoom] = useState<string | null>(null);
const [flipped, setFlipped] = useState<Record<string, boolean>>({});
const roomSpecifications: Record<string, { beds: string; sqft: string; amenities: string[]; price: string }> = { const roomSpecifications: Record<string, { beds: string; sqft: string; amenities: string[]; price: string }> = {
"1": { "1": {
@@ -36,7 +37,10 @@ export default function LandingPage() {
}; };
const handleViewDetails = (roomId: string) => { const handleViewDetails = (roomId: string) => {
setSelectedRoom(selectedRoom === roomId ? null : roomId); setFlipped(prev => ({
...prev,
[roomId]: !prev[roomId]
}));
}; };
return ( return (
@@ -139,71 +143,99 @@ export default function LandingPage() {
</div> </div>
<div id="products" data-section="products"> <div id="products" data-section="products">
<ProductCardFive <div className="w-full">
title="Curated Room Collection" {/* Header */}
description="Select from our thoughtfully designed rooms and suites" <div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16">
tag="Accommodations" <h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-4">Curated Room Collection</h2>
products={[ <p className="text-base sm:text-lg text-foreground/70 max-w-2xl">Select from our thoughtfully designed rooms and suites</p>
{ </div>
id: "1",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184712312-lhl1h85w.jpg", {/* Flip Cards Grid */}
imageAlt: "Deluxe Room", <div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 pb-16">
button: { text: "View Details", onClick: () => handleViewDetails("1") } <div className="grid grid-cols-1 md:grid-cols-3 gap-6 sm:gap-8">
}, {[
{ { id: "1", title: "Deluxe Room", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184712312-lhl1h85w.jpg", imageAlt: "Deluxe Room" },
id: "2", { id: "2", title: "Executive Suite", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg", imageAlt: "Executive Suite" },
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg", { id: "3", title: "Premium Suite with View", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184710583-yt05ru42.jpg", imageAlt: "Premium Suite with View" }
imageAlt: "Executive Suite", ].map((room) => (
button: { text: "View Details", onClick: () => handleViewDetails("2") } <div key={room.id} className="h-96 sm:h-80 perspective">
}, <div
{ className="relative w-full h-full transition-transform duration-500 ease-in-out"
id: "3", style={{
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184710583-yt05ru42.jpg", transformStyle: 'preserve-3d',
imageAlt: "Premium Suite with View", transform: flipped[room.id] ? 'rotateY(180deg)' : 'rotateY(0deg)'
button: { text: "View Details", onClick: () => handleViewDetails("3") } }}
} >
]} {/* Front of Card */}
gridVariant="three-columns-all-equal-width" <div
animationType="slide-up" className="absolute w-full h-full p-4 sm:p-6 bg-card rounded-lg border border-accent/30 flex flex-col items-center justify-center cursor-pointer hover:border-accent/60 transition-colors"
textboxLayout="default" style={{ backfaceVisibility: 'hidden' }}
useInvertedBackground="noInvert" onClick={() => handleViewDetails(room.id)}
/> >
<img
{selectedRoom && roomSpecifications[selectedRoom] && ( src={room.imageSrc}
<div className="w-full max-w-4xl mx-auto mt-8 p-6 bg-card rounded-lg border border-accent"> alt={room.imageAlt}
<div className="space-y-4"> className="w-full h-full object-cover rounded-md mb-4"
<h3 className="text-2xl font-bold text-foreground"> />
{selectedRoom === "1" ? "Deluxe Room" : selectedRoom === "2" ? "Executive Suite" : "Premium Suite with View"} Specifications <h3 className="text-lg sm:text-xl font-bold text-foreground text-center mb-3">{room.title}</h3>
</h3> <button
className="px-4 sm:px-6 py-2 bg-primary-cta text-foreground/90 rounded-lg hover:bg-primary-cta/90 transition-all font-medium text-sm sm:text-base"
<div className="grid grid-cols-1 md:grid-cols-2 gap-6"> onClick={() => handleViewDetails(room.id)}
<div> >
<p className="text-sm text-foreground/60 mb-2">Beds</p> View Details
<p className="text-lg font-semibold text-foreground">{roomSpecifications[selectedRoom].beds}</p> </button>
</div>
{/* Back of Card */}
<div
className="absolute w-full h-full p-4 sm:p-6 bg-card rounded-lg border border-accent/30 flex flex-col justify-center cursor-pointer hover:border-accent/60 transition-colors overflow-y-auto"
style={{
backfaceVisibility: 'hidden',
transform: 'rotateY(180deg)'
}}
onClick={() => handleViewDetails(room.id)}
>
<h3 className="text-xl sm:text-2xl font-bold text-foreground mb-4">{room.title} Specifications</h3>
<div className="space-y-4 text-sm sm:text-base">
<div>
<p className="text-foreground/60 font-semibold mb-1">Beds</p>
<p className="text-foreground">{roomSpecifications[room.id].beds}</p>
</div>
<div>
<p className="text-foreground/60 font-semibold mb-1">Size</p>
<p className="text-foreground">{roomSpecifications[room.id].sqft}</p>
</div>
<div>
<p className="text-foreground/60 font-semibold mb-1">Price</p>
<p className="text-primary-cta font-bold text-lg">{roomSpecifications[room.id].price}</p>
</div>
<div>
<p className="text-foreground/60 font-semibold mb-2">Amenities</p>
<ul className="space-y-1">
{roomSpecifications[room.id].amenities.map((amenity, idx) => (
<li key={idx} className="text-foreground/80 flex items-start">
<span className="mr-2"></span>
<span>{amenity}</span>
</li>
))}
</ul>
</div>
</div>
<button
className="mt-4 px-4 py-2 bg-secondary-cta border border-accent text-foreground rounded-lg hover:bg-secondary-cta/80 transition-all font-medium text-sm sm:text-base"
onClick={() => handleViewDetails(room.id)}
>
Back
</button>
</div>
</div>
</div> </div>
<div> ))}
<p className="text-sm text-foreground/60 mb-2">Size</p>
<p className="text-lg font-semibold text-foreground">{roomSpecifications[selectedRoom].sqft}</p>
</div>
<div>
<p className="text-sm text-foreground/60 mb-2">Price</p>
<p className="text-lg font-semibold text-primary-cta">{roomSpecifications[selectedRoom].price}</p>
</div>
<div>
<p className="text-sm text-foreground/60 mb-2">Amenities</p>
<ul className="space-y-1">
{roomSpecifications[selectedRoom].amenities.map((amenity, idx) => (
<li key={idx} className="text-sm text-foreground flex items-start">
<span className="mr-2"></span>
<span>{amenity}</span>
</li>
))}
</ul>
</div>
</div>
</div> </div>
</div> </div>
)} </div>
</div> </div>
<div id="testimonials" data-section="testimonials"> <div id="testimonials" data-section="testimonials">
@@ -283,4 +315,4 @@ export default function LandingPage() {
</div> </div>
</ThemeProvider> </ThemeProvider>
); );
} }