-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrc.html
More file actions
235 lines (233 loc) · 8.88 KB
/
Copy pathsrc.html
File metadata and controls
235 lines (233 loc) · 8.88 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
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
<!-- Make sure the `/login-illust/xy.png` folder is hanging out in the same directory before you run this code—otherwise it’ll feel left out! -->
<!-- https://github.com/melancholic-ksm/cool-login-page-illustration-images -->
<!-- ctrl+f and remove this line
` <p class="credit">
Credit:<a href="https://github.com/melancholic-ksm/cool-login-page-illustration-images" target="_blank">melancholic-ksm/github
</a>
</p>`
if using in production -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Open Source — Login</title>
<!-- Fonts: Libertinus Sans for heading, Rubik for body -->
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600&display=swap" rel="stylesheet" />
<link href="https://fonts.cdnfonts.com/css/libertinus-sans" rel="stylesheet">
<style>
:root {
--bg: #ffffff;
--text: #111111;
--muted: #666666;
--border: #e6e6e6;
--shadow: rgba(0, 0, 0, 0.45); /* stronger for radial */
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
min-height: 100vh;
}
.left, .right {
position: relative;
display: grid;
place-items: center;
padding: 40px 24px;
}
.logo {
position: absolute;
top: 22px;
left: 24px;
display: flex;
align-items: center;
gap: 8px;
font-family: 'Rubik', sans-serif;
font-weight: 400;
font-size: 18px;
line-height: 1;
user-select: none;
}
.logo img {
width: 24px;
height: 24px;
display: block;
}
.card {
width: min(440px, 88%);
display: grid;
gap: 10px;
align-content: start;
}
h1 {
font-family: 'Libertinus Sans', sans-serif;
font-size: clamp(38px, 6vw, 54px);
letter-spacing: 0.4px;
margin: 0 0 6px;
}
.sub {
margin: 0 0 24px;
font-size: 14px;
}
.sub span {
color: #1877F2; /* blue */
text-decoration: underline;
cursor: pointer;
}
form.form { display: grid; gap: 14px; }
.input {
width: 100%;
padding: 14px 16px;
border: 1px solid var(--border);
border-radius: 14px;
background: #fff;
color: var(--text);
font: inherit;
outline: none;
transition: box-shadow 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.input:focus {
border-color: #111;
box-shadow: 0 0 0 6px rgba(17,17,17,0.06);
}
.credit {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
font-size: 12px;
color: #000;
opacity: 0;
transition: opacity 0.3s ease;
}
.credit a {
color: blue;
text-decoration: underline;
}
body:hover .credit {
opacity: 1;
}
.action {
width: 100%;
padding: 14px 16px;
border-radius: 9999px;
border: 1px solid var(--text);
background: #111;
color: #fff;
font-weight: 600;
cursor: pointer;
transition: transform 120ms ease, box-shadow 160ms ease;
}
.action:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.action:active { transform: translateY(0); box-shadow: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 6px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.row { display: flex; gap: 12px; }
.alt-btn {
flex: 1 1 0;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 12px 14px;
border-radius: 9999px;
border: 1px solid var(--border);
background: #fff;
color: #111;
font-weight: 500;
cursor: pointer;
transition: box-shadow 160ms ease, transform 120ms ease, border-color 160ms ease;
}
.alt-btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.15); border-color: #d8d8d8; transform: translateY(-1px); }
.alt-btn:active { transform: translateY(0); box-shadow: none; }
.alt-btn svg { width: 18px; height: 18px; display: block; }
.small { font-size: 12px; color: var(--muted); text-align: center; }
.frame { position: relative; display: grid; place-items: center; }
.frame::before {
content: "";
position: absolute;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.08) 50%, transparent 100%);
z-index: 0;
border-radius: 50%;
}
.frame img {
width: min(600px, 86%);
height: auto;
display: block;
z-index: 1;
}
@media (max-width: 980px) {
.grid { grid-template-columns: 1fr; }
.right { order: -1; }
.logo { position: fixed; top: 14px; left: 16px; }
.left, .right { padding: 48px 20px; }
}
</style>
</head>
<body>
<main class="grid" role="main">
<section class="left" aria-labelledby="welcome-title">
<!-- Updated: Open Source Initiative logo -->
<div class="logo">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQfAD3UelSsoZgX9YzuIH0Rh1XwzrvUZ9OfZQ&s">
</div>
<div class="card">
<h1 id="welcome-title">Welcome</h1>
<p class="sub">Sign in to continue or <span>Sign up</span></p>
<form class="form" action="javascript:void(0)" autocomplete="off" aria-label="Login form (demo)">
<label for="email" class="visually-hidden" aria-hidden="true" style="position:absolute;left:-9999px">Email</label>
<input id="email" class="input" type="email" placeholder="Email address" required />
<label for="password" class="visually-hidden" aria-hidden="true" style="position:absolute;left:-9999px">Password</label>
<input id="password" class="input" type="password" placeholder="Password" required />
<button class="action" type="submit" aria-disabled="true">Log In</button>
<div class="divider">or</div>
<div class="row">
<button class="alt-btn" type="button" aria-label="Login with Google (demo)">
<svg viewBox="0 0 533.5 544.3" aria-hidden="true" focusable="false">
<path d="M533.5 278.4c0-18.5-1.5-37.1-4.7-55.2H272v104.6h146.9c-6.3 34.7-25.6 64-54.6 83.6v69.2h88.4c51.8-47.7 80.8-118.1 80.8-202.2z" fill="#4285F4"/>
<path d="M272 544.3c73.5 0 135.2-24.3 180.2-66.2l-88.4-69.2c-24.6 16.5-56.1 26-91.8 26-70.6 0-130.4-47.6-151.9-111.7H29.4v70.2C74.8 488.5 167.6 544.3 272 544.3z" fill="#34A853"/>
<path d="M120.1 323.2c-10.1-29.9-10.1-62 0-91.9V161H29.4c-41.2 82.3-41.2 180 0 262.3l90.7-70.1z" fill="#FBBC05"/>
<path d="M272 106.1c39.9-.6 78.3 14.6 107.6 42.8l80.4-80.4C407.1-6.6 321.6-23.4 240.2 6.6 135.8 44.4 43 100.2 29.4 161l90.7 70.3C141.5 167.2 201.4 106.1 272 106.1z" fill="#EA4335"/>
</svg>
<span>Login with Google</span>
</button>
<button class="alt-btn" type="button" aria-label="Login with Facebook (demo)">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M22.675 0H1.325C.593 0 0 .593 0 1.325v21.351C0 23.407.593 24 1.325 24h11.5v-9.294H9.691v-3.62h3.134V8.413c0-3.106 1.896-4.801 4.664-4.801 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.503 0-1.794.715-1.794 1.763v2.313h3.587l-.467 3.62h-3.12V24h6.116C23.407 24 24 23.407 24 22.676V1.325C24 .593 23.407 0 22.675 0z" fill="#1877F2"/>
<path d="M16.671 24v-9.294h3.12l.468-3.62h-3.588V8.773c0-1.048.291-1.763 1.794-1.763l1.918-.001v-3.24c-.332-.044-1.47-.143-2.795-.143-2.768 0-4.664 1.694-4.664 4.801v2.673H9.691v3.62h3.134V24h3.846z" fill="#fff"/>
</svg>
<span>Login with Facebook</span>
</button>
</div>
<p class="credit">
Credit:<a href="https://github.com/melancholic-ksm/cool-login-page-illustration-images" target="_blank">melancholic-ksm/github
</a>
</p>
</form>
</div>
</section>
<section class="right" aria-label="Illustration area">
<div class="frame">
<img id="login-illustration" src="" alt="Showcase graphic" loading="lazy" />
</div>
</section>
</main>
<script>
// Random illustration between 01.png and 20.png
const idx = String(Math.floor(Math.random() * 20) + 1).padStart(2, "0");
document.getElementById("login-illustration").src =
`/login-illust/${idx}.png`;
</script>
</body>
</html>