|
1 | | -import React from 'react' |
2 | | - |
3 | | -import ServiceExplainCard from './ServiceExplainCard' |
| 1 | +import React, { useState } from 'react' |
| 2 | +import NightSkyDrawing from '@/assets/images/NightSkyDrawing.png' |
| 3 | +import CommentWriting from '@/assets/images/CommentWriting.png' |
| 4 | +import ClickLike from '@/assets/images/ClickingLike.png' |
| 5 | +import FeatureCard from './FeatureCard' |
| 6 | +import PointCard from './PointCard' |
4 | 7 |
|
5 | 8 | const ServiceExplainSection: React.FC = () => { |
| 9 | + const [expandedCard, setExpandedCard] = useState<string | null>(null) |
6 | 10 | return ( |
7 | | - <section className="relative w-full max-w-[1920px] mx-auto px-4 md:px-8 lg:px-12"> |
8 | | - {/* 제목 */} |
9 | | - <h2 className="text-xl sm:text-2xl md:text-3xl text-center text-mainColor font-mainFont mt-20 mb-20 relative z-10"> |
10 | | - 달토끼엔 이런 기능들이 있어요 |
11 | | - </h2> |
12 | | - |
13 | | - {/* 별 배경 이미지 */} |
14 | | - <div className="absolute inset-0 w-full h-80% mt-40 z-index-0"> |
15 | | - <img |
16 | | - src="/images/MoonRabbitStars.png" |
17 | | - alt="달토끼 별 배경" |
18 | | - className="w-full h-full object-cover" |
19 | | - loading="lazy" |
20 | | - /> |
| 11 | + <section className="relative w-full max-w-[1920px] mx-auto px-4 md:px-8 lg:px-12 py-20 md:my-16"> |
| 12 | + {/* 달토끼 게시판 역할 */} |
| 13 | + <div className="mb-8"> |
| 14 | + <h2 className="text-2xl md:text-4xl text-right text-mainColor font-mainFont leading-tight"> |
| 15 | + 달토끼와 같이 고민을 나눠요 |
| 16 | + </h2> |
| 17 | + <p className="text-base sm:text-lg md:text-xl text-lightWalnut font-mainFont mt-2 text-right"> |
| 18 | + 마음이 답답한데 어디에도 털어놓지 못하고 있다면, 달토끼에게 털어놓아보세요. |
| 19 | + </p> |
21 | 20 | </div> |
22 | 21 |
|
23 | | - {/* 카드 */} |
24 | | - <div className="relative"> |
25 | | - <ServiceExplainCard |
| 22 | + <div className="flex flex-col md:flex-row gap-8 md:mb-40 mb-20 items-start"> |
| 23 | + <FeatureCard |
| 24 | + emoji="🌙" |
26 | 25 | title="밤하늘" |
27 | | - subtitle={`밤하늘은 자유롭게 고민을 나누는 곳이에요.\n여러 고민들을 보고 얘기를 나눌 수 있어요.`} |
28 | | - backgroundImage="/shooting-star-2024127-1920-1.png" |
| 26 | + description="자유롭게 고민을 나누는 곳이에요. 여러 고민들을 보고 얘기를 나눌 수 있어요." |
| 27 | + isExpanded={expandedCard === 'night-sky'} |
| 28 | + onClick={() => setExpandedCard(expandedCard === 'night-sky' ? null : 'night-sky')} |
29 | 29 | /> |
30 | | - </div> |
31 | | - |
32 | | - <div className="relative mt-20"> |
33 | | - <ServiceExplainCard |
| 30 | + <FeatureCard |
| 31 | + emoji="⭐" |
34 | 32 | title="별자리" |
35 | | - subtitle={`별자리는 마음에 닿는 플리를 추천해주는 공간이에요.\n지금 당신에게 어울리는 작은 위로를 찾아보세요.`} |
36 | | - backgroundImage="/shooting-star-2024127-1920-1.png" |
| 33 | + description="마음에 닿는 플리를 추천해주는 공간이에요. 지금 당신에게 어울리는 작은 위로를 찾아보세요." |
| 34 | + isExpanded={expandedCard === 'constellation'} |
| 35 | + onClick={() => setExpandedCard(expandedCard === 'constellation' ? null : 'constellation')} |
37 | 36 | /> |
38 | | - </div> |
39 | | - |
40 | | - <div className="relative mt-20 mb-20"> |
41 | | - <ServiceExplainCard |
| 37 | + <FeatureCard |
| 38 | + emoji="💭" |
42 | 39 | title="오늘의 질문" |
43 | | - subtitle={`오늘의 질문은 매일매일 바뀌는 질문에 답을 하며 스스로에게 말을 걸어보는 시간이에요.\n내 마음을 천천히 들여다보는 작은 계기를 놓치지 마세요.`} |
44 | | - backgroundImage="/shooting-star-2024127-1920-1.png" |
| 40 | + description="매일매일 바뀌는 질문에 답을 하며 스스로에게 말을 걸어보는 시간이에요." |
| 41 | + isExpanded={expandedCard === 'daily-question'} |
| 42 | + onClick={() => setExpandedCard(expandedCard === 'daily-question' ? null : 'daily-question')} |
45 | 43 | /> |
46 | 44 | </div> |
| 45 | + |
| 46 | + {/* 신뢰도 */} |
| 47 | + <div className="w-full"> |
| 48 | + <div> |
| 49 | + <div className="text-left mb-8"> |
| 50 | + <h3 className="text-2xl md:text-4xl text-mainColor font-mainFont mb-2"> |
| 51 | + 신뢰도를 쌓아 포인트를 얻어요 |
| 52 | + </h3> |
| 53 | + <p className="text-base sm:text-lg text-lightWalnut font-mainFont"> |
| 54 | + 여러 활동을 통해 포인트를 얻고 내 프로필을 꾸며보세요! |
| 55 | + </p> |
| 56 | + </div> |
| 57 | + |
| 58 | + <div className="flex flex-col md:flex-row gap-8 w-full"> |
| 59 | + <PointCard |
| 60 | + title="밤하늘 그리기" |
| 61 | + imageUrl={NightSkyDrawing} |
| 62 | + description="모두와 고민을 공유하기만 해도 포인트를 얻을 수 있어요" |
| 63 | + /> |
| 64 | + <PointCard |
| 65 | + title="댓글 달기" |
| 66 | + imageUrl={CommentWriting} |
| 67 | + description="다른 사람의 고민에 공감과 위로의 답변을 달아요" |
| 68 | + /> |
| 69 | + <PointCard |
| 70 | + title="좋아요 받기" |
| 71 | + imageUrl={ClickLike} |
| 72 | + description="내 댓글에 좋아요가 달리면 포인트가 올라요" |
| 73 | + /> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </div> |
47 | 77 | </section> |
48 | 78 | ) |
49 | 79 | } |
|
0 commit comments