Compare commits
4 Commits
version_39
...
version_40
| Author | SHA1 | Date | |
|---|---|---|---|
| a5c834f9fc | |||
| 1aa9788a4a | |||
| 150f2b254c | |||
| 3aa7e33948 |
@@ -34,7 +34,7 @@ export default function LandingPage() {
|
|||||||
let ticking = false;
|
let ticking = false;
|
||||||
|
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
if (!ticking) {
|
if (!ticking && !showModal) {
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
const currentScrollY = window.scrollY;
|
const currentScrollY = window.scrollY;
|
||||||
setShowBackToTop(currentScrollY > 300);
|
setShowBackToTop(currentScrollY > 300);
|
||||||
@@ -76,7 +76,19 @@ export default function LandingPage() {
|
|||||||
|
|
||||||
window.addEventListener('scroll', handleScroll);
|
window.addEventListener('scroll', handleScroll);
|
||||||
return () => window.removeEventListener('scroll', handleScroll);
|
return () => window.removeEventListener('scroll', handleScroll);
|
||||||
}, [lastScrollY]);
|
}, [lastScrollY, showModal]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (showModal) {
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
} else {
|
||||||
|
document.body.style.overflow = 'unset';
|
||||||
|
}
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
document.body.style.overflow = 'unset';
|
||||||
|
};
|
||||||
|
}, [showModal]);
|
||||||
|
|
||||||
const scrollToGallery = () => {
|
const scrollToGallery = () => {
|
||||||
const gallerySectionElement = document.getElementById('gallery');
|
const gallerySectionElement = document.getElementById('gallery');
|
||||||
@@ -455,7 +467,7 @@ export default function LandingPage() {
|
|||||||
|
|
||||||
{/* Modal Gallery */}
|
{/* Modal Gallery */}
|
||||||
{showModal && (
|
{showModal && (
|
||||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4">
|
<div className="fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4">
|
||||||
<div className="relative w-full max-w-6xl max-h-[90vh] bg-[var(--background)] rounded-2xl shadow-2xl overflow-hidden flex flex-col">
|
<div className="relative w-full max-w-6xl max-h-[90vh] bg-[var(--background)] rounded-2xl shadow-2xl overflow-hidden flex flex-col">
|
||||||
{/* Modal Header */}
|
{/* Modal Header */}
|
||||||
<div className="flex items-center justify-between p-4 md:p-6 border-b border-[var(--accent)]/20">
|
<div className="flex items-center justify-between p-4 md:p-6 border-b border-[var(--accent)]/20">
|
||||||
|
|||||||
Reference in New Issue
Block a user