-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage.tsx
More file actions
181 lines (168 loc) · 3.89 KB
/
page.tsx
File metadata and controls
181 lines (168 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
'use client';
import SocialKakao from '@/components/signup/SocialKakao';
import SocialGoogle from '@/components/signup/SocialGoogle';
import { theme } from '@/styles/theme';
import styled from 'styled-components';
import Image from 'next/image';
interface OauthButtonProps {
bgColor: string;
}
const notReady = () => {
alert('준비 중입니다.');
};
const oauthButtons = [
{
key: 'naver',
bgColor: '#03CF5D',
component: (
<Image
src="/assets/icons/ic_naver.svg"
alt="Naver"
width={26}
height={26}
onClick={() => alert('준비 중입니다.')}
/>
)
},
{
key: 'google',
bgColor: '#FFFFFF',
component: <SocialGoogle />
},
{
key: 'kakao',
bgColor: '#FEE500',
component: <SocialKakao />
}
];
export default function Login() {
return (
<Container>
<ImageWrapper>
<LogoTitle data="/assets/login/login_text.svg" />
<LogoText>편지로 수놓는 나의 스페이스</LogoText>
<LogoImage src="/assets/login/login_logo.png" />
<OauthWrapper>
{oauthButtons.map(({ key, bgColor, component }) => (
<OauthButton key={key} bgColor={bgColor}>
{component}
</OauthButton>
))}
</OauthWrapper>
<LetterBtnText onClick={notReady}>
로그인 없이 편지 작성해보기
</LetterBtnText>
</ImageWrapper>
</Container>
);
}
const Container = styled.div`
display: flex;
box-sizing: border-box;
height: 100vh;
flex-direction: column;
justify-content: space-between;
background-image: url('/assets/login/login_bg.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
-webkit-scrollbar {
display: none;
}
`;
const LogoTitle = styled.object`
display: flex;
box-sizing: border-box;
width: 70%;
height: auto;
max-width: 257px;
max-height: 150px;
//드래그방지
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
`;
const LogoText = styled.div`
display: flex;
width: 100%;
color: rgba(255, 255, 255, 0.8);
text-align: center;
line-height: 134%; /* 26.8px */
letter-spacing: -0.6px;
${theme.fonts.body07}
justify-content: center;
//드래그방지
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
`;
const LogoImage = styled.img`
display: flex;
width: auto;
height: 100%;
object-fit: cover;
max-width: 520px;
max-height: 520px;
//드래그방지
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
`;
const ImageWrapper = styled.div`
display: flex;
box-sizing: border-box;
padding-top: 100px;
width: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
overflow: hidden;
`;
const OauthWrapper = styled.div`
width: 100%;
max-width: 393px;
gap: 24px;
display: flex;
position: absolute;
bottom: 123px;
justify-content: center;
`;
const OauthButton = styled.button<OauthButtonProps>`
width: 69px;
height: 69px;
border-radius: 50%;
border: none;
background-color: ${({ bgColor }) => bgColor};
display: flex;
align-items: center;
overflow: hidden;
justify-content: center;
cursor: pointer;
transition: background-color 0.3s;
`;
const LetterBtnText = styled.div`
${(props) => props.theme.fonts.caption02};
color: ${theme.colors.gray400};
position: absolute;
bottom: 69px;
text-decoration-line: underline;
cursor: pointer;
`;