Spaces:
Sleeping
Sleeping
Commit ·
8ce3880
1
Parent(s): cef921f
Simplify password eye to single grey icon, move forgot below sign-in, remove or divider
Browse files- static/css/style.css +21 -51
- static/js/app.js +3 -3
- templates/index.html +9 -16
static/css/style.css
CHANGED
|
@@ -110,46 +110,26 @@ body::before {
|
|
| 110 |
font-size: 0.9rem;
|
| 111 |
margin-bottom: 1.75rem;
|
| 112 |
}
|
| 113 |
-
.auth-container .form-group:last-of-type { margin-bottom:
|
|
|
|
|
|
|
| 114 |
|
| 115 |
-
.password-row-meta {
|
| 116 |
-
display: flex;
|
| 117 |
-
align-items: center;
|
| 118 |
-
justify-content: space-between;
|
| 119 |
-
margin-bottom: 0.4rem;
|
| 120 |
-
}
|
| 121 |
-
.password-row-meta label { margin-bottom: 0; }
|
| 122 |
.forgot-link {
|
| 123 |
-
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
.forgot-link a {
|
| 126 |
color: var(--text-dim);
|
| 127 |
-
font-size: 0.
|
| 128 |
text-decoration: none;
|
| 129 |
transition: color var(--transition);
|
| 130 |
-
font-weight: 400;
|
| 131 |
}
|
| 132 |
-
.forgot-link a:hover { color: var(--accent);
|
| 133 |
|
| 134 |
-
.auth-actions { margin-top: 1.75rem; }
|
| 135 |
-
.auth-divider {
|
| 136 |
-
display: flex;
|
| 137 |
-
align-items: center;
|
| 138 |
-
gap: 0.75rem;
|
| 139 |
-
margin: 1.5rem 0;
|
| 140 |
-
color: var(--text-dim);
|
| 141 |
-
font-size: 0.78rem;
|
| 142 |
-
}
|
| 143 |
-
.auth-divider::before,
|
| 144 |
-
.auth-divider::after {
|
| 145 |
-
content: '';
|
| 146 |
-
flex: 1;
|
| 147 |
-
height: 1px;
|
| 148 |
-
background: var(--border);
|
| 149 |
-
}
|
| 150 |
.toggle-auth {
|
| 151 |
text-align: center;
|
| 152 |
-
margin-top:
|
| 153 |
color: var(--text-muted);
|
| 154 |
font-size: 0.88rem;
|
| 155 |
}
|
|
@@ -160,7 +140,7 @@ body::before {
|
|
| 160 |
}
|
| 161 |
.toggle-auth a:hover { text-decoration: underline; }
|
| 162 |
|
| 163 |
-
/* Forgot password page
|
| 164 |
.forgot-header-icon {
|
| 165 |
width: 52px;
|
| 166 |
height: 52px;
|
|
@@ -178,7 +158,7 @@ body::before {
|
|
| 178 |
align-items: center;
|
| 179 |
gap: 0.35rem;
|
| 180 |
color: var(--text-dim);
|
| 181 |
-
font-size: 0.
|
| 182 |
text-decoration: none;
|
| 183 |
margin-top: 1.75rem;
|
| 184 |
transition: color var(--transition);
|
|
@@ -195,32 +175,22 @@ body::before {
|
|
| 195 |
}
|
| 196 |
.password-toggle {
|
| 197 |
position: absolute;
|
| 198 |
-
right:
|
| 199 |
-
top:
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
background: transparent;
|
| 203 |
border: none;
|
| 204 |
-
border-left: 1px solid transparent;
|
| 205 |
-
border-radius: 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0;
|
| 206 |
cursor: pointer;
|
| 207 |
-
color:
|
|
|
|
| 208 |
display: flex;
|
| 209 |
align-items: center;
|
| 210 |
justify-content: center;
|
| 211 |
-
transition: color var(--transition)
|
| 212 |
-
|
| 213 |
-
.password-toggle:hover {
|
| 214 |
-
color: var(--text);
|
| 215 |
-
background: var(--bg-hover);
|
| 216 |
-
border-left-color: var(--border);
|
| 217 |
-
}
|
| 218 |
-
.password-toggle.active {
|
| 219 |
-
color: var(--accent);
|
| 220 |
}
|
| 221 |
-
.password-toggle
|
| 222 |
-
.password-toggle.active
|
| 223 |
-
.password-toggle.active svg.eye-closed { display: block !important; }
|
| 224 |
|
| 225 |
/* ---- Cards ---- */
|
| 226 |
.card {
|
|
|
|
| 110 |
font-size: 0.9rem;
|
| 111 |
margin-bottom: 1.75rem;
|
| 112 |
}
|
| 113 |
+
.auth-container .form-group:last-of-type { margin-bottom: 1.75rem; }
|
| 114 |
+
|
| 115 |
+
.auth-actions { margin-top: 1.75rem; }
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
.forgot-link {
|
| 118 |
+
text-align: center;
|
| 119 |
+
margin-top: 1rem;
|
| 120 |
+
margin-bottom: 0;
|
| 121 |
}
|
| 122 |
.forgot-link a {
|
| 123 |
color: var(--text-dim);
|
| 124 |
+
font-size: 0.84rem;
|
| 125 |
text-decoration: none;
|
| 126 |
transition: color var(--transition);
|
|
|
|
| 127 |
}
|
| 128 |
+
.forgot-link a:hover { color: var(--accent); }
|
| 129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
.toggle-auth {
|
| 131 |
text-align: center;
|
| 132 |
+
margin-top: 1.25rem;
|
| 133 |
color: var(--text-muted);
|
| 134 |
font-size: 0.88rem;
|
| 135 |
}
|
|
|
|
| 140 |
}
|
| 141 |
.toggle-auth a:hover { text-decoration: underline; }
|
| 142 |
|
| 143 |
+
/* Forgot password page */
|
| 144 |
.forgot-header-icon {
|
| 145 |
width: 52px;
|
| 146 |
height: 52px;
|
|
|
|
| 158 |
align-items: center;
|
| 159 |
gap: 0.35rem;
|
| 160 |
color: var(--text-dim);
|
| 161 |
+
font-size: 0.84rem;
|
| 162 |
text-decoration: none;
|
| 163 |
margin-top: 1.75rem;
|
| 164 |
transition: color var(--transition);
|
|
|
|
| 175 |
}
|
| 176 |
.password-toggle {
|
| 177 |
position: absolute;
|
| 178 |
+
right: 0.65rem;
|
| 179 |
+
top: 50%;
|
| 180 |
+
transform: translateY(-50%);
|
| 181 |
+
background: none;
|
|
|
|
| 182 |
border: none;
|
|
|
|
|
|
|
| 183 |
cursor: pointer;
|
| 184 |
+
color: #64748b;
|
| 185 |
+
padding: 0.2rem;
|
| 186 |
display: flex;
|
| 187 |
align-items: center;
|
| 188 |
justify-content: center;
|
| 189 |
+
transition: color var(--transition);
|
| 190 |
+
line-height: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
}
|
| 192 |
+
.password-toggle:hover { color: #94a3b8; }
|
| 193 |
+
.password-toggle.active { color: #94a3b8; }
|
|
|
|
| 194 |
|
| 195 |
/* ---- Cards ---- */
|
| 196 |
.card {
|
static/js/app.js
CHANGED
|
@@ -94,9 +94,9 @@ document.querySelectorAll('.password-toggle').forEach((btn) => {
|
|
| 94 |
btn.addEventListener('click', () => {
|
| 95 |
const input = document.getElementById(btn.dataset.target);
|
| 96 |
if (!input) return;
|
| 97 |
-
const
|
| 98 |
-
input.type =
|
| 99 |
-
btn.
|
| 100 |
});
|
| 101 |
});
|
| 102 |
|
|
|
|
| 94 |
btn.addEventListener('click', () => {
|
| 95 |
const input = document.getElementById(btn.dataset.target);
|
| 96 |
if (!input) return;
|
| 97 |
+
const showing = input.type !== 'password';
|
| 98 |
+
input.type = showing ? 'password' : 'text';
|
| 99 |
+
btn.style.opacity = showing ? '' : '0.9';
|
| 100 |
});
|
| 101 |
});
|
| 102 |
|
templates/index.html
CHANGED
|
@@ -27,15 +27,11 @@
|
|
| 27 |
<input type="email" id="login-email" required placeholder="you@example.com" />
|
| 28 |
</div>
|
| 29 |
<div class="form-group">
|
| 30 |
-
<
|
| 31 |
-
<label for="login-password">Password</label>
|
| 32 |
-
<span class="forgot-link"><a href="#" data-view="forgot">Forgot password?</a></span>
|
| 33 |
-
</div>
|
| 34 |
<div class="input-password-wrap">
|
| 35 |
<input type="password" id="login-password" required placeholder="Enter your password" />
|
| 36 |
-
<button type="button" class="password-toggle" data-target="login-password" aria-label="
|
| 37 |
-
<svg
|
| 38 |
-
<svg class="eye-closed" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
|
| 39 |
</button>
|
| 40 |
</div>
|
| 41 |
</div>
|
|
@@ -43,7 +39,7 @@
|
|
| 43 |
<button type="submit" class="btn btn-primary btn-block">Sign in</button>
|
| 44 |
</div>
|
| 45 |
</form>
|
| 46 |
-
<
|
| 47 |
<p class="toggle-auth">Don't have an account? <a href="#" data-view="register">Create one</a></p>
|
| 48 |
</div>
|
| 49 |
</div>
|
|
@@ -75,9 +71,8 @@
|
|
| 75 |
<label for="register-password">Password</label>
|
| 76 |
<div class="input-password-wrap">
|
| 77 |
<input type="password" id="register-password" required placeholder="Min. 6 characters" minlength="6" />
|
| 78 |
-
<button type="button" class="password-toggle" data-target="register-password" aria-label="
|
| 79 |
-
<svg
|
| 80 |
-
<svg class="eye-closed" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
|
| 81 |
</button>
|
| 82 |
</div>
|
| 83 |
</div>
|
|
@@ -85,7 +80,6 @@
|
|
| 85 |
<button type="submit" class="btn btn-primary btn-block">Create account</button>
|
| 86 |
</div>
|
| 87 |
</form>
|
| 88 |
-
<div class="auth-divider">or</div>
|
| 89 |
<p class="toggle-auth">Already have an account? <a href="#" data-view="login">Sign in</a></p>
|
| 90 |
</div>
|
| 91 |
</div>
|
|
@@ -117,9 +111,8 @@
|
|
| 117 |
<label for="forgot-password">New password</label>
|
| 118 |
<div class="input-password-wrap">
|
| 119 |
<input type="password" id="forgot-password" required placeholder="Min. 6 characters" minlength="6" />
|
| 120 |
-
<button type="button" class="password-toggle" data-target="forgot-password" aria-label="
|
| 121 |
-
<svg
|
| 122 |
-
<svg class="eye-closed" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
|
| 123 |
</button>
|
| 124 |
</div>
|
| 125 |
</div>
|
|
@@ -289,6 +282,6 @@
|
|
| 289 |
</div>
|
| 290 |
</div>
|
| 291 |
|
| 292 |
-
<script src="/static/js/app.js?v=
|
| 293 |
</body>
|
| 294 |
</html>
|
|
|
|
| 27 |
<input type="email" id="login-email" required placeholder="you@example.com" />
|
| 28 |
</div>
|
| 29 |
<div class="form-group">
|
| 30 |
+
<label for="login-password">Password</label>
|
|
|
|
|
|
|
|
|
|
| 31 |
<div class="input-password-wrap">
|
| 32 |
<input type="password" id="login-password" required placeholder="Enter your password" />
|
| 33 |
+
<button type="button" class="password-toggle" data-target="login-password" aria-label="Toggle password visibility">
|
| 34 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
|
|
| 35 |
</button>
|
| 36 |
</div>
|
| 37 |
</div>
|
|
|
|
| 39 |
<button type="submit" class="btn btn-primary btn-block">Sign in</button>
|
| 40 |
</div>
|
| 41 |
</form>
|
| 42 |
+
<p class="forgot-link"><a href="#" data-view="forgot">Forgot your password?</a></p>
|
| 43 |
<p class="toggle-auth">Don't have an account? <a href="#" data-view="register">Create one</a></p>
|
| 44 |
</div>
|
| 45 |
</div>
|
|
|
|
| 71 |
<label for="register-password">Password</label>
|
| 72 |
<div class="input-password-wrap">
|
| 73 |
<input type="password" id="register-password" required placeholder="Min. 6 characters" minlength="6" />
|
| 74 |
+
<button type="button" class="password-toggle" data-target="register-password" aria-label="Toggle password visibility">
|
| 75 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
|
|
| 76 |
</button>
|
| 77 |
</div>
|
| 78 |
</div>
|
|
|
|
| 80 |
<button type="submit" class="btn btn-primary btn-block">Create account</button>
|
| 81 |
</div>
|
| 82 |
</form>
|
|
|
|
| 83 |
<p class="toggle-auth">Already have an account? <a href="#" data-view="login">Sign in</a></p>
|
| 84 |
</div>
|
| 85 |
</div>
|
|
|
|
| 111 |
<label for="forgot-password">New password</label>
|
| 112 |
<div class="input-password-wrap">
|
| 113 |
<input type="password" id="forgot-password" required placeholder="Min. 6 characters" minlength="6" />
|
| 114 |
+
<button type="button" class="password-toggle" data-target="forgot-password" aria-label="Toggle password visibility">
|
| 115 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
|
|
| 116 |
</button>
|
| 117 |
</div>
|
| 118 |
</div>
|
|
|
|
| 282 |
</div>
|
| 283 |
</div>
|
| 284 |
|
| 285 |
+
<script src="/static/js/app.js?v=8"></script>
|
| 286 |
</body>
|
| 287 |
</html>
|