03c5dadccb
Run the real hel core in the browser via WebAssembly, replacing the plain-JS ooke.github.io/sk reimplementation so the web and the CLI share one generator. - hel core: new storage module (native fs / wasm localStorage) backs init/source/dump/correct; the pipe and pb branches are gated out of wasm; the wasm editor is completed (EditorRef) and its password prompt no longer blocks the single JS thread (synchronous hel_get_password instead of a thread::sleep poll). - helwasm: hel_load_script for bulk import, a panic hook in hel_init, dropped the ok_add / web-sys leftovers; build.sh runs wasm-bindgen into a committed pkg/ so GitHub Pages can serve the static dir with no CI. - UI: rewritten index.html + style.css in the kaizenkodo.org style — responsive, masked-but-copyable passwords with click-to-reveal, a quick-generate card plus a full command console, localStorage persistence, and paste import/export.
178 lines
7.2 KiB
CSS
178 lines
7.2 KiB
CSS
/* LesS/KEY web app — visual language mirrored from kaizenkodo.org
|
|
(~/Repos/Identity/website/main.css): washi-paper cream, ocean blue, hanko red,
|
|
Poppins / Inter / JetBrains Mono. Light, responsive, restrained. */
|
|
|
|
:root {
|
|
--cream: #f4f0e8;
|
|
--paper: #fbf8f2;
|
|
--ink: #15181b;
|
|
--muted: #6a675e;
|
|
--line: #ddd6c6;
|
|
--ocean: #1b4161;
|
|
--ocean-2: #2f6286;
|
|
--deep: #0a2540;
|
|
--seal: #e23b2e;
|
|
--disp: "Poppins", system-ui, sans-serif;
|
|
--body: "Inter", system-ui, sans-serif;
|
|
--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
|
|
--maxw: 880px;
|
|
--radius: 14px;
|
|
}
|
|
|
|
/* Masked-secret font: dots glyphs so the real chars stay selectable/copyable.
|
|
WebKit/Blink use -webkit-text-security; Firefox falls back to this font. */
|
|
@font-face {
|
|
font-family: "text-security-disc";
|
|
src: url("https://cdn.jsdelivr.net/npm/text-security/dist/text-security-disc.woff2") format("woff2"),
|
|
url("https://cdn.jsdelivr.net/npm/text-security/dist/text-security-disc.woff") format("woff");
|
|
font-display: swap;
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
html { height: 100%; }
|
|
|
|
body {
|
|
min-height: 100%;
|
|
font-family: var(--body);
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
color: var(--ink);
|
|
background-color: var(--cream);
|
|
background-image:
|
|
linear-gradient(rgba(27, 65, 97, 0.05) 1px, transparent 1px),
|
|
linear-gradient(90deg, rgba(27, 65, 97, 0.05) 1px, transparent 1px);
|
|
background-size: 48px 48px;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
|
|
|
|
/* Header */
|
|
.site {
|
|
position: sticky; top: 0; z-index: 50;
|
|
background: rgba(244, 240, 232, 0.82);
|
|
backdrop-filter: blur(12px);
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.nav { display: flex; align-items: center; gap: 14px; height: 64px; }
|
|
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
|
|
.enso {
|
|
width: 34px; height: 34px; border-radius: 50%;
|
|
border: 3px solid var(--ocean); border-right-color: transparent;
|
|
transform: rotate(-20deg);
|
|
}
|
|
.wordmark { font-family: var(--disp); font-weight: 700; font-size: 21px; color: var(--ocean); letter-spacing: -0.01em; }
|
|
.nav-spacer { flex: 1; }
|
|
.nav .ghost { font-family: var(--mono); font-size: 12px; }
|
|
|
|
/* Eyebrow label */
|
|
.eyebrow {
|
|
font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
|
|
text-transform: uppercase; color: var(--ocean);
|
|
display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px;
|
|
}
|
|
.eyebrow::before {
|
|
content: ""; width: 7px; height: 7px; border-radius: 50%;
|
|
background: var(--seal); box-shadow: 0 0 0 3px rgba(226, 59, 46, 0.16);
|
|
}
|
|
|
|
main { padding: 30px 0 64px; display: grid; gap: 22px; }
|
|
|
|
/* Cards */
|
|
.card {
|
|
background: var(--paper); border: 1px solid var(--line);
|
|
border-radius: var(--radius); padding: 22px;
|
|
}
|
|
.card h2 { font-family: var(--disp); font-weight: 600; font-size: clamp(20px, 3vw, 26px); color: var(--ink); margin-bottom: 4px; }
|
|
.card .hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
|
|
|
|
/* Form fields */
|
|
.field { display: flex; flex-direction: column; gap: 6px; }
|
|
.field label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
|
|
input[type="text"], input[type="password"] {
|
|
font-family: var(--mono); font-size: 15px; color: var(--ink);
|
|
background: #fff; border: 1px solid var(--line); border-radius: 10px;
|
|
padding: 11px 13px; width: 100%; outline: none;
|
|
transition: border-color .15s, box-shadow .15s;
|
|
}
|
|
input:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(27, 65, 97, 0.12); }
|
|
|
|
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
|
|
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
|
|
font-family: var(--disp); font-weight: 600; font-size: 14px;
|
|
background: var(--ocean); color: var(--cream);
|
|
border: 1px solid var(--ocean); border-radius: 999px; padding: 10px 20px;
|
|
transition: transform .15s, background .15s;
|
|
}
|
|
.btn:hover { transform: translateY(-1px); background: var(--deep); border-color: var(--deep); }
|
|
.btn.ghost { background: transparent; color: var(--ocean); }
|
|
.btn.ghost:hover { background: rgba(27, 65, 97, 0.06); color: var(--ocean); }
|
|
.btn:active { transform: none; }
|
|
|
|
/* Secret rendering: real text in the DOM, visually masked. Click toggles. */
|
|
.secret-line { margin-top: 16px; display: flex; align-items: baseline; gap: 12px; min-height: 28px; }
|
|
.secret-line .tag { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
|
|
.secret {
|
|
font-family: "text-security-disc", var(--mono);
|
|
-webkit-text-security: disc;
|
|
font-size: 19px; letter-spacing: 0.06em; color: var(--ink);
|
|
cursor: pointer; word-break: break-all; user-select: text;
|
|
border-bottom: 1px dashed var(--line);
|
|
}
|
|
.secret.revealed { font-family: var(--mono); -webkit-text-security: none; color: var(--ocean); }
|
|
.secret:empty::before { content: "—"; color: var(--muted); -webkit-text-security: none; }
|
|
|
|
/* Console */
|
|
.console-out {
|
|
font-family: var(--mono); font-size: 13.5px; line-height: 1.55;
|
|
background: #fff; border: 1px solid var(--line); border-radius: 10px;
|
|
padding: 14px; height: 320px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
|
|
}
|
|
.console-out .cmd { color: var(--ocean); font-weight: 500; }
|
|
.console-out .err { color: var(--seal); }
|
|
.console-out .muted { color: var(--muted); }
|
|
.console-out .secret { font-size: 13.5px; }
|
|
.console-in { display: flex; align-items: center; gap: 8px; margin-top: 10px;
|
|
background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; }
|
|
.console-in .prompt { font-family: var(--mono); color: var(--ocean); font-weight: 600; }
|
|
.console-in input { border: none; box-shadow: none; padding: 8px 0; background: transparent; }
|
|
.console-in input:focus { box-shadow: none; }
|
|
|
|
.toast {
|
|
position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
|
|
background: var(--deep); color: var(--cream); font-family: var(--mono); font-size: 13px;
|
|
padding: 10px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(10, 16, 24, 0.35);
|
|
opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80;
|
|
}
|
|
.toast.show { opacity: 1; }
|
|
|
|
/* Modal (import/export) */
|
|
.modal-bg {
|
|
position: fixed; inset: 0; background: rgba(10, 16, 24, 0.45);
|
|
display: none; align-items: center; justify-content: center; padding: 20px; z-index: 90;
|
|
}
|
|
.modal-bg.show { display: flex; }
|
|
.modal { background: var(--paper); border-radius: 16px; border: 1px solid var(--line);
|
|
width: 100%; max-width: 620px; padding: 22px; }
|
|
.modal h3 { font-family: var(--disp); font-weight: 600; margin-bottom: 10px; }
|
|
.modal textarea {
|
|
width: 100%; height: 240px; resize: vertical; font-family: var(--mono); font-size: 13px;
|
|
border: 1px solid var(--line); border-radius: 10px; padding: 12px; outline: none;
|
|
}
|
|
.modal textarea:focus { border-color: var(--ocean); }
|
|
|
|
.foot { color: var(--muted); font-family: var(--mono); font-size: 12px; text-align: center; padding: 8px 0 40px; }
|
|
.foot a { color: var(--ocean-2); }
|
|
|
|
@media (max-width: 620px) {
|
|
.grid2 { grid-template-columns: 1fr; }
|
|
.nav { gap: 8px; }
|
|
.console-out { height: 260px; }
|
|
body { font-size: 15px; }
|
|
}
|