966 lines
29 KiB
HTML
966 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>Create Account — Cosmos {{.Service}}</title>
|
||||
|
|
<meta name="description" content="Create your Cosmos {{.Service}} sovereign account."/>
|
|||
|
|
<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: 520px;
|
|||
will-change: transform;
|
||||
}
|
||||
|
|
|
|||
/* ── Signature Stuudio/Jockey Floating 3D Card with Conic Edge Lighting ── */
|
||||
|
|
.card-3d {
|
|||
|
|
position: relative;
|
|||
|
|
border-radius: 20px;
|
|||
|
|
padding: 42px 40px 38px;
|
|||
|
|
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: 28px;
|
|||
}
|
||||
|
|
|
|||
.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: 26px;
|
|||
|
|
line-height: 1.5;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Error Alert Box */
|
|||
|
|
.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: 20px;
|
|||
|
|
font-size: 13.5px;
|
|||
|
|
color: #f87171;
|
|||
|
|
font-weight: 500;
|
|||
display: none;
|
||||
}
|
||||
.error-box.visible { display: block; }
|
||||
|
||||
/* Grid Row for Name and Username */
|
||||
|
|
.row2 {
|
|||
|
|
display: grid;
|
|||
|
|
grid-template-columns: 1fr 1fr;
|
|||
|
|
gap: 14px;
|
|||
}
|
||||
|
|
|
|||
/* ── Form Inputs ── */
|
||||
|
|
.form-group {
|
|||
|
|
margin-bottom: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.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;
|
|||
}
|
||||
|
||||
.form-label .opt {
|
||||
|
|
color: rgba(226, 234, 242, 0.32);
|
|||
|
|
text-transform: none;
|
|||
|
|
letter-spacing: 0.05em;
|
|||
|
|
margin-left: 4px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.input-ctrl {
|
|||
width: 100%;
|
||||
background: rgba(226, 234, 242, 0.03);
|
||||
|
|
border: 1px solid var(--line-strong);
|
|||
color: #fff;
|
||||
padding: 12px 15px;
|
||||
|
|
border-radius: 11px;
|
|||
|
|
font-size: 14px;
|
|||
|
|
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: 17px; height: 17px; }
|
|||
|
|
.pwd-toggle .slash { display: none; }
|
|||
|
|
.pwd-toggle.shown .slash { display: block; }
|
|||
|
|
|
|||
|
|
.caps-warn {
|
|||
|
|
display: none;
|
|||
|
|
font-family: var(--mono);
|
|||
|
|
font-size: 9px;
|
|||
|
|
letter-spacing: 0.14em;
|
|||
|
|
color: #fbbf24;
|
|||
|
|
margin-top: 6px;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 6px;
|
|||
|
|
text-transform: uppercase;
|
|||
|
|
}
|
|||
|
|
.caps-warn.on { display: flex; }
|
|||
|
|
.caps-warn i {
|
|||
|
|
width: 5px;
|
|||
|
|
height: 5px;
|
|||
|
|
background: #fbbf24;
|
|||
|
|
border-radius: 1px;
|
|||
|
|
box-shadow: 0 0 8px #fbbf24;
|
|||
|
|
flex: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.field-hint {
|
|||
|
|
font-size: 10px;
|
|||
|
|
font-family: var(--mono);
|
|||
|
|
color: rgba(226, 234, 242, 0.35);
|
|||
|
|
margin-top: 6px;
|
|||
|
|
letter-spacing: 0.06em;
|
|||
|
|
transition: color 0.25s;
|
|||
|
|
}
|
|||
|
|
.field-hint.error { color: #f87171; }
|
|||
|
|
.field-hint.ok { color: #43e5a0; }
|
|||
|
|
|
|||
|
|
/* ── Password Strength Bar ── */
|
|||
|
|
.strength-bar {
|
|||
|
|
display: flex;
|
|||
|
|
gap: 4px;
|
|||
|
|
margin-top: 8px;
|
|||
|
|
align-items: center;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.strength-seg {
|
|||
|
|
flex: 1;
|
|||
|
|
height: 3px;
|
|||
|
|
border-radius: 2px;
|
|||
|
|
background: rgba(226, 234, 242, 0.1);
|
|||
|
|
transition: background 0.3s, box-shadow 0.3s;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.slabel {
|
|||
|
|
font-family: var(--mono);
|
|||
|
|
font-size: 8.5px;
|
|||
|
|
letter-spacing: 0.16em;
|
|||
|
|
color: rgba(226, 234, 242, 0.4);
|
|||
|
|
margin-left: 8px;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
min-width: 50px;
|
|||
|
|
text-align: right;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ── File Upload Drop Area ── */
|
|||
|
|
.file-upload-area {
|
|||
|
|
width: 100%;
|
|||
|
|
border: 1.5px dashed rgba(226, 234, 242, 0.18);
|
|||
border-radius: 12px;
|
||||
padding: 18px;
|
||||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 6px;
|
|||
|
|
cursor: pointer;
|
|||
|
|
transition: border-color 0.25s, background 0.25s;
|
|||
|
|
background: rgba(226, 234, 242, 0.02);
|
|||
|
|
text-align: center;
|
|||
|
|
position: relative;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.file-upload-area:hover, .file-upload-area.dragover {
|
|||
|
|
border-color: rgba(var(--ac-rgb), 0.65);
|
|||
|
|
background: rgba(var(--ac-rgb), 0.06);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.file-upload-area input[type=file] {
|
|||
|
|
position: absolute;
|
|||
|
|
inset: 0;
|
|||
|
|
opacity: 0;
|
|||
|
|
cursor: pointer;
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.file-upload-icon {
|
|||
|
|
color: rgb(var(--ac-rgb));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.file-upload-icon svg { width: 24px; height: 24px; }
|
|||
|
|
.file-upload-label { font-size: 13px; font-weight: 500; }
|
|||
|
|
.file-upload-label span { color: rgb(var(--ac-rgb)); }
|
|||
|
|
.file-upload-hint { font-size: 11px; color: rgba(226, 234, 242, 0.32); }
|
|||
|
|
.file-selected { color: rgb(var(--ac-rgb)); font-weight: 600; font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
|
|||
|
|
|
|||
|
|
/* ── 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;
|
|||
}
|
||||
|
|
|
|||
.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.65; cursor: not-allowed; transform: none; }
|
|||
|
||||
.terms-note {
|
||||
|
|
font-size: 11.5px;
|
|||
|
|
color: rgba(226, 234, 242, 0.32);
|
|||
text-align: center;
|
||||
margin-top: 16px;
|
||||
|
|
line-height: 1.6;
|
|||
}
|
||||
|
|
|
|||
/* ── Auth Footer ── */
|
||||
|
|
.auth-footer {
|
|||
|
|
text-align: center;
|
|||
|
|
margin-top: 22px;
|
|||
|
|
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: 560px) {
|
||||
|
|
.row2 { grid-template-columns: 1fr; }
|
|||
|
|
.card-3d { padding: 34px 22px 28px; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@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="/" class="back-link">← Cosmos Core</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>
|
|||
|
||||
<h1 class="h-title">Create your account</h1>
|
||||
|
|
<p class="h-sub">Provision your sovereign workspace and encryption keys</p>
|
|||
|
|
|
|||
|
|
{{if .Error}}
|
|||
|
|
<div class="error-box visible">{{.Error}}</div>
|
|||
|
|
{{end}}
|
|||
|
|
|
|||
|
|
<form action="/{{.Service}}/signup" method="POST" enctype="multipart/form-data" id="signupForm">
|
|||
|
|
<div class="row2">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="form-label" for="su-name">Full Name</label>
|
|||
|
|
<input type="text" id="su-name" name="name" class="input-ctrl" placeholder="Jane Doe" required autocomplete="name"/>
|
|||
</div>
|
||||
<div class="form-group">
|
||||
|
|
<label class="form-label" for="fld-username">Username</label>
|
|||
|
|
<input type="text" name="username" id="fld-username" class="input-ctrl" placeholder="janedoe" required pattern="^[a-zA-Z0-9_]{3,20}$" title="3–20 characters: letters, numbers, underscores" autocomplete="username"/>
|
|||
|
|
<div class="field-hint" id="hint-username">3–20 chars, letters/numbers/_</div>
|
|||
</div>
|
||||
|
|
</div>
|
|||
|
|
|
|||
<div class="form-group">
|
||||
<label class="form-label" for="su-email">Email Address</label>
|
||||
|
|
<input type="email" id="su-email" name="email" class="input-ctrl" placeholder="[email protected]" required autocomplete="email"/>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="form-label">Profile Image <span class="opt">(Optional)</span></label>
|
|||
|
|
<div class="file-upload-area" id="uploadArea">
|
|||
|
|
<input type="file" name="profile_image" accept="image/*" id="fileInput" onchange="handleFileSelect(this)"/>
|
|||
|
|
<div class="file-upload-icon">
|
|||
|
|
<svg fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|||
|
|
<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/>
|
|||
|
|
<polyline points="17 8 12 3 7 8"/>
|
|||
|
|
<line x1="12" y1="3" x2="12" y2="15"/>
|
|||
|
|
</svg>
|
|||
|
|
</div>
|
|||
|
|
<div class="file-upload-label" id="uploadLabel"><span>Click to upload</span> or drag & drop</div>
|
|||
|
|
<div class="file-upload-hint">PNG, JPG, GIF up to 5MB</div>
|
|||
</div>
|
||||
|
|
</div>
|
|||
|
|
|
|||
<div class="form-group">
|
||||
|
|
<label class="form-label" for="pwd1">Password</label>
|
|||
|
|
<div class="pwd-wrap">
|
|||
|
|
<input type="password" name="password" id="pwd1" class="input-ctrl" placeholder="Minimum 8 characters" required minlength="8" autocomplete="new-password" oninput="checkStrength(this.value)"/>
|
|||
|
|
<button type="button" class="pwd-toggle" onclick="togglePwd('pwd1')" 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-seg" id="s1"></div>
|
|||
|
|
<div class="strength-seg" id="s2"></div>
|
|||
|
|
<div class="strength-seg" id="s3"></div>
|
|||
|
|
<div class="strength-seg" id="s4"></div>
|
|||
|
|
<span class="slabel" id="slab"></span>
|
|||
</div>
|
||||
<div class="caps-warn"><i></i>Caps Lock is on</div>
|
||||
</div>
|
||||
|
|
|
|||
<div class="form-group">
|
||||
|
|
<label class="form-label" for="pwd2">Confirm Password</label>
|
|||
|
|
<div class="pwd-wrap">
|
|||
|
|
<input type="password" name="confirm_password" id="pwd2" class="input-ctrl" placeholder="••••••••" required minlength="8" autocomplete="new-password"/>
|
|||
|
|
<button type="button" class="pwd-toggle" onclick="togglePwd('pwd2')" 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="field-hint" id="hint-pwd2"></div>
|
||||
|
|
</div>
|
|||
|
||||
<button type="submit" class="btn-submit" id="submitBtn">Create Account</button>
|
||||
</form>
|
||||
|
|
|
|||
<p class="terms-note">By creating an account you agree to cryptographic isolation terms and private data sovereignty.</p>
|
||||
|
|
|
|||
|
|
<div class="auth-footer">
|
|||
|
|
Already have an account? <a href="/{{.Service}}/login">Sign In</a>
|
|||
</div>
|
||||
|
|
</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 * 2)) * 10;
|
|||
|
|
targetTiltX = -(dy / (rect.height * 2)) * 10;
|
|||
|
|
} 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 SIGNUP FORM LOGIC ══ */
|
|||
|
|
function togglePwd(id) {
|
|||
|
|
var el = document.getElementById(id);
|
|||
|
|
el.type = el.type === 'password' ? 'text' : 'password';
|
|||
|
|
var b = el.parentElement.querySelector('.pwd-toggle');
|
|||
|
|
if (b) b.classList.toggle('shown');
|
|||
}
|
||||
|
||||
function checkStrength(val) {
|
||||
|
|
var segs = [document.getElementById('s1'), document.getElementById('s2'), document.getElementById('s3'), document.getElementById('s4')];
|
|||
|
|
var lab = document.getElementById('slab');
|
|||
|
|
var colors = ['transparent', '#f87171', '#fbbf24', '#43e5a0', '#8fd9ff'];
|
|||
|
|
var names = ['', 'WEAK', 'FAIR', 'GOOD', 'STRONG'];
|
|||
|
|
var score = 0;
|
|||
|
|
if (val.length >= 8) score++;
|
|||
|
|
if (/[A-Z]/.test(val)) score++;
|
|||
|
|
if (/[0-9]/.test(val)) score++;
|
|||
|
|
if (/[^A-Za-z0-9]/.test(val)) score++;
|
|||
|
|
segs.forEach(function(s, i) {
|
|||
|
|
if(s) {
|
|||
|
|
s.style.background = i < score ? colors[score] : 'rgba(226,234,242,.1)';
|
|||
|
|
s.style.boxShadow = (i < score && score >= 3) ? '0 0 8px ' + colors[score] : 'none';
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
if (lab) lab.textContent = names[score];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function handleFileSelect(input) {
|
|||
|
|
var label = document.getElementById('uploadLabel');
|
|||
|
|
var area = document.getElementById('uploadArea');
|
|||
if (input.files && input.files[0]) {
|
||||
var f = input.files[0];
|
||||
|
|
label.innerHTML = '<span class="file-selected">✓ ' + f.name + ' · ' + (f.size / 1024).toFixed(0) + ' KB</span>';
|
|||
|
|
area.style.borderColor = 'rgba(143,216,255,.55)';
|
|||
}
|
||||
}
|
||||
|
||||
|
|
var area = document.getElementById('uploadArea');
|
|||
|
|
if(area){
|
|||
|
|
area.addEventListener('dragover', function(e) { e.preventDefault(); area.classList.add('dragover'); });
|
|||
|
|
area.addEventListener('dragleave', function() { area.classList.remove('dragover'); });
|
|||
|
|
area.addEventListener('drop', function(e) {
|
|||
|
|
e.preventDefault();
|
|||
|
|
area.classList.remove('dragover');
|
|||
|
|
var files = e.dataTransfer.files;
|
|||
|
|
if (files.length) {
|
|||
|
|
var fi = document.getElementById('fileInput');
|
|||
|
|
if(fi){
|
|||
|
|
fi.files = files;
|
|||
|
|
handleFileSelect(fi);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var pwd2Inp = document.getElementById('pwd2');
|
|||
|
|
if(pwd2Inp){
|
|||
|
|
pwd2Inp.addEventListener('input', function() {
|
|||
|
|
var hint = document.getElementById('hint-pwd2');
|
|||
|
|
var p1 = document.getElementById('pwd1') ? document.getElementById('pwd1').value : '';
|
|||
|
|
if (this.value && this.value !== p1) {
|
|||
|
|
hint.textContent = 'Passwords do not match';
|
|||
|
|
hint.className = 'field-hint error';
|
|||
|
|
} else {
|
|||
|
|
hint.textContent = '';
|
|||
|
|
hint.className = 'field-hint';
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
document.getElementById('signupForm').addEventListener('submit', function(e) {
|
|||
|
|
var p1 = document.getElementById('pwd1') ? document.getElementById('pwd1').value : '';
|
|||
|
|
var p2 = document.getElementById('pwd2') ? document.getElementById('pwd2').value : '';
|
|||
|
|
if (p1 !== p2) {
|
|||
|
|
e.preventDefault();
|
|||
|
|
var hint = document.getElementById('hint-pwd2');
|
|||
|
|
if(hint){
|
|||
|
|
hint.textContent = 'Passwords do not match';
|
|||
|
|
hint.className = 'field-hint error';
|
|||
|
|
}
|
|||
|
|
document.getElementById('pwd2').scrollIntoView({ behavior: 'smooth' });
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
var btn = document.getElementById('submitBtn');
|
|||
|
|
btn.textContent = 'Creating account…';
|
|||
|
|
btn.disabled = true;
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
/* live username format check */
|
|||
|
|
(function(){
|
|||
|
|
'use strict';
|
|||
|
|
var un = document.getElementById('fld-username'), uh = document.getElementById('hint-username');
|
|||
|
|
if(!un || !uh) return;
|
|||
|
|
un.addEventListener('input', function(){
|
|||
|
|
if(un.value === '' || /^[a-zA-Z0-9_]{3,20}$/.test(un.value)){
|
|||
|
|
uh.textContent = '3–20 chars, letters/numbers/_';
|
|||
|
|
uh.className = 'field-hint';
|
|||
|
|
} else {
|
|||
|
|
uh.textContent = 'Invalid format — letters, numbers, _ only';
|
|||
|
|
uh.className = 'field-hint error';
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
})();
|
|||
|
|
|
|||
|
|
/* Caps Lock detection */
|
|||
|
|
document.querySelectorAll('input[type=password]').forEach(function(inp){
|
|||
|
|
function checkCaps(e){
|
|||
|
|
var on = e.getModifierState && e.getModifierState('CapsLock');
|
|||
|
|
var group = inp.closest('.form-group');
|
|||
|
|
if(!group) return;
|
|||
|
|
var warn = group.querySelector('.caps-warn');
|
|||
|
|
if(warn) warn.classList.toggle('on', !!on);
|
|||
|
|
}
|
|||
|
|
inp.addEventListener('keyup', checkCaps);
|
|||
|
|
inp.addEventListener('keydown', checkCaps);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
/* 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>
|