Skip to content

Commit e92350d

Browse files
committed
feat: 밈 상세화면 UI 개발
1 parent 989b158 commit e92350d

File tree

2 files changed

+121
-1
lines changed

2 files changed

+121
-1
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import styled from '@emotion/styled';
2+
3+
export const Container = styled.div`
4+
width: 100%;
5+
min-height: 100vh;
6+
background-color: #ffffff;
7+
`;
8+
9+
export const ImageContainer = styled.div`
10+
width: 100%;
11+
height: 487.5px;
12+
background-color: #d9d9d9;
13+
position: relative;
14+
`;
15+
16+
export const Image = styled.img`
17+
width: 100%;
18+
height: 100%;
19+
object-fit: cover;
20+
`;
21+
22+
export const ContentContainer = styled.div`
23+
padding: 20px;
24+
background-color: #ffffff;
25+
`;
26+
27+
export const TagContainer = styled.div`
28+
display: flex;
29+
gap: 10px;
30+
margin-bottom: 20px;
31+
`;
32+
33+
export const CategoryTitle = styled.h2`
34+
font-size: 14px;
35+
color: #434343;
36+
margin-bottom: 10px;
37+
`;
38+
39+
export const HashtagContainer = styled.div`
40+
display: flex;
41+
gap: 10px;
42+
flex-wrap: wrap;
43+
margin-bottom: 20px;
44+
`;
45+
46+
export const Hashtag = styled.span`
47+
padding: 8px 16px;
48+
background-color: #2c2c2c;
49+
color: #f5f5f5;
50+
border-radius: 4px;
51+
font-size: 16px;
52+
`;
53+
54+
export const Description = styled.p`
55+
font-size: 17px;
56+
line-height: 1.5;
57+
color: #000000;
58+
`;
59+
60+
export const ShareButton = styled.button`
61+
position: absolute;
62+
left: 50%;
63+
bottom: 20px;
64+
transform: translateX(-50%);
65+
background-color: #ffffff;
66+
border: none;
67+
padding: 12px 24px;
68+
border-radius: 8px;
69+
font-size: 16px;
70+
cursor: pointer;
71+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
72+
`;
Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
1+
import Layout from '@/components/Layout';
2+
import * as S from './MemeDetailPage.styles';
3+
4+
const DUMMY_DATA = {
5+
resultType: 'SUCCESS',
6+
success: {
7+
id: 1,
8+
title: '밈 제목',
9+
summary:
10+
'로렘 입숨(lorem ipsum; 줄여서 립숨, lipsum)은 출판이나 그래픽 디자인 분야에서 폰트, 타이포그래피, 레이아웃 같은 그래픽 요소나 시각적 연출을 보여줄 때 사용하는 표준 채우기 텍스트로, 최종 결과물에 들어가는 실제적인 문장 내용이 채워지기 전에 시각 디자인 프로젝트 모형의 채움 글로도 이용된다. 이런 용도로 사용할 때 로렘 입숨을 그리킹(greeking)이라고도 부르며, 때로 로렘 입숨은 공간만 차지하는 무언가를 지칭하는 용어로도 사용된다.',
11+
source: '출처',
12+
background: '배경',
13+
image: 'https://picsum.photos/800/600',
14+
hashtags: ['밈', '유머', '재미있는', '트렌드'],
15+
},
16+
error: null,
17+
} as const;
18+
119
const MemeDetailPage = () => {
2-
return <div>MemeDetailPage</div>;
20+
const handleShare = () => {
21+
// 공유 기능 구현
22+
alert('공유하기 기능이 구현될 예정입니다.');
23+
};
24+
25+
return (
26+
<Layout>
27+
<S.Container>
28+
<S.ImageContainer>
29+
<S.Image
30+
src={DUMMY_DATA.success.image}
31+
alt={DUMMY_DATA.success.title}
32+
/>
33+
<S.ShareButton onClick={handleShare}>공유하기</S.ShareButton>
34+
</S.ImageContainer>
35+
<S.ContentContainer>
36+
<S.TagContainer>
37+
<S.Hashtag>최신순</S.Hashtag>
38+
<S.Hashtag>인기순</S.Hashtag>
39+
</S.TagContainer>
40+
<S.CategoryTitle>카테고리</S.CategoryTitle>
41+
<S.HashtagContainer>
42+
{DUMMY_DATA.success.hashtags.map((tag) => (
43+
<S.Hashtag key={tag}>#{tag}</S.Hashtag>
44+
))}
45+
</S.HashtagContainer>
46+
<S.Description>{DUMMY_DATA.success.summary}</S.Description>
47+
</S.ContentContainer>
48+
</S.Container>
49+
</Layout>
50+
);
351
};
452

553
export default MemeDetailPage;

0 commit comments

Comments
 (0)