forked from shadcn-ui/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshadcn-example-authentication-public.css
344 lines (307 loc) · 13.3 KB
/
shadcn-example-authentication-public.css
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
export default function LoginForm() {
return (
<div className="min-h-screen flex items-center justify-center px-4">
<style jsx global>{`
:root {
--background: hsl(0, 0%, 100%);
--foreground: hsl(240, 10%, 3.9%);
--card: hsl(0, 0%, 100%);
--card-foreground: hsl(240, 10%, 3.9%);
--popover: hsl(0, 0%, 100%);
--popover-foreground: hsl(240, 10%, 3.9%);
--primary: hsl(221, 83%, 53%);
--primary-foreground: hsl(0, 0%, 98%);
--secondary: hsl(240, 4.8%, 95.9%);
--secondary-foreground: hsl(240, 5.9%, 10%);
--muted: hsl(240, 4.8%, 95.9%);
--muted-foreground: hsl(240, 3.8%, 46.1%);
--accent: hsl(240, 4.8%, 95.9%);
--accent-foreground: hsl(240, 5.9%, 10%);
--destructive: hsl(0, 84.2%, 60.2%);
--destructive-foreground: hsl(210, 40%, 98%);
--border: hsl(240, 5.9%, 90%);
--input: hsl(240, 5.9%, 90%);
--ring: hsl(240, 5.9%, 10%);
--radius: 0.5rem;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--sidebar-background: 0 0% 98%;
--sidebar-foreground: 240 5.3% 26.1%;
--sidebar-primary: 240 5.9% 10%;
--sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 240 4.8% 95.9%;
--sidebar-accent-foreground: 240 5.9% 10%;
--sidebar-border: 220 13% 91%;
--sidebar-ring: 240 5% 64.9%;
}
.dark {
--background: hsl(240, 10%, 3.9%);
--foreground: hsl(0, 0%, 98%);
--card: hsl(240, 10%, 3.9%);
--card-foreground: hsl(0, 0%, 98%);
--popover: hsl(240, 10%, 3.9%);
--popover-foreground: hsl(0, 0%, 98%);
--primary: hsl(224, 76%, 48%);
--primary-foreground: hsl(240, 5.9%, 10%);
--secondary: hsl(240, 3.7%, 15.9%);
--secondary-foreground: hsl(0, 0%, 98%);
--muted: hsl(240, 3.7%, 15.9%);
--muted-foreground: hsl(240, 5%, 64.9%);
--accent: hsl(240, 3.7%, 15.9%);
--accent-foreground: hsl(0, 0%, 98%);
--destructive: hsl(0, 62.8%, 30.6%);
--destructive-foreground: hsl(0, 0%, 98%);
--border: hsl(240, 3.7%, 15.9%);
--input: hsl(240, 3.7%, 15.9%);
--ring: hsl(240, 4.9%, 83.9%);
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
--sidebar-background: 240 5.9% 10%;
--sidebar-foreground: 240 4.8% 95.9%;
--sidebar-primary: 224.3 76.3% 48%;
--sidebar-primary-foreground: 0 0% 100%;
--sidebar-accent: 240 3.7% 15.9%;
--sidebar-accent-foreground: 240 4.8% 95.9%;
--sidebar-border: 240 3.7% 15.9%;
--sidebar-ring: 240 4.9% 83.9%;
}
html, body {
background-color: var(--background);
color: var(--foreground);
transition: all 0.3s ease;
}
body * {
transition: all 0.3s ease;
}
.card {
background-color: var(--card);
color: var(--card-foreground);
border-radius: var(--radius);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
padding: 24px;
width: 100%;
max-width: 400px;
transition: all 0.3s ease;
}
.dark .card {
box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}
.card-title,
.card-description,
.form-group label,
.button-icon {
transition: all 0.3s ease;
}
.card-title {
font-size: 24px;
font-weight: bold;
margin-bottom: 8px;
}
.card-description {
color: var(--muted-foreground);
font-size: 14px;
margin-bottom: 24px;
}
.form-group {
margin-bottom: 16px;
}
label {
display: block;
font-size: 14px;
margin-bottom: 4px;
}
input {
width: 100%;
padding: 8px;
border: 1px solid var(--input);
background-color: var(--background);
color: var(--foreground);
border-radius: var(--radius);
font-size: 14px;
transition: all 0.3s ease;
}
input:hover {
border-color: var(--ring);
}
input:focus {
outline: none;
border-color: var(--ring);
box-shadow: 0 0 0 2px var(--ring);
}
.forgot-password {
font-size: 12px;
text-align: right;
margin-top: 4px;
}
.forgot-password a {
color: var(--muted-foreground);
text-decoration: none;
}
.button {
background-color: var(--primary);
border: none;
color: var(--primary-foreground);
padding: 10px 16px;
font-size: 14px;
font-weight: bold;
border-radius: var(--radius);
cursor: pointer;
width: 100%;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.button:hover {
opacity: 0.9;
}
.button-outline {
background-color: var(--card);
border: 1px solid var(--input);
color: var(--card-foreground);
transition: all 0.3s ease;
}
.sign-up {
font-size: 14px;
text-align: center;
margin-top: 16px;
color: var(--muted-foreground);
}
.sign-up a {
color: var(--primary);
text-decoration: none;
}
.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
display: inline-flex;
align-items: center;
cursor: pointer;
}
.theme-toggle-track {
width: 40px;
height: 20px;
background-color: var(--muted);
border-radius: 15px;
position: relative;
transition: background-color 0.3s ease;
}
.theme-toggle-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background-color: var(--background);
border-radius: 50%;
transition: transform 0.3s ease;
}
.dark .theme-toggle-track {
background-color: var(--primary);
}
.dark .theme-toggle-thumb {
transform: translateX(20px);
}
.button-icon {
width: 20px;
height: 20px;
margin-right: 8px;
transition: all 0.3s ease;
}
svg {
transition: all 0.3s ease;
}
.or-divider {
display: flex;
align-items: center;
text-align: center;
margin: 16px 0;
}
.or-divider::before,
.or-divider::after {
content: '';
flex: 1;
border-bottom: 1px solid var(--border);
}
.or-divider span {
padding: 0 10px;
color: var(--muted-foreground);
font-size: 14px;
}
.button[type="submit"] {
color: white;
}
`}</style>
<div className="theme-toggle" onClick={() => document.documentElement.classList.toggle('dark')}>
<div className="theme-toggle-track">
<div className="theme-toggle-thumb"></div>
</div>
</div>
<div className="card">
<h2 className="card-title">Login</h2>
<p className="card-description">Enter your email below to login to your account</p>
<form>
<div className="form-group">
<label htmlFor="email">Email</label>
<input type="email" id="email" placeholder="[email protected]" required />
</div>
<div className="form-group">
<label htmlFor="password">Password</label>
<input type="password" id="password" required />
<div className="forgot-password">
<a href="#">Forgot your password?</a>
</div>
</div>
<button type="submit" className="button">Login</button>
<button type="button" className="button button-outline">
<svg className="button-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
<path fill="currentColor" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
<path fill="currentColor" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
<path fill="currentColor" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/>
</svg>
Sign in with Google
</button>
<div className="or-divider">
<span>OR</span>
</div>
<button type="button" className="button button-outline">
<svg className="button-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385c.6.105.825-.255.825-.57c0-.285-.015-1.23-.015-2.235c-3.015.555-3.795-.735-4.035-1.41c-.135-.345-.72-1.41-1.23-1.695c-.42-.225-1.02-.78-.015-.795c.945-.015 1.62.87 1.845 1.23c1.08 1.815 2.805 1.305 3.495.99c.105-.78.42-1.305.765-1.605c-2.67-.3-5.46-1.335-5.46-5.925c0-1.305.465-2.385 1.23-3.225c-.12-.3-.54-1.53.12-3.18c0 0 1.005-.315 3.3 1.23c.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23c.66 1.65.24 2.88.12 3.18c.765.84 1.23 1.905 1.23 3.225c0 4.605-2.805 5.625-5.475 5.925c.435.375.81 1.095.81 2.22c0 1.605-.015 2.895-.015 3.3c0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>
</svg>
Sign in with GitHub
</button>
<button type="button" className="button button-outline">
<svg className="button-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M22.65 14.39L12 22.13L1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78l2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"/>
</svg>
Sign in with GitLab
</button>
<button type="button" className="button button-outline">
<svg className="button-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
</svg>
Sign in with LinkedIn
</button>
<button type="button" className="button button-outline">
<svg className="button-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/>
</svg>
Sign in with Slack
</button>
<div className="sign-up">
Don't have an account? <a href="#">Sign up</a>
</div>
</form>
</div>
</div>
)
}