971 lines
29 KiB
HTML
971 lines
29 KiB
HTML
<!DOCTYPE html>
|
|||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8"/>
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||
<title>{{if eq .Step "reset"}}Set New Password{{else if eq .Step "done"}}Password Reset{{else}}Forgot Password{{end}} — Cosmos {{.Service}}</title>
|
|||
|
|
<meta name="description" content="Reset your Cosmos {{.Service}} account password."/>
|
||
<link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%238fd9ff" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>'/>
|
|||
|
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet"/>
|
|||
<style>
|
|||
:root {
|
|||
|
|
--bg: #020308;
|
||
|
|
--ink: #eef3f8;
|
||
|
|
--dim: rgba(226, 234, 242, 0.58);
|
||
|
|
--faint: rgba(226, 234, 242, 0.32);
|
||
|
|
--line: rgba(226, 234, 242, 0.08);
|
||
|
|
--line-strong: rgba(226, 234, 242, 0.16);
|
||
|
|
--ok: #43e5a0;
|
||
|
|
--ac: 143, 216, 255;
|
||
|
|
--ac-rgb: 143, 216, 255;
|
||
|
|
--mono: 'JetBrains Mono', ui-monospace, monospace;
|
||
|
|
--disp: 'Space Grotesk', -apple-system, sans-serif;
|
||
|
|
--serif: 'Instrument Serif', Georgia, serif;
|
||
|
|
--pad: clamp(24px, 5vw, 72px);
|
||
|
|
--ez: cubic-bezier(0.16, 1, 0.3, 1);
|
||
|
|
}
|
||
|
|||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|||
|
|
html, body { min-height: 100%; }
|
||
|
|||
body {
|
|||
|
|
font-family: var(--disp);
|
||
|
|
background: var(--bg);
|
||
|
|
color: var(--ink);
|
||
|
|
min-height: 100vh;
|
||
|
|
min-height: 100svh;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
overflow-x: hidden;
|
||
|
|
-webkit-font-smoothing: antialiased;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|||
::selection { background: rgba(var(--ac-rgb), 0.3); color: #fff; }
|
|||
|
|
|
||
|
|
a:focus-visible, button:focus-visible, input:focus-visible {
|
||
|
|
outline: 1px solid rgba(var(--ac-rgb), 0.7);
|
||
|
|
outline-offset: 3px;
|
||
|
|
border-radius: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── 3D Viewport & Atmospheric Layers ── */
|
||
|
|
#webgl-bg {
|
||
|
|
position: fixed;
|
||
|
|
inset: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
z-index: 1;
|
||
|
|
pointer-events: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.noise-overlay {
|
||
|
|
position: fixed;
|
||
|
|
inset: -10%;
|
||
|
|
width: 120%;
|
||
|
|
height: 120%;
|
||
|
|
z-index: 2;
|
||
|
|
pointer-events: none;
|
||
|
|
opacity: 0.045;
|
||
|
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
||
|
|
background-size: 160px 160px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.radial-vignette {
|
||
|
|
position: fixed;
|
||
|
|
inset: 0;
|
||
|
|
z-index: 2;
|
||
|
|
pointer-events: none;
|
||
|
|
background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(2, 3, 8, 0.7) 85%, #020308 100%);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Top Navigation Bar ── */
|
||
|
|
.authbar {
|
||
|
|
position: relative;
|
||
|
|
z-index: 10;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-items: center;
|
||
|
|
padding: 28px var(--pad) 12px;
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 10px;
|
||
|
|
letter-spacing: 0.18em;
|
||
|
|
text-transform: uppercase;
|
||
|
|
}
|
||
|
|
|
||
|
|
.authbar a.back-link {
|
||
|
|
color: var(--dim);
|
||
|
|
text-decoration: none;
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 8px;
|
||
|
|
transition: color 0.25s, transform 0.25s var(--ez);
|
||
|
|
}
|
||
|
|
|
||
|
|
.authbar a.back-link:hover {
|
||
|
|
color: #fff;
|
||
|
|
transform: translateX(-3px);
|
||
|
|
}
|
||
|
|
|
||
|
|
.authbar .channel-badge {
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 9px;
|
||
|
|
padding: 5px 12px;
|
||
|
|
border-radius: 999px;
|
||
|
|
background: rgba(255, 255, 255, 0.03);
|
||
|
|
border: 1px solid var(--line);
|
||
|
|
color: var(--dim);
|
||
|
|
font-size: 9.5px;
|
||
|
|
backdrop-filter: blur(10px);
|
||
|
|
}
|
||
|
|
|
||
|
|
.authbar .pulse-dot {
|
||
|
|
width: 5px;
|
||
|
|
height: 5px;
|
||
|
|
border-radius: 50%;
|
||
|
|
background: var(--ok);
|
||
|
|
box-shadow: 0 0 10px var(--ok);
|
||
|
|
animation: dotPulse 2.4s ease infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes dotPulse {
|
||
|
|
0%, 100% { opacity: 1; transform: scale(1); }
|
||
|
|
50% { opacity: 0.4; transform: scale(0.85); }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Main Auth Card Container ── */
|
||
|
|
.auth-shell {
|
||
|
|
position: relative;
|
||
|
|
z-index: 10;
|
||
|
|
flex: 1;
|
||
|
|
display: grid;
|
||
|
|
place-items: center;
|
||
|
|
padding: 20px var(--pad) 50px;
|
||
|
|
perspective: 1200px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.card-wrapper {
|
||
|
|
width: 100%;
|
||
|
|
max-width: 440px;
|
||
|
|
will-change: transform;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Signature Stuudio/Jockey Floating 3D Card with Conic Edge Lighting ── */
|
||
|
|
.card-3d {
|
||
|
|
position: relative;
|
||
|
|
border-radius: 20px;
|
||
|
|
padding: 44px 38px 40px;
|
||
|
|
background: linear-gradient(145deg, rgba(10, 15, 28, 0.82), rgba(4, 7, 14, 0.88)) padding-box,
|
||
|
|
conic-gradient(from var(--rim-angle, 0deg) at var(--mx, 50%) var(--my, 50%),
|
||
|
|
rgba(143, 216, 255, 0.85) 0deg,
|
||
|
|
rgba(255, 255, 255, 0.1) 60deg,
|
||
|
|
rgba(143, 216, 255, 0.05) 160deg,
|
||
|
|
rgba(143, 216, 255, 0.45) 260deg,
|
||
|
|
rgba(143, 216, 255, 0.85) 360deg) border-box;
|
||
|
|
border: 1px solid transparent;
|
||
|
|
backdrop-filter: blur(28px);
|
||
|
|
-webkit-backdrop-filter: blur(28px);
|
||
|
|
box-shadow: 0 35px 85px rgba(0, 0, 0, 0.65), 0 0 50px rgba(143, 216, 255, 0.05);
|
||
|
|
transform-style: preserve-3d;
|
||
|
|
transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.card-3d:hover {
|
||
|
|
box-shadow: 0 45px 100px rgba(0, 0, 0, 0.75), 0 0 60px rgba(143, 216, 255, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Corner Reticle Accents */
|
||
|
|
.cnr {
|
||
|
|
position: absolute;
|
||
|
|
width: 14px;
|
||
|
|
height: 14px;
|
||
|
|
border: 1px solid rgba(var(--ac-rgb), 0.35);
|
||
|
|
pointer-events: none;
|
||
|
|
transition: border-color 0.3s, width 0.3s var(--ez), height 0.3s var(--ez);
|
||
|
|
}
|
||
|
|
.c1 { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
|
||
|
|
.c2 { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
|
||
|
|
.c3 { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
|
||
|
|
.c4 { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
|
||
|
|
|
||
|
|
.card-3d:focus-within .cnr {
|
||
|
|
border-color: rgba(var(--ac-rgb), 0.95);
|
||
|
|
width: 20px;
|
||
|
|
height: 20px;
|
||
|
|
box-shadow: 0 0 10px rgba(var(--ac-rgb), 0.2);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Brand Mark ── */
|
||
|
|
.brand {
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 12px;
|
||
|
|
text-decoration: none;
|
||
|
|
color: var(--ink);
|
||
|
|
margin-bottom: 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.brand-icon {
|
||
|
|
width: 34px;
|
||
|
|
height: 34px;
|
||
|
|
animation: markSpin 24s linear infinite;
|
||
|
|
flex-shrink: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes markSpin {
|
||
|
|
to { transform: rotate(360deg); }
|
||
|
|
}
|
||
|
|
|
||
|
|
.brand-text {
|
||
|
|
font-size: 18px;
|
||
|
|
font-weight: 600;
|
||
|
|
letter-spacing: -0.02em;
|
||
|
|
}
|
||
|
|
|
||
|
|
.brand-text em {
|
||
|
|
font-family: var(--serif);
|
||
|
|
font-style: italic;
|
||
|
|
font-weight: 400;
|
||
|
|
color: rgb(var(--ac-rgb));
|
||
|
|
margin-left: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Headings */
|
||
|
|
.h-title {
|
||
|
|
font-size: 26px;
|
||
|
|
font-weight: 600;
|
||
|
|
letter-spacing: -0.03em;
|
||
|
|
margin-bottom: 8px;
|
||
|
|
color: #fff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.h-sub {
|
||
|
|
font-size: 14px;
|
||
|
|
color: var(--dim);
|
||
|
|
margin-bottom: 28px;
|
||
|
|
line-height: 1.5;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Error & Info Boxes */
|
||
|
|
.error-box {
|
||
|
|
background: rgba(248, 113, 113, 0.08);
|
||
|
|
border: 1px solid rgba(248, 113, 113, 0.3);
|
||
|
|
border-radius: 10px;
|
||
|
|
padding: 12px 16px;
|
||
|
|
margin-bottom: 22px;
|
||
|
|
font-size: 13.5px;
|
||
|
|
color: #f87171;
|
||
|
|
font-weight: 500;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Form Inputs ── */
|
||
|
|
.form-group {
|
||
|
|
margin-bottom: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form-label {
|
||
|
|
display: block;
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 9.5px;
|
||
|
|
font-weight: 500;
|
||
|
|
letter-spacing: 0.16em;
|
||
|
|
text-transform: uppercase;
|
||
|
|
color: rgba(226, 234, 242, 0.6);
|
||
|
|
margin-bottom: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.input-ctrl {
|
||
|
|
width: 100%;
|
||
|
|
background: rgba(226, 234, 242, 0.03);
|
||
|
|
border: 1px solid var(--line-strong);
|
||
|
|
color: #fff;
|
||
|
|
padding: 13px 16px;
|
||
|
|
border-radius: 11px;
|
||
|
|
font-size: 14.5px;
|
||
|
|
font-weight: 500;
|
||
|
|
font-family: inherit;
|
||
|
|
outline: none;
|
||
|
|
transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.input-ctrl::placeholder {
|
||
|
|
color: rgba(226, 234, 242, 0.28);
|
||
|
|
}
|
||
|
|
|
||
|
|
.input-ctrl:focus {
|
||
|
|
border-color: rgba(var(--ac-rgb), 0.65);
|
||
|
|
box-shadow: 0 0 0 3px rgba(var(--ac-rgb), 0.15);
|
||
|
|
background: rgba(226, 234, 242, 0.05);
|
||
|
|
}
|
||
|
|
|
||
|
|
.pwd-wrap {
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.pwd-wrap .input-ctrl {
|
||
|
|
padding-right: 48px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.pwd-toggle {
|
||
|
|
position: absolute;
|
||
|
|
right: 12px;
|
||
|
|
top: 50%;
|
||
|
|
transform: translateY(-50%);
|
||
|
|
background: none;
|
||
|
|
border: none;
|
||
|
|
cursor: pointer;
|
||
|
|
color: rgba(226, 234, 242, 0.38);
|
||
|
|
display: flex;
|
||
|
|
padding: 6px;
|
||
|
|
transition: color 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.pwd-toggle:hover {
|
||
|
|
color: var(--ink);
|
||
|
|
}
|
||
|
|
|
||
|
|
.pwd-toggle svg { width: 18px; height: 18px; }
|
||
|
|
.pwd-toggle .slash { display: none; }
|
||
|
|
.pwd-toggle.shown .slash { display: block; }
|
||
|
|
|
||
|
|
/* ── Strength Meter ── */
|
||
|
|
.strength-bar {
|
||
|
|
margin-top: 10px;
|
||
|
|
height: 3px;
|
||
|
|
border-radius: 999px;
|
||
|
|
background: rgba(226, 234, 242, 0.08);
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
|
||
|
|
.strength-fill {
|
||
|
|
height: 100%;
|
||
|
|
border-radius: 999px;
|
||
|
|
width: 0;
|
||
|
|
transition: width 0.35s var(--ez), background 0.35s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.strength-label {
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 9px;
|
||
|
|
letter-spacing: 0.16em;
|
||
|
|
text-transform: uppercase;
|
||
|
|
margin-top: 7px;
|
||
|
|
color: var(--dim);
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
}
|
||
|
|
|
||
|
|
.req-list {
|
||
|
|
margin-top: 12px;
|
||
|
|
display: flex;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
gap: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.req {
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 9.5px;
|
||
|
|
letter-spacing: 0.1em;
|
||
|
|
text-transform: uppercase;
|
||
|
|
color: rgba(226, 234, 242, 0.3);
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 6px;
|
||
|
|
transition: color 0.3s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.req.met { color: var(--ok); }
|
||
|
|
.req i {
|
||
|
|
width: 5px;
|
||
|
|
height: 5px;
|
||
|
|
border-radius: 50%;
|
||
|
|
background: currentColor;
|
||
|
|
flex: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.match-hint {
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 10px;
|
||
|
|
letter-spacing: 0.12em;
|
||
|
|
text-transform: uppercase;
|
||
|
|
margin-top: 8px;
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Status State Icons ── */
|
||
|
|
.state-icon {
|
||
|
|
text-align: center;
|
||
|
|
margin-bottom: 26px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.state-ring {
|
||
|
|
width: 64px;
|
||
|
|
height: 64px;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.ring-ok {
|
||
|
|
background: rgba(67, 229, 160, 0.1);
|
||
|
|
border: 1px solid rgba(67, 229, 160, 0.25);
|
||
|
|
box-shadow: 0 0 24px rgba(67, 229, 160, 0.15);
|
||
|
|
}
|
||
|
|
|
||
|
|
.ring-warn {
|
||
|
|
background: rgba(251, 191, 36, 0.1);
|
||
|
|
border: 1px solid rgba(251, 191, 36, 0.25);
|
||
|
|
box-shadow: 0 0 24px rgba(251, 191, 36, 0.15);
|
||
|
|
}
|
||
|
|
|
||
|
|
.ring-err {
|
||
|
|
background: rgba(248, 113, 113, 0.1);
|
||
|
|
border: 1px solid rgba(248, 113, 113, 0.25);
|
||
|
|
box-shadow: 0 0 24px rgba(248, 113, 113, 0.15);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ── Submit Button ── */
|
||
|
|
.btn-submit {
|
||
|
|
width: 100%;
|
||
|
|
padding: 14px 24px;
|
||
|
|
border-radius: 11px;
|
||
|
|
border: none;
|
||
|
|
background: #fff;
|
||
|
|
color: #04060d;
|
||
|
|
font-family: inherit;
|
||
|
|
font-size: 14.5px;
|
||
|
|
font-weight: 700;
|
||
|
|
cursor: pointer;
|
||
|
|
letter-spacing: -0.01em;
|
||
|
|
box-shadow: 0 8px 30px rgba(255, 255, 255, 0.12);
|
||
|
|
transition: transform 0.2s var(--ez), box-shadow 0.25s, opacity 0.25s;
|
||
|
|
margin-top: 6px;
|
||
|
|
text-decoration: none;
|
||
|
|
display: block;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-submit:hover {
|
||
|
|
box-shadow: 0 12px 40px rgba(255, 255, 255, 0.22);
|
||
|
|
transform: translateY(-1px);
|
||
|
|
}
|
||
|
|
|
||
|
|
.btn-submit:active { transform: scale(0.985); }
|
||
|
|
.btn-submit:disabled { opacity: 0.75; cursor: progress; }
|
||
|
|
|
||
|
|
/* ── Auth Footer ── */
|
||
|
|
.auth-footer {
|
||
|
|
text-align: center;
|
||
|
|
margin-top: 26px;
|
||
|
|
font-size: 13.5px;
|
||
|
|
color: rgba(226, 234, 242, 0.42);
|
||
|
|
}
|
||
|
|
|
||
|
|
.auth-footer a {
|
||
|
|
color: rgb(var(--ac-rgb));
|
||
|
|
text-decoration: none;
|
||
|
|
font-weight: 600;
|
||
|
|
margin-left: 4px;
|
||
|
|
transition: color 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
.auth-footer a:hover { color: #fff; }
|
||
|
|
|
||
|
|
/* ── Page Footer ── */
|
||
|
|
.authfoot {
|
||
|
|
position: relative;
|
||
|
|
z-index: 10;
|
||
|
|
padding: 20px var(--pad);
|
||
|
|
display: flex;
|
||
|
|
justify-content: center;
|
||
|
|
font-family: var(--mono);
|
||
|
|
font-size: 9px;
|
||
|
|
letter-spacing: 0.2em;
|
||
|
|
color: rgba(226, 234, 242, 0.25);
|
||
|
|
text-transform: uppercase;
|
||
|
|
gap: 18px;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 480px) {
|
||
|
|
.card-3d { padding: 36px 24px 30px; }
|
||
|
|
.authbar { padding-top: 20px; }
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (prefers-reduced-motion: reduce) {
|
||
|
|
*, *::before, *::after {
|
||
|
|
animation-duration: 0.01ms !important;
|
||
|
|
transition-duration: 0.01ms !important;
|
||
|
|
}
|
||
|
|
}
|
||
</style>
|
|||
|
|
</head>
|
||
|
|
<body>
|
||
|
|||
|
|
<!-- Three.js Ambient 3D Starfield & Orbital Precession Viewport -->
|
||
|
|
<div id="webgl-bg" aria-hidden="true"></div>
|
||
|
|
<div class="noise-overlay" aria-hidden="true"></div>
|
||
|
|
<div class="radial-vignette" aria-hidden="true"></div>
|
||
|
|||
|
|
<header class="authbar">
|
||
<a href="/{{.Service}}/login" class="back-link">← Back to login</a>
|
|||
|
|
<div class="channel-badge">
|
||
|
|
<span class="pulse-dot"></span>
|
||
|
|
<span data-scr>SECURE CHANNEL · {{.Service}}</span>
|
||
|
|
</div>
|
||
</header>
|
|||
|
|
|
||
|
|
<main class="auth-shell">
|
||
<div class="card-wrapper" id="cardWrapper">
|
|||
|
|
<div class="card-3d" id="card">
|
||
<i class="cnr c1"></i><i class="cnr c2"></i><i class="cnr c3"></i><i class="cnr c4"></i>
|
|||
|
|
|
||
|
|
<a href="/" class="brand">
|
||
<svg class="brand-icon" viewBox="0 0 34 34" aria-hidden="true">
|
|||
|
|
<ellipse cx="17" cy="17" rx="14.5" ry="6" fill="none" stroke="rgba(238,243,248,.55)" stroke-width="1.2" transform="rotate(-24 17 17)"/>
|
||
|
|
<circle cx="17" cy="17" r="4.4" fill="#eef3f8"/>
|
||
|
|
<circle cx="27.4" cy="12.2" r="1.8" fill="rgb(var(--ac-rgb))"/>
|
||
|
|
</svg>
|
||
|
|
<span class="brand-text">Cosmos <em>{{.Service}}</em></span>
|
||
</a>
|
|||
|
|
|
||
|
|
{{/* ─── REQUEST EMAIL ─── */}}
|
||
|
|
{{if eq .Step "request"}}
|
||
|
|
|
||
|
|
{{if .Sent}}
|
||
|
|
<div class="state-icon">
|
||
|
|
<div class="state-ring ring-ok">
|
||
<svg width="28" height="28" fill="none" stroke="#43e5a0" stroke-width="2.5" viewBox="0 0 24 24">
|
|||
|
|
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
|
||
|
|
<polyline points="22,6 12,13 2,6"/>
|
||
|
|
</svg>
|
||
</div>
|
|||
|
|
</div>
|
||
<h1 class="h-title">Check your inbox</h1>
|
|||
|
|
<p class="h-sub">If that email is registered, we've sent a reset link. It expires in <strong style="color:var(--ink)">1 hour</strong>. Check your spam folder if you don't see it.</p>
|
||
<a href="/{{.Service}}/forgot-password" class="btn-submit" style="margin-top:0">Try a different email</a>
|
|||
|
|
<div class="auth-footer">
|
||
|
|
Remembered it? <a href="/{{.Service}}/login">Sign in</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{{else}}
|
||
<h1 class="h-title">Forgot password?</h1>
|
|||
|
|
<p class="h-sub">Enter your account email and we'll send a secure reset link valid for 1 hour.</p>
|
||
|
|||
|
|
<form action="/{{.Service}}/forgot-password" method="POST" id="forgotForm">
|
||
<div class="form-group">
|
|||
|
|
<label class="form-label" for="fp-email">Email address</label>
|
||
|
|
<input type="email" id="fp-email" name="email" class="input-ctrl" placeholder="[email protected]" required autocomplete="email" autofocus/>
|
||
</div>
|
|||
|
|
<button type="submit" class="btn-submit" id="fpBtn">Send Reset Link</button>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<div class="auth-footer">
|
||
|
|
Remembered it? <a href="/{{.Service}}/login">Sign in</a>
|
||
|
|
</div>
|
||
|
|
{{end}}
|
||
|
|
|
||
|
|
{{/* ─── RESET PASSWORD FORM ─── */}}
|
||
|
|
{{else if eq .Step "reset"}}
|
||
|
|
|
||
<h1 class="h-title">Set new password</h1>
|
|||
|
|
<p class="h-sub">{{if .Email}}Resetting password for <strong style="color:var(--ink)">{{.Email}}</strong>{{else}}Choose a strong new password{{end}}</p>
|
||
|
|||
|
|
{{if .Error}}
|
||
|
|
<div class="error-box">{{.Error}}</div>
|
||
|
|
{{end}}
|
||
|
|
|
||
|
|
<form action="/{{.Service}}/reset-password" method="POST" id="resetForm">
|
||
|
|
<input type="hidden" name="token" value="{{.Token}}"/>
|
||
|
|
|
||
<div class="form-group">
|
|||
|
|
<label class="form-label" for="np">New password</label>
|
||
<div class="pwd-wrap">
|
|||
<input type="password" id="np" name="password" class="input-ctrl" placeholder="••••••••" required autocomplete="new-password" oninput="updateStrength(this.value)"/>
|
|||
<button type="button" class="pwd-toggle" onclick="togglePwd('np')" aria-label="Toggle password visibility">
|
|||
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
|||
|
|
<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"/>
|
||
|
|
<line class="slash" x1="4" y1="4" x2="20" y2="20" stroke-linecap="round"/>
|
||
|
|
</svg>
|
||
</button>
|
|||
|
|
</div>
|
||
|
|
<div class="strength-bar"><div class="strength-fill" id="sf"></div></div>
|
||
|
|
<div class="strength-label"><span>Strength</span><span id="slv"></span></div>
|
||
|
|
<div class="req-list">
|
||
|
|
<span class="req" id="r-len"><i></i>8+ chars</span>
|
||
|
|
<span class="req" id="r-up"><i></i>Uppercase</span>
|
||
|
|
<span class="req" id="r-num"><i></i>Number</span>
|
||
|
|
<span class="req" id="r-sym"><i></i>Symbol</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
<div class="form-group">
|
|||
|
|
<label class="form-label" for="cp">Confirm new password</label>
|
||
<div class="pwd-wrap">
|
|||
<input type="password" id="cp" name="confirm_password" class="input-ctrl" placeholder="••••••••" required autocomplete="new-password" oninput="checkMatch()"/>
|
|||
<button type="button" class="pwd-toggle" onclick="togglePwd('cp')" aria-label="Toggle password visibility">
|
|||
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
|||
|
|
<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"/>
|
||
|
|
<line class="slash" x1="4" y1="4" x2="20" y2="20" stroke-linecap="round"/>
|
||
|
|
</svg>
|
||
</button>
|
|||
|
|
</div>
|
||
|
|
<div id="match-hint" class="match-hint"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<button type="submit" class="btn-submit" id="resetBtn">Reset Password</button>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
{{/* ─── SUCCESS ─── */}}
|
||
|
|
{{else if eq .Step "done"}}
|
||
|
|
|
||
|
|
<div class="state-icon">
|
||
|
|
<div class="state-ring ring-ok">
|
||
<svg width="28" height="28" fill="none" stroke="#43e5a0" stroke-width="2.5" viewBox="0 0 24 24">
|
|||
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/>
|
||
|
|
</svg>
|
||
</div>
|
|||
|
|
</div>
|
||
<h1 class="h-title">Password updated!</h1>
|
|||
|
|
<p class="h-sub">Your password has been changed successfully. You can now sign in with your new password.</p>
|
||
<a href="/{{.Service}}/login" class="btn-submit" style="margin-top:0">Continue to Sign In</a>
|
|||
|
|
|
||
|
|
{{/* ─── EXPIRED ─── */}}
|
||
|
|
{{else if eq .Step "expired"}}
|
||
|
|
|
||
|
|
<div class="state-icon">
|
||
|
|
<div class="state-ring ring-warn">
|
||
<svg width="28" height="28" fill="none" stroke="#fbbf24" stroke-width="2.5" viewBox="0 0 24 24">
|
|||
|
|
<circle cx="12" cy="12" r="10"/>
|
||
|
|
<line x1="12" y1="8" x2="12" y2="12"/>
|
||
|
|
<line x1="12" y1="16" x2="12.01" y2="16"/>
|
||
|
|
</svg>
|
||
</div>
|
|||
|
|
</div>
|
||
<h1 class="h-title">Link expired</h1>
|
|||
|
|
<p class="h-sub">This reset link has expired. Links are only valid for 1 hour. Please request a new one.</p>
|
||
<a href="/{{.Service}}/forgot-password" class="btn-submit" style="margin-top:0">Request New Link</a>
|
|||
|
|
|
||
|
|
{{/* ─── INVALID / USED ─── */}}
|
||
|
|
{{else if eq .Step "invalid"}}
|
||
|
|
|
||
|
|
<div class="state-icon">
|
||
|
|
<div class="state-ring ring-err">
|
||
<svg width="28" height="28" fill="none" stroke="#f87171" stroke-width="2.5" viewBox="0 0 24 24">
|
|||
|
|
<circle cx="12" cy="12" r="10"/>
|
||
|
|
<line x1="15" y1="9" x2="9" y2="15"/>
|
||
|
|
<line x1="9" y1="9" x2="15" y2="15"/>
|
||
|
|
</svg>
|
||
</div>
|
|||
|
|
</div>
|
||
<h1 class="h-title">Invalid link</h1>
|
|||
|
|
<p class="h-sub">This reset link is invalid or has already been used. Please request a fresh password reset.</p>
|
||
<a href="/{{.Service}}/forgot-password" class="btn-submit" style="margin-top:0">Request New Link</a>
|
|||
|
|
|
||
|
|
{{end}}
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</main>
|
||
|
|
|
||
|
|
<footer class="authfoot">
|
||
|
|
<span>51.4778° N · 0.0015° W</span>
|
||
<span>Zero Cloud Leakage</span>
|
|||
|
|
<span>Sovereign Enclave</span>
|
||
</footer>
|
|||
|
|
|
||
<!-- Local Zero-Latency Three.js Engine -->
|
|||
|
|
<script src="/three.min.js"></script>
|
||
<script>
|
|||
/* ══ 1. THREE.JS 3D CELESTIAL BACKGROUND ══ */
|
|||
|
|
(function(){
|
||
|
|
'use strict';
|
||
|
|
var container = document.getElementById('webgl-bg');
|
||
|
|
if(!window.THREE || !container) return;
|
||
|
|||
var scene = new THREE.Scene();
|
|||
|
|
var camera = new THREE.PerspectiveCamera(55, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||
|
|
camera.position.z = 28;
|
||
|
|
|
||
|
|
var renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true, powerPreference: 'high-performance' });
|
||
|
|
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
|
||
|
|
renderer.setSize(window.innerWidth, window.innerHeight);
|
||
|
|
container.appendChild(renderer.domElement);
|
||
|
|
|
||
|
|
// Deep Starfield Particle Nodes
|
||
|
|
var starCount = 1400;
|
||
|
|
var starGeo = new THREE.BufferGeometry();
|
||
|
|
var starPos = new Float32Array(starCount * 3);
|
||
|
|
var starColors = new Float32Array(starCount * 3);
|
||
|
|
|
||
|
|
var colA = new THREE.Color(0x8fd9ff);
|
||
|
|
var colB = new THREE.Color(0xffffff);
|
||
|
|
var colC = new THREE.Color(0x43e5a0);
|
||
|
|
|
||
|
|
for(var i = 0; i < starCount; i++){
|
||
|
|
var i3 = i * 3;
|
||
|
|
starPos[i3] = (Math.random() - 0.5) * 80;
|
||
|
|
starPos[i3 + 1] = (Math.random() - 0.5) * 60;
|
||
|
|
starPos[i3 + 2] = (Math.random() - 0.5) * 50 - 5;
|
||
|
|
|
||
|
|
var roll = Math.random();
|
||
|
|
var c = roll < 0.6 ? colB : (roll < 0.85 ? colA : colC);
|
||
|
|
starColors[i3] = c.r;
|
||
|
|
starColors[i3 + 1] = c.g;
|
||
|
|
starColors[i3 + 2] = c.b;
|
||
|
|
}
|
||
|
|
starGeo.setAttribute('position', new THREE.BufferAttribute(starPos, 3));
|
||
|
|
starGeo.setAttribute('color', new THREE.BufferAttribute(starColors, 3));
|
||
|
|
|
||
|
|
var starMat = new THREE.PointsMaterial({
|
||
|
|
size: 0.18,
|
||
|
|
vertexColors: true,
|
||
|
|
transparent: true,
|
||
|
|
opacity: 0.75,
|
||
|
|
blending: THREE.AdditiveBlending
|
||
|
|
});
|
||
|
|
var starField = new THREE.Points(starGeo, starMat);
|
||
|
|
scene.add(starField);
|
||
|
|
|
||
|
|
// Subtle 3D Gyroscopic Rings Floating in Celestial Horizon
|
||
|
|
var ringGroup = new THREE.Group();
|
||
|
|
scene.add(ringGroup);
|
||
|
|
|
||
|
|
var r1Geo = new THREE.TorusGeometry(13, 0.02, 16, 120);
|
||
|
|
var r1Mat = new THREE.MeshBasicMaterial({ color: 0x8fd9ff, transparent: true, opacity: 0.18 });
|
||
|
|
var ring1 = new THREE.Mesh(r1Geo, r1Mat);
|
||
|
|
ring1.rotation.x = Math.PI / 3;
|
||
|
|
ringGroup.add(ring1);
|
||
|
|
|
||
|
|
var r2Geo = new THREE.TorusGeometry(16, 0.015, 16, 120);
|
||
|
|
var r2Mat = new THREE.MeshBasicMaterial({ color: 0x43e5a0, transparent: true, opacity: 0.1 });
|
||
|
|
var ring2 = new THREE.Mesh(r2Geo, r2Mat);
|
||
|
|
ring2.rotation.y = Math.PI / 4;
|
||
|
|
ring2.rotation.x = Math.PI / 5;
|
||
|
|
ringGroup.add(ring2);
|
||
|
|
|
||
|
|
var mouse = { x: 0, y: 0, targetX: 0, targetY: 0 };
|
||
|
|
window.addEventListener('mousemove', function(e){
|
||
|
|
mouse.targetX = (e.clientX / window.innerWidth - 0.5) * 2;
|
||
|
|
mouse.targetY = -(e.clientY / window.innerHeight - 0.5) * 2;
|
||
|
|
}, { passive: true });
|
||
|
|
|
||
|
|
window.addEventListener('resize', function(){
|
||
|
|
camera.aspect = window.innerWidth / window.innerHeight;
|
||
|
|
camera.updateProjectionMatrix();
|
||
|
|
renderer.setSize(window.innerWidth, window.innerHeight);
|
||
|
|
});
|
||
|
|
|
||
|
|
var clock = new THREE.Clock();
|
||
|
|
function animate(){
|
||
|
|
requestAnimationFrame(animate);
|
||
|
|
if(document.hidden) return;
|
||
|
|
|
||
|
|
var elapsedTime = clock.getElapsedTime();
|
||
|
|
mouse.x += (mouse.targetX - mouse.x) * 0.05;
|
||
|
|
mouse.y += (mouse.targetY - mouse.y) * 0.05;
|
||
|
|
|
||
|
|
starField.rotation.y = elapsedTime * 0.015;
|
||
|
|
starField.rotation.x = elapsedTime * 0.008;
|
||
|
|
|
||
|
|
ring1.rotation.z = elapsedTime * 0.04;
|
||
|
|
ring2.rotation.z = -elapsedTime * 0.03;
|
||
|
|
|
||
|
|
ringGroup.position.x = mouse.x * 1.5;
|
||
|
|
ringGroup.position.y = mouse.y * 1.2;
|
||
|
|
|
||
|
|
camera.position.x = mouse.x * 2;
|
||
|
|
camera.position.y = mouse.y * 1.5;
|
||
|
|
camera.lookAt(scene.position);
|
||
|
|
|
||
|
|
renderer.render(scene, camera);
|
||
|
|
}
|
||
|
|
animate();
|
||
})();
|
|||
|
|
|
||
/* ══ 2. STUUDIO/JOCKEY SIGNATURE 3D CARD TILT & CONIC RIM LIGHT ══ */
|
|||
|
|
(function(){
|
||
|
|
'use strict';
|
||
|
|
var card = document.getElementById('card');
|
||
|
|
var wrapper = document.getElementById('cardWrapper');
|
||
|
|
if(!card || !wrapper) return;
|
||
|
|||
var rect = null;
|
|||
|
|
function updateRect(){ rect = card.getBoundingClientRect(); }
|
||
|
|
window.addEventListener('resize', updateRect);
|
||
|
|
updateRect();
|
||
|
|||
var currentTiltX = 0, currentTiltY = 0;
|
|||
|
|
var targetTiltX = 0, targetTiltY = 0;
|
||
|
|||
window.addEventListener('mousemove', function(e){
|
|||
|
|
if(!rect) updateRect();
|
||
|
|
var cx = rect.left + rect.width / 2;
|
||
|
|
var cy = rect.top + rect.height / 2;
|
||
|
|
var dx = e.clientX - cx;
|
||
|
|
var dy = e.clientY - cy;
|
||
|
|||
// Conic Rim Lighting angle and position
|
|||
|
|
var angle = Math.atan2(dy, dx) * (180 / Math.PI) + 90;
|
||
|
|
card.style.setProperty('--rim-angle', angle + 'deg');
|
||
|
|
var mxPercent = Math.max(0, Math.min(100, ((e.clientX - rect.left) / rect.width) * 100));
|
||
|
|
var myPercent = Math.max(0, Math.min(100, ((e.clientY - rect.top) / rect.height) * 100));
|
||
|
|
card.style.setProperty('--mx', mxPercent + '%');
|
||
|
|
card.style.setProperty('--my', myPercent + '%');
|
||
|
|
|
||
|
|
// 3D perspective tilt calculation
|
||
|
|
var dist = Math.hypot(dx, dy);
|
||
|
|
var maxDist = Math.hypot(window.innerWidth, window.innerHeight) / 2;
|
||
|
|
if(dist < maxDist){
|
||
|
|
targetTiltY = (dx / (rect.width * 1.8)) * 12;
|
||
|
|
targetTiltX = -(dy / (rect.height * 1.8)) * 12;
|
||
|
|
} else {
|
||
|
|
targetTiltX = 0;
|
||
|
|
targetTiltY = 0;
|
||
|
|
}
|
||
|
|
}, { passive: true });
|
||
|
|
|
||
|
|
window.addEventListener('mouseleave', function(){
|
||
|
|
targetTiltX = 0;
|
||
|
|
targetTiltY = 0;
|
||
|
|
});
|
||
|
|
|
||
|
|
function tiltLoop(){
|
||
|
|
currentTiltX += (targetTiltX - currentTiltX) * 0.08;
|
||
|
|
currentTiltY += (targetTiltY - currentTiltY) * 0.08;
|
||
|
|
card.style.transform = 'rotateX(' + currentTiltX.toFixed(2) + 'deg) rotateY(' + currentTiltY.toFixed(2) + 'deg)';
|
||
|
|
requestAnimationFrame(tiltLoop);
|
||
|
|
}
|
||
|
|
tiltLoop();
|
||
})();
|
|||
|
|
|
||
/* ══ 3. ORIGINAL PRESERVED FORGOT/RESET PASSWORD BEHAVIORS ══ */
|
|||
|
|
function togglePwd(id) {
|
||
|
|
var el = document.getElementById(id);
|
||
|
|
if(!el) return;
|
||
|
|
el.type = el.type === 'password' ? 'text' : 'password';
|
||
|
|
var b = el.parentElement.querySelector('.pwd-toggle');
|
||
|
|
if (b) b.classList.toggle('shown');
|
||
|
|
}
|
||
|
|
|
||
|
|
function updateStrength(val) {
|
||
|
|
var fill = document.getElementById('sf');
|
||
|
|
var label = document.getElementById('slv');
|
||
|
|
if (!fill) return;
|
||
|
|
|
||
|
|
var hasLen = val.length >= 8;
|
||
|
|
var hasUp = /[A-Z]/.test(val);
|
||
|
|
var hasNum = /[0-9]/.test(val);
|
||
|
|
var hasSym = /[^A-Za-z0-9]/.test(val);
|
||
|
|
|
||
|
|
function setReq(id, met) {
|
||
|
|
var el = document.getElementById(id);
|
||
|
|
if (el) el.classList.toggle('met', met);
|
||
|
|
}
|
||
|
|
setReq('r-len', hasLen);
|
||
|
|
setReq('r-up', hasUp);
|
||
|
|
setReq('r-num', hasNum);
|
||
|
|
setReq('r-sym', hasSym);
|
||
|
|
|
||
|
|
var score = [hasLen, hasUp, hasNum, hasSym].filter(Boolean).length;
|
||
|
|
var widths = ['0%', '25%', '50%', '75%', '100%'];
|
||
|
|
var colors = ['transparent', '#f87171', '#fbbf24', '#8fd9ff', '#43e5a0'];
|
||
|
|
var labels = ['', 'WEAK', 'FAIR', 'GOOD', 'STRONG'];
|
||
|
|
|
||
|
|
fill.style.width = widths[score];
|
||
|
|
fill.style.background = colors[score];
|
||
|
|
if (label) {
|
||
|
|
label.textContent = labels[score];
|
||
|
|
label.style.color = colors[score];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function checkMatch() {
|
||
|
|
var np = document.getElementById('np');
|
||
|
|
var cp = document.getElementById('cp');
|
||
|
|
var hint = document.getElementById('match-hint');
|
||
|
|
if (!hint || !cp || !np) return;
|
||
|
|
|
||
|
|
if (cp.value.length === 0) {
|
||
|
|
hint.style.display = 'none';
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
hint.style.display = 'block';
|
||
|
|
if (np.value === cp.value) {
|
||
|
|
hint.textContent = 'Passwords match';
|
||
|
|
hint.style.color = '#43e5a0';
|
||
|
|
} else {
|
||
|
|
hint.textContent = 'Passwords do not match';
|
||
|
|
hint.style.color = '#f87171';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
var forgotForm = document.getElementById('forgotForm');
|
||
|
|
if (forgotForm) {
|
||
|
|
forgotForm.addEventListener('submit', function() {
|
||
|
|
var btn = document.getElementById('fpBtn');
|
||
|
|
if (btn) {
|
||
|
|
btn.textContent = 'Sending link…';
|
||
|
|
btn.disabled = true;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
var resetForm = document.getElementById('resetForm');
|
||
|
|
if (resetForm) {
|
||
|
|
resetForm.addEventListener('submit', function(e) {
|
||
|
|
var np = document.getElementById('np');
|
||
|
|
var cp = document.getElementById('cp');
|
||
|
|
if (np && cp && np.value !== cp.value) {
|
||
|
|
e.preventDefault();
|
||
|
|
var hint = document.getElementById('match-hint');
|
||
|
|
if (hint) {
|
||
|
|
hint.style.display = 'block';
|
||
|
|
hint.textContent = 'Passwords do not match';
|
||
|
|
hint.style.color = '#f87171';
|
||
|
|
}
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
var btn = document.getElementById('resetBtn');
|
||
|
|
if (btn) {
|
||
|
|
btn.textContent = 'Updating password…';
|
||
|
|
btn.disabled = true;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Scramble decode on secure channel badge */
|
||
|
|
(function(){
|
||
|
|
'use strict';
|
||
|
|
function scramble(el){
|
||
|
|
var tgt = el.dataset.txt;
|
||
|
|
var f = 0, total = Math.max(16, tgt.length * 1.2), CH = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<>/[]·';
|
||
|
|
var iv = setInterval(function(){
|
||
|
|
f++;
|
||
|
|
var done = Math.floor(tgt.length * f / total), s = '';
|
||
|
|
for(var i = 0; i < tgt.length; i++){
|
||
|
|
var ch = tgt[i];
|
||
|
|
s += i < done ? ch : (ch === ' ' ? ' ' : CH[Math.random() * CH.length | 0]);
|
||
|
|
}
|
||
|
|
el.textContent = s;
|
||
|
|
if(f >= total){ el.textContent = tgt; clearInterval(iv); }
|
||
|
|
}, 28);
|
||
|
|
}
|
||
|
|
document.querySelectorAll('[data-scr]').forEach(function(el){
|
||
|
|
el.dataset.txt = el.textContent;
|
||
|
|
});
|
||
|
|
setTimeout(function(){
|
||
|
|
var t = document.querySelector('[data-scr]');
|
||
|
|
if(t) scramble(t);
|
||
|
|
}, 350);
|
||
})();
|
|||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|