Merge version_6 into main
Merge version_6 into main
This commit was merged in pull request #6.
This commit is contained in:
@@ -1277,4 +1277,4 @@ export default function RootLayout({
|
||||
</ServiceWrapper>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
}
|
||||
160
src/app/page.tsx
160
src/app/page.tsx
@@ -13,6 +13,7 @@ import { useState } from 'react';
|
||||
|
||||
export default function LandingPage() {
|
||||
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 }> = {
|
||||
"1": {
|
||||
@@ -36,7 +37,10 @@ export default function LandingPage() {
|
||||
};
|
||||
|
||||
const handleViewDetails = (roomId: string) => {
|
||||
setSelectedRoom(selectedRoom === roomId ? null : roomId);
|
||||
setFlipped(prev => ({
|
||||
...prev,
|
||||
[roomId]: !prev[roomId]
|
||||
}));
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -139,71 +143,99 @@ export default function LandingPage() {
|
||||
</div>
|
||||
|
||||
<div id="products" data-section="products">
|
||||
<ProductCardFive
|
||||
title="Curated Room Collection"
|
||||
description="Select from our thoughtfully designed rooms and suites"
|
||||
tag="Accommodations"
|
||||
products={[
|
||||
{
|
||||
id: "1",
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184712312-lhl1h85w.jpg",
|
||||
imageAlt: "Deluxe Room",
|
||||
button: { text: "View Details", onClick: () => handleViewDetails("1") }
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg",
|
||||
imageAlt: "Executive Suite",
|
||||
button: { text: "View Details", onClick: () => handleViewDetails("2") }
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184710583-yt05ru42.jpg",
|
||||
imageAlt: "Premium Suite with View",
|
||||
button: { text: "View Details", onClick: () => handleViewDetails("3") }
|
||||
}
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground="noInvert"
|
||||
/>
|
||||
|
||||
{selectedRoom && roomSpecifications[selectedRoom] && (
|
||||
<div className="w-full max-w-4xl mx-auto mt-8 p-6 bg-card rounded-lg border border-accent">
|
||||
<div className="space-y-4">
|
||||
<h3 className="text-2xl font-bold text-foreground">
|
||||
{selectedRoom === "1" ? "Deluxe Room" : selectedRoom === "2" ? "Executive Suite" : "Premium Suite with View"} Specifications
|
||||
</h3>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<p className="text-sm text-foreground/60 mb-2">Beds</p>
|
||||
<p className="text-lg font-semibold text-foreground">{roomSpecifications[selectedRoom].beds}</p>
|
||||
<div className="w-full">
|
||||
{/* Header */}
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16">
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-4">Curated Room Collection</h2>
|
||||
<p className="text-base sm:text-lg text-foreground/70 max-w-2xl">Select from our thoughtfully designed rooms and suites</p>
|
||||
</div>
|
||||
|
||||
{/* Flip Cards Grid */}
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 pb-16">
|
||||
<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", title: "Executive Suite", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg", imageAlt: "Executive Suite" },
|
||||
{ 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" }
|
||||
].map((room) => (
|
||||
<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"
|
||||
style={{
|
||||
transformStyle: 'preserve-3d',
|
||||
transform: flipped[room.id] ? 'rotateY(180deg)' : 'rotateY(0deg)'
|
||||
}}
|
||||
>
|
||||
{/* Front 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 items-center justify-center cursor-pointer hover:border-accent/60 transition-colors"
|
||||
style={{ backfaceVisibility: 'hidden' }}
|
||||
onClick={() => handleViewDetails(room.id)}
|
||||
>
|
||||
<img
|
||||
src={room.imageSrc}
|
||||
alt={room.imageAlt}
|
||||
className="w-full h-full object-cover rounded-md mb-4"
|
||||
/>
|
||||
<h3 className="text-lg sm:text-xl font-bold text-foreground text-center mb-3">{room.title}</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"
|
||||
onClick={() => handleViewDetails(room.id)}
|
||||
>
|
||||
View Details
|
||||
</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>
|
||||
<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 id="testimonials" data-section="testimonials">
|
||||
@@ -283,4 +315,4 @@ export default function LandingPage() {
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user