Compare commits
4 Commits
version_36
...
version_39
| Author | SHA1 | Date | |
|---|---|---|---|
| 19c2ff1420 | |||
| 340716fe3e | |||
| 537601ee19 | |||
| 9c23776465 |
118
src/app/page.tsx
118
src/app/page.tsx
@@ -26,6 +26,9 @@ export default function LandingPage() {
|
||||
const galleryContainerRef = useRef<HTMLDivElement>(null);
|
||||
const shoesContainerRef = useRef<HTMLDivElement>(null);
|
||||
const veilsContainerRef = useRef<HTMLDivElement>(null);
|
||||
const galleryButtonContainerRef = useRef<HTMLDivElement>(null);
|
||||
const shoesButtonContainerRef = useRef<HTMLDivElement>(null);
|
||||
const veilsButtonContainerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
let ticking = false;
|
||||
@@ -43,37 +46,25 @@ export default function LandingPage() {
|
||||
setScrollDirection('up');
|
||||
}
|
||||
|
||||
// Check gallery section - show View More when 6th item is visible
|
||||
if (galleryContainerRef.current) {
|
||||
const items = galleryContainerRef.current.querySelectorAll('[data-product-item]');
|
||||
if (items.length > 0) {
|
||||
const sixthItem = items[5];
|
||||
const rect = sixthItem.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowGalleryViewMore(isInViewport);
|
||||
}
|
||||
// Check gallery section - show View More when visible
|
||||
if (galleryContainerRef.current && galleryButtonContainerRef.current) {
|
||||
const rect = galleryButtonContainerRef.current.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowGalleryViewMore(isInViewport);
|
||||
}
|
||||
|
||||
// Check shoes section - show View More when 6th item is visible
|
||||
if (shoesContainerRef.current) {
|
||||
const items = shoesContainerRef.current.querySelectorAll('[data-product-item]');
|
||||
if (items.length > 0) {
|
||||
const sixthItem = items[5];
|
||||
const rect = sixthItem.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowShoesViewMore(isInViewport);
|
||||
}
|
||||
// Check shoes section - show View More when visible
|
||||
if (shoesContainerRef.current && shoesButtonContainerRef.current) {
|
||||
const rect = shoesButtonContainerRef.current.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowShoesViewMore(isInViewport);
|
||||
}
|
||||
|
||||
// Check veils section - show View More when 6th item is visible
|
||||
if (veilsContainerRef.current) {
|
||||
const items = veilsContainerRef.current.querySelectorAll('[data-product-item]');
|
||||
if (items.length > 0) {
|
||||
const sixthItem = items[5];
|
||||
const rect = sixthItem.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowVeilsViewMore(isInViewport);
|
||||
}
|
||||
// Check veils section - show View More when visible
|
||||
if (veilsContainerRef.current && veilsButtonContainerRef.current) {
|
||||
const rect = veilsButtonContainerRef.current.getBoundingClientRect();
|
||||
const isInViewport = rect.top < window.innerHeight && rect.bottom > 0;
|
||||
setShowVeilsViewMore(isInViewport);
|
||||
}
|
||||
|
||||
setLastScrollY(currentScrollY);
|
||||
@@ -446,21 +437,19 @@ export default function LandingPage() {
|
||||
_key: `gallery-${index}`
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* View More Button - Appears when 6th item is scrolled to */}
|
||||
{/* View More Button - Positioned at bottom right of gallery section */}
|
||||
<div ref={galleryButtonContainerRef} className="flex justify-end px-8 lg:px-16 pt-8 pb-4">
|
||||
{showGalleryViewMore && (
|
||||
<div className="relative mt-0">
|
||||
<div className="absolute -top-[280px] right-8 lg:right-16 z-30 flex justify-end animate-in fade-in slide-in-from-bottom-4 duration-300">
|
||||
<button
|
||||
onClick={() => setShowModal(true)}
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg"
|
||||
aria-label="View More Dresses"
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setShowModal(true)}
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg animate-in fade-in slide-in-from-bottom-4 duration-300"
|
||||
aria-label="View More Dresses"
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -594,21 +583,19 @@ export default function LandingPage() {
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* View More Button for Shoes - Appears when 6th item is scrolled to */}
|
||||
{/* View More Button for Shoes - Positioned at bottom right of shoes section */}
|
||||
<div ref={shoesButtonContainerRef} className="flex justify-end px-8 lg:px-16 pt-8 pb-4">
|
||||
{showShoesViewMore && (
|
||||
<div className="relative mt-0">
|
||||
<div className="absolute -top-[280px] right-8 lg:right-16 z-30 flex justify-end animate-in fade-in slide-in-from-bottom-4 duration-300">
|
||||
<button
|
||||
onClick={scrollToVeils}
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg"
|
||||
aria-label="View More Shoes"
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={scrollToVeils}
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg animate-in fade-in slide-in-from-bottom-4 duration-300"
|
||||
aria-label="View More Shoes"
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -646,22 +633,19 @@ export default function LandingPage() {
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* View More Button for Veils - Appears when 6th item is scrolled to */}
|
||||
{/* View More Button for Veils - Positioned at bottom right of veils section */}
|
||||
<div ref={veilsButtonContainerRef} className="flex justify-end px-8 lg:px-16 pt-8 pb-4">
|
||||
{showVeilsViewMore && (
|
||||
<div className="relative mt-0">
|
||||
<div className="absolute -top-[280px] right-8 lg:right-16 z-30 flex justify-end animate-in fade-in slide-in-from-bottom-4 duration-300">
|
||||
<button
|
||||
onClick={() => { /* This section is the last product section, so no action needed */ }}
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg"
|
||||
aria-label="View More Veils"
|
||||
disabled
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="group relative inline-flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-[#D4AF37] to-[#D4AF37] text-black rounded-lg font-semibold hover:shadow-lg transition-all duration-300 ease-out shadow-lg animate-in fade-in slide-in-from-bottom-4 duration-300"
|
||||
aria-label="View More Veils"
|
||||
disabled
|
||||
>
|
||||
<span className="text-sm md:text-base">View More</span>
|
||||
<ChevronRight className="w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user