293 lines
12 KiB
HTML
293 lines
12 KiB
HTML
<!DOCTYPE html>
|
|||
|
|
<html lang="en" data-theme="dark">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>DataStack — Sign in</title>
|
||
|
|
<style>
|
||
|
|
:root{
|
||
|
|
--bg:#0a0a0b;--surface:#111113;--surface-2:#17171a;--surface-3:#1d1d21;
|
||
|
|
--border:#232326;--border-strong:#2e2e33;
|
||
|
|
--text:#e8e8ea;--text-muted:#85858c;--text-faint:#5a5a62;
|
||
|
|
--accent:#a3e635;--accent-text:#a3e635;
|
||
|
|
--danger:#f87171;
|
||
|
|
--font:"Segoe UI","Segoe UI Web",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
|
||
|
|
--mono:"Consolas","SF Mono","Courier New",monospace;
|
||
|
|
--radius:0;
|
||
|
|
}
|
||
|
|
[data-theme="light"]{
|
||
|
|
--bg:#fafafa;--surface:#fff;--surface-2:#f4f4f5;--surface-3:#ececed;
|
||
|
|
--border:#e2e2e5;--border-strong:#d0d0d3;
|
||
|
|
--text:#111113;--text-muted:#5a5a62;--text-faint:#85858c;
|
||
|
|
--accent:#65a30d;--accent-text:#4d7c0f;
|
||
|
|
--danger:#dc2626;
|
||
|
|
}
|
||
|
|
*{box-sizing:border-box;margin:0;padding:0}
|
||
|
|
html,body{background:var(--bg);color:var(--text);font-family:var(--font);
|
||
|
|
font-size:13px;line-height:1.5;font-weight:400;-webkit-font-smoothing:antialiased;
|
||
|
|
min-height:100vh}
|
||
|
|
a{color:inherit;text-decoration:none}
|
||
|
|
button,input{font-family:inherit;font-size:inherit;color:inherit}
|
||
|
|
button{cursor:pointer}
|
||
|
|
.icon{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5;
|
||
|
|
stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
|
||
|
|
.icon-sm{width:14px;height:14px}
|
||
|
|
|
||
|
|
/* Page shell */
|
||
|
|
.page{min-height:100vh;display:grid;place-items:center;padding:24px;position:relative}
|
||
|
|
.page::before{content:"";position:absolute;inset:0;
|
||
|
|
background-image:
|
||
|
|
linear-gradient(var(--border) 1px,transparent 1px),
|
||
|
|
linear-gradient(90deg,var(--border) 1px,transparent 1px);
|
||
|
|
background-size:64px 64px;opacity:.14;pointer-events:none;
|
||
|
|
mask-image:radial-gradient(ellipse at center,black 30%,transparent 75%);
|
||
|
|
-webkit-mask-image:radial-gradient(ellipse at center,black 30%,transparent 75%)}
|
||
|
|
|
||
|
|
/* Theme toggle — top right */
|
||
|
|
.theme-toggle{position:fixed;top:16px;right:16px;width:28px;height:28px;
|
||
|
|
background:transparent;border:1px solid var(--border);display:grid;place-items:center;
|
||
|
|
color:var(--text-muted);transition:background .12s;z-index:10}
|
||
|
|
.theme-toggle:hover{background:var(--surface-2);color:var(--text)}
|
||
|
|
|
||
|
|
/* Card */
|
||
|
|
.card{background:var(--surface);border:1px solid var(--border);
|
||
|
|
width:100%;max-width:340px;position:relative;z-index:1}
|
||
|
|
|
||
|
|
/* Card head */
|
||
|
|
.card-head{padding:20px 20px 16px;border-bottom:1px solid var(--border);
|
||
|
|
display:flex;flex-direction:column;gap:14px}
|
||
|
|
.brand{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:500}
|
||
|
|
.brand-mark{width:14px;height:14px;background:var(--accent);display:grid;place-items:center}
|
||
|
|
.brand-mark::after{content:"";width:5px;height:5px;background:var(--bg)}
|
||
|
|
.brand-tag{font-size:9px;padding:1px 5px;margin-left:6px;
|
||
|
|
border:1px solid var(--border-strong);color:var(--text-faint);letter-spacing:.5px}
|
||
|
|
.card-title{font-size:15px;font-weight:500;letter-spacing:-.2px}
|
||
|
|
.card-sub{font-size:12px;color:var(--text-muted);margin-top:2px}
|
||
|
|
|
||
|
|
/* Card body */
|
||
|
|
.card-body{padding:16px 20px 20px;display:flex;flex-direction:column;gap:12px}
|
||
|
|
|
||
|
|
/* Error bar */
|
||
|
|
.error-bar{display:none;align-items:flex-start;gap:7px;
|
||
|
|
padding:8px 10px;border:1px solid var(--danger);
|
||
|
|
background:rgba(248,113,113,.06);font-size:11.5px;color:var(--danger);line-height:1.5}
|
||
|
|
.error-bar.show{display:flex}
|
||
|
|
.error-bar .icon{margin-top:1px}
|
||
|
|
[data-theme="light"] .error-bar{background:rgba(220,38,38,.05)}
|
||
|
|
|
||
|
|
/* Field */
|
||
|
|
.field{display:flex;flex-direction:column;gap:5px}
|
||
|
|
.field-label{font-size:10px;text-transform:uppercase;letter-spacing:.6px;
|
||
|
|
color:var(--text-faint)}
|
||
|
|
.field-wrap{position:relative;display:flex;align-items:stretch}
|
||
|
|
.field input{width:100%;height:32px;padding:0 10px;
|
||
|
|
background:var(--bg);border:1px solid var(--border);outline:none;
|
||
|
|
font-size:12.5px;color:var(--text);transition:border-color .12s,background .12s}
|
||
|
|
.field input::placeholder{color:var(--text-faint)}
|
||
|
|
.field input:focus{border-color:var(--border-strong)}
|
||
|
|
.field input.error{border-color:var(--danger)}
|
||
|
|
.field .toggle-pw{position:absolute;right:0;top:0;height:32px;width:32px;
|
||
|
|
background:transparent;border:none;border-left:1px solid var(--border);
|
||
|
|
display:grid;place-items:center;color:var(--text-faint);transition:color .12s}
|
||
|
|
.field .toggle-pw:hover{color:var(--text)}
|
||
|
|
.field input.has-toggle{padding-right:38px}
|
||
|
|
|
||
|
|
/* Meta row */
|
||
|
|
.meta-row{display:flex;align-items:center;justify-content:space-between;
|
||
|
|
font-size:11.5px;margin-top:2px}
|
||
|
|
.check{display:flex;align-items:center;gap:7px;color:var(--text-muted);
|
||
|
|
cursor:pointer;user-select:none}
|
||
|
|
.check input{display:none}
|
||
|
|
.check-box{width:13px;height:13px;border:1px solid var(--border-strong);
|
||
|
|
flex-shrink:0;position:relative;transition:background .12s,border-color .12s}
|
||
|
|
.check-box::after{content:"";position:absolute;left:3.5px;top:1.5px;width:4.5px;height:8px;
|
||
|
|
border-right:1.5px solid var(--bg);border-bottom:1.5px solid var(--bg);
|
||
|
|
transform:rotate(45deg);opacity:0}
|
||
|
|
.check input:checked + .check-box{background:var(--accent);border-color:var(--accent)}
|
||
|
|
.check input:checked + .check-box::after{opacity:1}
|
||
|
|
.forgot{color:var(--text-muted);font-size:11.5px}
|
||
|
|
.forgot:hover{color:var(--text);text-decoration:underline;text-underline-offset:2px}
|
||
|
|
|
||
|
|
/* Submit */
|
||
|
|
.btn-submit{width:100%;height:34px;margin-top:4px;
|
||
|
|
background:var(--text);color:var(--bg);border:1px solid var(--text);
|
||
|
|
font-size:12.5px;font-weight:500;display:flex;align-items:center;
|
||
|
|
justify-content:center;gap:6px;transition:background .12s,border-color .12s}
|
||
|
|
.btn-submit:hover{background:#d0d0d3;border-color:#d0d0d3}
|
||
|
|
.btn-submit:disabled{opacity:.7;cursor:not-allowed}
|
||
|
|
.btn-submit .spinner{width:12px;height:12px;border:1.5px solid currentColor;
|
||
|
|
border-top-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
|
||
|
|
@keyframes spin{to{transform:rotate(360deg)}}
|
||
|
|
|
||
|
|
/* Divider */
|
||
|
|
.divider{display:flex;align-items:center;gap:10px;font-size:10px;
|
||
|
|
text-transform:uppercase;letter-spacing:.8px;color:var(--text-faint);margin:2px 0}
|
||
|
|
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}
|
||
|
|
|
||
|
|
/* Alt action */
|
||
|
|
.btn-alt{width:100%;height:32px;
|
||
|
|
background:transparent;color:var(--text);border:1px solid var(--border-strong);
|
||
|
|
font-size:12px;display:flex;align-items:center;justify-content:center;gap:6px;
|
||
|
|
transition:background .12s}
|
||
|
|
.btn-alt:hover{background:var(--surface-2)}
|
||
|
|
|
||
|
|
/* Card foot */
|
||
|
|
.card-foot{padding:10px 20px;border-top:1px solid var(--border);
|
||
|
|
display:flex;align-items:center;justify-content:space-between;
|
||
|
|
font-size:10.5px;color:var(--text-faint)}
|
||
|
|
.card-foot .dot{width:5px;height:5px;background:var(--accent);display:inline-block;
|
||
|
|
margin-right:5px;vertical-align:middle}
|
||
|
|
|
||
|
|
/* Page footer */
|
||
|
|
.page-foot{position:fixed;bottom:16px;left:0;right:0;text-align:center;
|
||
|
|
font-size:10.5px;color:var(--text-faint);letter-spacing:.3px;
|
||
|
|
display:flex;align-items:center;justify-content:center;gap:6px;z-index:1}
|
||
|
|
.page-foot .sep{color:var(--border-strong)}
|
||
|
|
.page-foot a:hover{color:var(--text-muted)}
|
||
|
|
|
||
|
|
@media (max-width:480px){
|
||
|
|
.page{padding:16px}
|
||
|
|
.card-head{padding:16px 16px 14px}
|
||
|
|
.card-body{padding:14px 16px 16px}
|
||
|
|
.card-foot{padding:9px 16px}
|
||
|
|
.page-foot{bottom:10px;font-size:10px}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
|
||
|
|
<svg width="0" height="0" style="position:absolute">
|
||
|
|
<symbol id="i-sun" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.5 3.5l1 1M11.5 11.5l1 1M3.5 12.5l1-1M11.5 4.5l1-1"/></symbol>
|
||
|
|
<symbol id="i-moon" viewBox="0 0 16 16"><path d="M13.5 10A6 6 0 1 1 6 2.5c-.3 0-.5 0-.7.1a5.5 5.5 0 0 0 8.2 7.4Z"/></symbol>
|
||
|
|
<symbol id="i-eye" viewBox="0 0 16 16"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8Z"/><circle cx="8" cy="8" r="2"/></symbol>
|
||
|
|
<symbol id="i-eye-off" viewBox="0 0 16 16"><path d="M2 2l12 12"/><path d="M6.5 6.5a2 2 0 0 0 2.9 2.9"/><path d="M4 4.3C2.5 5.5 1.5 8 1.5 8s2.5 4.5 6.5 4.5c1 0 1.9-.3 2.7-.7"/><path d="M6.5 3.7A6.3 6.3 0 0 1 8 3.5c4 0 6.5 4.5 6.5 4.5s-.6 1.1-1.7 2.2"/></symbol>
|
||
|
|
<symbol id="i-alert" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 4.5v4"/><circle cx="8" cy="11" r=".7" fill="currentColor"/></symbol>
|
||
|
|
<symbol id="i-key" viewBox="0 0 16 16"><circle cx="5.5" cy="10.5" r="3"/><path d="M7.7 8.3 13 3M11 5l2 2M12 4l2 2"/></symbol>
|
||
|
|
<symbol id="i-arrow" viewBox="0 0 16 16"><path d="M3 8h10M9 4l4 4-4 4"/></symbol>
|
||
|
|
</svg>
|
||
|
|
|
||
|
|
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme">
|
||
|
|
<svg class="icon icon-sm" id="theme-icon"><use href="#i-sun"/></svg>
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<div class="page">
|
||
|
|
<div class="card">
|
||
|
|
|
||
|
|
<!-- Head -->
|
||
|
|
<div class="card-head">
|
||
|
|
<a href="/" class="brand">
|
||
|
|
<span class="brand-mark"></span>
|
||
|
|
DataStack
|
||
|
|
<span class="brand-tag">CONSOLE</span>
|
||
|
|
</a>
|
||
|
|
<div>
|
||
|
|
<div class="card-title">Sign in</div>
|
||
|
|
<div class="card-sub">Access your admin console</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Body -->
|
||
|
|
<form class="card-body" onsubmit="handleSubmit(event)">
|
||
|
|
|
||
|
|
<!-- Error state (hidden by default) -->
|
||
|
|
<div class="error-bar" id="errorBar">
|
||
|
|
<svg class="icon icon-sm"><use href="#i-alert"/></svg>
|
||
|
|
<span>Invalid email or password. Try again or reset your credentials.</span>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Email -->
|
||
|
|
<div class="field">
|
||
|
|
<label class="field-label" for="email">Email</label>
|
||
|
|
<div class="field-wrap">
|
||
|
|
<input id="email" type="email" placeholder="admin@example.com" autocomplete="username" required />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Password -->
|
||
|
|
<div class="field">
|
||
|
|
<label class="field-label" for="password">Password</label>
|
||
|
|
<div class="field-wrap">
|
||
|
|
<input id="password" type="password" class="has-toggle" placeholder="••••••••" autocomplete="current-password" required />
|
||
|
|
<button type="button" class="toggle-pw" onclick="togglePw()" title="Show password" id="pwToggle">
|
||
|
|
<svg class="icon icon-sm" id="pwIcon"><use href="#i-eye"/></svg>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Meta -->
|
||
|
|
<div class="meta-row">
|
||
|
|
<label class="check">
|
||
|
|
<input type="checkbox" checked>
|
||
|
|
<span class="check-box"></span>
|
||
|
|
Remember me
|
||
|
|
</label>
|
||
|
|
<a href="#" class="forgot">Forgot password?</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Submit -->
|
||
|
|
<button type="submit" class="btn-submit" id="submitBtn">
|
||
|
|
Sign in
|
||
|
|
<svg class="icon icon-sm"><use href="#i-arrow"/></svg>
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- Divider -->
|
||
|
|
<div class="divider">or</div>
|
||
|
|
|
||
|
|
<!-- Alt action -->
|
||
|
|
<button type="button" class="btn-alt">
|
||
|
|
<svg class="icon icon-sm"><use href="#i-key"/></svg>
|
||
|
|
Sign in with API key
|
||
|
|
</button>
|
||
|
|
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<!-- Foot -->
|
||
|
|
<div class="card-foot">
|
||
|
|
<span><span class="dot"></span>Server online</span>
|
||
|
|
<a href="/docs" style="color:var(--text-muted)">Docs →</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="page-foot">
|
||
|
|
<span>DataStack v1.0.0</span>
|
||
|
|
<span class="sep">·</span>
|
||
|
|
<a href="#">Self-hosted</a>
|
||
|
|
<span class="sep">·</span>
|
||
|
|
<a href="#">GitHub</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
function toggleTheme(){
|
||
|
|
const html=document.documentElement, icon=document.getElementById('theme-icon');
|
||
|
|
const isDark=html.getAttribute('data-theme')==='dark';
|
||
|
|
html.setAttribute('data-theme',isDark?'light':'dark');
|
||
|
|
icon.innerHTML='<use href="'+(isDark?'#i-moon':'#i-sun')+'"/>';
|
||
|
|
}
|
||
|
|
function togglePw(){
|
||
|
|
const pw=document.getElementById('password');
|
||
|
|
const icon=document.getElementById('pwIcon');
|
||
|
|
const btn=document.getElementById('pwToggle');
|
||
|
|
const show=pw.type==='password';
|
||
|
|
pw.type=show?'text':'password';
|
||
|
|
icon.innerHTML='<use href="'+(show?'#i-eye-off':'#i-eye')+'"/>';
|
||
|
|
btn.title=show?'Hide password':'Show password';
|
||
|
|
}
|
||
|
|
function handleSubmit(e){
|
||
|
|
e.preventDefault();
|
||
|
|
const btn=document.getElementById('submitBtn');
|
||
|
|
const err=document.getElementById('errorBar');
|
||
|
|
err.classList.remove('show');
|
||
|
|
btn.disabled=true;
|
||
|
|
btn.innerHTML='<span class="spinner"></span>Signing in…';
|
||
|
|
// Demo: show error after 1.2s
|
||
|
|
setTimeout(()=>{
|
||
|
|
btn.disabled=false;
|
||
|
|
btn.innerHTML='Sign in <svg class="icon icon-sm"><use href="#i-arrow"/></svg>';
|
||
|
|
err.classList.add('show');
|
||
|
|
}, 1200);
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|