diff --git a/frontend/src/pages/LandingPage/LandingPage.styled.ts b/frontend/src/pages/LandingPage/LandingPage.styled.ts index a76d8054..d2c2f59d 100644 --- a/frontend/src/pages/LandingPage/LandingPage.styled.ts +++ b/frontend/src/pages/LandingPage/LandingPage.styled.ts @@ -15,3 +15,15 @@ export const LandingPageLayout = styled.div` display: none; } `; + +export const LoginButtonWrapper = styled.div<{ $isIntro: boolean }>` + position: fixed; + bottom: ${({ $isIntro }) => ($isIntro ? '28%' : '6%')}; + left: 0; + right: 0; + display: flex; + justify-content: center; + z-index: 100; + pointer-events: auto; + transition: bottom 0.3s ease; +`; diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts index c54580c0..93946194 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts @@ -22,6 +22,7 @@ export const ScrollDownContainer = styled.div` flex-direction: column; align-items: center; gap: 2rem; + margin-top: 10rem; `; export const ScrollDownText = styled.div` diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx index 15eeb7f8..90f94bb6 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx @@ -4,7 +4,6 @@ import LandingHeader from '../../LandingHeader'; import LandingMessage from '../../LandingMessage'; import scrollDownImage from '@/assets/images/scrollDown.webp'; -import LoginButton from '@/components/Button/LoginButton'; const GuideIntro = () => { return ( @@ -12,7 +11,6 @@ const GuideIntro = () => { - 아래로 스크롤하면 서비스 소개를 볼 수 있어요 diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts index 1254dea6..754f35d6 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts @@ -16,6 +16,7 @@ export const GuideOutroLayout = styled.div` ${({ theme }) => theme.colors.green100} 0%, ${({ theme }) => theme.colors.white} 56.28% ); + padding-bottom: 9rem; `; export const ContentContainer = styled.div` diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx index 996f1951..a95ae4bf 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx @@ -3,8 +3,6 @@ import CarouselList from '../../CarouselList'; import LandingHeader from '../../LandingHeader'; import LandingMessage from '../../LandingMessage'; -import LoginButton from '@/components/Button/LoginButton'; - const GuideOutro = () => { return ( @@ -13,7 +11,6 @@ const GuideOutro = () => { 로그인하여 두리번을 시작해보세요 - ); diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts index 117df5a8..af896f5c 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts @@ -12,7 +12,7 @@ export const GuideSlideLayout = styled.div` scroll-snap-stop: always; flex-shrink: 0; overflow: hidden; - gap: 5rem; + gap: 10%; `; export const Description = styled.div` @@ -45,8 +45,3 @@ export const IndexCircle = styled.div<{ $isActive: boolean }>` background-color: ${({ theme, $isActive }) => $isActive ? theme.colors.green600 : theme.colors.gray300}; `; - -export const ButtonContainer = styled.div` - position: absolute; - bottom: 3rem; -`; diff --git a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx index fa916b25..966dae3a 100644 --- a/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx +++ b/frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx @@ -2,8 +2,6 @@ import * as S from './GuideSlide.styled'; import { ServiceGuideStepType } from '../../../LandingPage.types'; import LandingHeader from '../../LandingHeader'; -import LoginButton from '@/components/Button/LoginButton'; - interface ServiceGuideProps { step: ServiceGuideStepType; totalSteps: number; @@ -21,10 +19,6 @@ const GuideSlide = ({ step, totalSteps }: ServiceGuideProps) => { ))} - - - - ); }; diff --git a/frontend/src/pages/LandingPage/index.tsx b/frontend/src/pages/LandingPage/index.tsx index f4f3b454..a3b1a5ca 100644 --- a/frontend/src/pages/LandingPage/index.tsx +++ b/frontend/src/pages/LandingPage/index.tsx @@ -1,18 +1,49 @@ +import { useEffect, useState, useRef } from 'react'; + import GuideIntro from './components/ServiceGuide/GuideIntro'; import GuideOutro from './components/ServiceGuide/GuideOutro'; import GuideSlide from './components/ServiceGuide/GuideSlide'; import { SERVICE_GUIDE_STEPS } from './LandingPage.constants'; import * as S from './LandingPage.styled'; +import LoginButton from '@/components/Button/LoginButton'; + const LandingPage = () => { + const [isIntro, setIsIntro] = useState(true); + const scrollContainerRef = useRef(null); + + useEffect(() => { + const scrollContainer = scrollContainerRef.current; + + if (!scrollContainer) return; + + const handleScroll = () => { + const scrollTop = scrollContainer.scrollTop; + const viewportHeight = window.innerHeight; + setIsIntro(scrollTop < viewportHeight * 0.5); + }; + + scrollContainer.addEventListener('scroll', handleScroll); + handleScroll(); + + return () => { + scrollContainer.removeEventListener('scroll', handleScroll); + }; + }, []); + return ( - - - {SERVICE_GUIDE_STEPS.map((step) => ( - - ))} - - + <> + + + {SERVICE_GUIDE_STEPS.map((step) => ( + + ))} + + + + + + ); };