Skip to content

Commit 4aa2125

Browse files
committed
메인 디자인 변경
1 parent cd48c4f commit 4aa2125

File tree

3 files changed

+157
-146
lines changed

3 files changed

+157
-146
lines changed

frontend/components/service/Home/Main.tsx

Lines changed: 0 additions & 144 deletions
This file was deleted.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
import React from 'react'
2+
import { media } from '../../../assets/styles/mixin'
3+
import { Paragraph } from '../../../assets/styles/typo'
4+
import styled, { useTheme, keyframes } from 'styled-components'
5+
import { useTranslation } from 'react-i18next'
6+
7+
const MainTheme = styled.div`
8+
height: calc(100vh - 100px);
9+
`
10+
11+
const Window = styled.div`
12+
position: absolute;
13+
left: 20%;
14+
right: 20%;
15+
top: 50%;
16+
transform: translateY(-50%);
17+
border: 2px solid ${(props) => props.theme.colors.white};
18+
padding: 2rem 4rem;
19+
${media.mobile(`
20+
left: 10%;
21+
right: 10%;
22+
`)}
23+
24+
&:after {
25+
content: ' ';
26+
position: absolute;
27+
left: 0;
28+
right: 0;
29+
top: 0;
30+
border-bottom: 2px solid ${(props) => props.theme.colors.white};
31+
height: 3rem;
32+
}
33+
`
34+
35+
const WindowButton = styled.div`
36+
position: absolute;
37+
right: 0;
38+
top: 0;
39+
width: 3rem;
40+
height: 3rem;
41+
border-left: 2px solid ${(props) => props.theme.colors.white};
42+
&:before,
43+
&:after {
44+
position: absolute;
45+
left: 50%;
46+
top: 0;
47+
content: ' ';
48+
height: 40px;
49+
width: 2px;
50+
background-color: ${(props) => props.theme.colors.white};
51+
}
52+
&:before {
53+
transform: rotate(45deg);
54+
}
55+
&:after {
56+
transform: rotate(-45deg);
57+
}
58+
`
59+
60+
const typing = keyframes`
61+
0% {
62+
width: 0;
63+
}
64+
100% {
65+
width: 100%;
66+
}
67+
`
68+
69+
const TitleContainer = styled.div`
70+
margin-top: 4rem;
71+
overflow: hidden;
72+
`
73+
74+
const Title = styled.div`
75+
font-size: 5rem;
76+
line-height: 1.1;
77+
display: inline-block;
78+
color: ${(props) => props.color || props.theme.colors.white};
79+
white-space: nowrap;
80+
animation: ${typing} 5s linear;
81+
animation-fill-mode: both;
82+
&:nth-child(2) {
83+
animation-delay: 2s;
84+
}
85+
&:nth-child(3) {
86+
animation-delay: 4s;
87+
}
88+
`
89+
90+
const MainText = styled.div`
91+
font-size: 1.7rem;
92+
font-weight: normal;
93+
margin-top: 2rem;
94+
margin-left: 12rem;
95+
${media.mobile(`
96+
margin-top: 3rem;
97+
margin-left: 6rem;
98+
`)}
99+
`
100+
101+
const MainIdentity = () => {
102+
const { t } = useTranslation()
103+
const theme = useTheme()
104+
105+
return (
106+
<MainTheme>
107+
<Window>
108+
<WindowButton />
109+
<TitleContainer>
110+
<div>
111+
<Title color={theme.colors.violet0}>
112+
{t(`label:pycon`)}
113+
</Title>
114+
</div>
115+
<div>
116+
<Title color={theme.colors.violet1}>
117+
{t(`label:korea`)}
118+
</Title>
119+
</div>
120+
<div>
121+
<Title color={theme.colors.yellow0}>
122+
{t(`label:thisYear`)}
123+
</Title>
124+
</div>
125+
</TitleContainer>
126+
<MainText>{t(`label:pyconkrDate`)}</MainText>
127+
</Window>
128+
</MainTheme>
129+
)
130+
}
131+
132+
export default MainIdentity

frontend/pages/index.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
import React from 'react'
22
import type { NextPage } from 'next'
3-
import MainBackground from '../components/service/Home/Main'
3+
import MainIdentity from '../components/service/Home/MainIdentity'
4+
import MainSlogan from '../components/service/Home/MainSlogan'
5+
import MainTalkList from '../components/service/Home/MainTalkList'
6+
import MainContact from '../components/service/Home/MainContact'
7+
import { media } from '../assets/styles/mixin'
8+
import styled from 'styled-components'
9+
10+
const Container = styled.div`
11+
& + & {
12+
margin: 7rem 0;
13+
${media.mobile(`
14+
margin: 3rem 0;
15+
`)}
16+
}
17+
`
418

519
const Index: NextPage = () => {
620
return (
721
<div>
8-
<MainBackground />
22+
<MainIdentity />
23+
<Container>
24+
<MainSlogan />
25+
</Container>
26+
<Container>
27+
<MainTalkList />
28+
</Container>
29+
<Container>
30+
<MainContact />
31+
</Container>
932
</div>
1033
)
1134
}

0 commit comments

Comments
 (0)