diff --git a/public/assets/guide/guideOmok.png b/public/assets/guide/guideOmok.png new file mode 100644 index 00000000..b62637b2 Binary files /dev/null and b/public/assets/guide/guideOmok.png differ diff --git a/public/assets/guide/guideRoutine.png b/public/assets/guide/guideRoutine.png new file mode 100644 index 00000000..7dcc75a5 Binary files /dev/null and b/public/assets/guide/guideRoutine.png differ diff --git a/src/Guide/components/GuideContent.tsx b/src/Guide/components/GuideContent.tsx new file mode 100644 index 00000000..571676bb --- /dev/null +++ b/src/Guide/components/GuideContent.tsx @@ -0,0 +1,33 @@ +import React from 'react'; + +interface GuideContentProps { + text: string[]; + subText: string; + image: string; +} + +const GuideContent = ({ text, subText, image }: GuideContentProps) => { + return ( +
+
+
+ {text.map((line) => ( +
{line}
+ ))} +
+
+ {subText} +
+
+ +
+ +
+
+ ); +}; + +export default GuideContent; diff --git a/src/Guide/constants/guideContents.ts b/src/Guide/constants/guideContents.ts new file mode 100644 index 00000000..6c55f042 --- /dev/null +++ b/src/Guide/constants/guideContents.ts @@ -0,0 +1,25 @@ +interface GuideContent { + text: string[]; + subText: string; + image: string; +} + +export const GUIDE_CONTENTS: GuideContent[] = [ + { + text: ['사람들과 함께', '루틴을 지켜보세요'], + subText: '방에 참가하거나, 여러분이 만들 수도 있어요', + image: '/assets/guide/guideRoutine.png' + }, + { + text: ['함께 할 수록', '새가 보상을 받아요'], + subText: '낮과 밤 별로 다른 보상이 있어요', + image: '/assets/skins/awakeOwlSkin2.png' + }, + { + text: ['보상으로 스킨을 사고', '뽐내보세요!'], + subText: '', + image: '/assets/guide/guideOmok.png' + } +]; + +export default GUIDE_CONTENTS; diff --git a/src/Guide/index.ts b/src/Guide/index.ts new file mode 100644 index 00000000..dfc6ccec --- /dev/null +++ b/src/Guide/index.ts @@ -0,0 +1,2 @@ +export { default as GUIDE_CONTENTS } from './constants/guideContents'; +export { default as GuideContent } from './components/GuideContent'; diff --git a/src/Guide/styles/swiperBullets.css b/src/Guide/styles/swiperBullets.css new file mode 100644 index 00000000..b94e62d0 --- /dev/null +++ b/src/Guide/styles/swiperBullets.css @@ -0,0 +1,22 @@ +.swiper-pagination { + display: flex; + justify-content: center; + gap: 1.5rem; +} + +.bullet-custom { + display: block; + width: 1rem; + height: 1rem; + background-color: #9ca3af; + border-radius: 100%; + cursor: pointer; +} + +.bullet-active-custom--light { + background-color: #60d4de; +} + +.bullet-active-custom--dark { + background-color: #f9bd7d; +} diff --git a/src/core/routes/routes.tsx b/src/core/routes/routes.tsx index c81a70d4..4f2e82d1 100644 --- a/src/core/routes/routes.tsx +++ b/src/core/routes/routes.tsx @@ -17,6 +17,7 @@ import CouponPage from '@/pages/CouponPage'; import ParticipateLog from '@/pages/ParticipateLog'; import OrderLogPage from '@/pages/OrderLogPage'; import StorePage from '@/pages/StorePage'; +import GuidePage from '@/pages/GuidePage'; interface Route { path: string; @@ -61,7 +62,7 @@ const routes: Routes = { path: 'guide', authRequired: false, navBarRequired: false, - element:
guide
+ element: }, join: { path: 'join', diff --git a/src/pages/GuidePage.tsx b/src/pages/GuidePage.tsx new file mode 100644 index 00000000..1a086612 --- /dev/null +++ b/src/pages/GuidePage.tsx @@ -0,0 +1,53 @@ +import { useState } from 'react'; +import { Link } from 'react-router-dom'; +import { Swiper, SwiperSlide } from 'swiper/react'; +import { Pagination, Autoplay } from 'swiper/modules'; +import { useTheme } from '@/core/hooks'; +import { GuideContent, GUIDE_CONTENTS } from '@/Guide'; +import 'swiper/css/pagination'; +import '@/Guide/styles/swiperBullets.css'; + +const GuidePage = () => { + const { theme } = useTheme(); + const [guideEnd, setGuideEnd] = useState(false); + + return ( +
+
+ setGuideEnd(true)} + > + {GUIDE_CONTENTS.map((guide) => ( + + + + ))} + +
+
+ {guideEnd && ( + + 시작! + + )} +
+
+ ); +}; + +export default GuidePage;