Updated with more bug revise. The login page and dashboard is also changedd
This commit is contained in:
+412
-179
@@ -2,7 +2,7 @@
|
||||
|
||||
<!--
|
||||
Description: Login page for authenticating users before entering the MXPIC EDA workspace.
|
||||
Inside functions: applyTheme
|
||||
Inside functions: applyTheme, setSubmitState
|
||||
Developer : Qin Yue @ 2026
|
||||
Organization : OptiHK Limited
|
||||
-->
|
||||
@@ -15,68 +15,82 @@ Organization : OptiHK Limited
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--bg-main: #060b16;
|
||||
--bg-panel: #0c1424;
|
||||
--bg-card: #121b2d;
|
||||
--bg-soft: #182237;
|
||||
--bg-main: #06101d;
|
||||
--bg-panel: #0c1728;
|
||||
--bg-card: #111c2e;
|
||||
--bg-soft: #17243a;
|
||||
--text-main: #f6f8fb;
|
||||
--text-muted: #91a0b5;
|
||||
--accent: #6ee7ff;
|
||||
--accent-strong: #7c3aed;
|
||||
--accent-warm: #f97316;
|
||||
--text-muted: #97a6ba;
|
||||
--accent: #5dd8f3;
|
||||
--accent-strong: #2563eb;
|
||||
--accent-warm: #d97706;
|
||||
--accent-green: #34d399;
|
||||
--accent-red: #ef4444;
|
||||
--border: #28364c;
|
||||
--border-strong: #42516a;
|
||||
--input-bg: #09111f;
|
||||
--shadow: rgba(0, 0, 0, 0.42);
|
||||
--border: #2a394f;
|
||||
--border-strong: #496078;
|
||||
--input-bg: #091320;
|
||||
--shadow: rgba(0, 0, 0, 0.38);
|
||||
--error-text: #fecaca;
|
||||
--error-bg: rgba(239, 68, 68, 0.14);
|
||||
--focus-ring: rgba(93, 216, 243, 0.28);
|
||||
}
|
||||
|
||||
body.light-mode {
|
||||
--bg-main: #edf3f8;
|
||||
--bg-panel: #f8fbff;
|
||||
--bg-main: #f4f7fb;
|
||||
--bg-panel: #ffffff;
|
||||
--bg-card: #ffffff;
|
||||
--bg-soft: #eef5fb;
|
||||
--text-main: #132032;
|
||||
--text-muted: #64758a;
|
||||
--accent: #2563eb;
|
||||
--accent-strong: #0f9f7a;
|
||||
--accent-warm: #38bdf8;
|
||||
--bg-soft: #eef4fa;
|
||||
--text-main: #142235;
|
||||
--text-muted: #5f7085;
|
||||
--accent: #1d4ed8;
|
||||
--accent-strong: #0f766e;
|
||||
--accent-warm: #b45309;
|
||||
--accent-green: #15803d;
|
||||
--accent-red: #dc2626;
|
||||
--border: #d5e0eb;
|
||||
--border-strong: #b8c7d8;
|
||||
--input-bg: #f5f8fb;
|
||||
--shadow: rgba(37, 99, 235, 0.13);
|
||||
--error-text: #b91c1c;
|
||||
--border: #d6e0eb;
|
||||
--border-strong: #b6c4d4;
|
||||
--input-bg: #f8fafc;
|
||||
--shadow: rgba(37, 99, 235, 0.12);
|
||||
--error-text: #991b1b;
|
||||
--error-bg: rgba(220, 38, 38, 0.08);
|
||||
--focus-ring: rgba(29, 78, 216, 0.2);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
font-family: 'IBM Plex Sans', "Segoe UI", sans-serif;
|
||||
color: var(--text-main);
|
||||
background:
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
|
||||
radial-gradient(circle at 16% 12%, rgba(124, 58, 237, 0.25), transparent 28%),
|
||||
radial-gradient(circle at 84% 82%, rgba(249, 115, 22, 0.16), transparent 26%),
|
||||
linear-gradient(135deg, var(--bg-main), #0a1222 55%, #171923);
|
||||
background-size: 42px 42px, 42px 42px, auto, auto, auto;
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
|
||||
linear-gradient(135deg, var(--bg-main), #091526 62%, #0d1724);
|
||||
background-size: 48px 48px, 48px 48px, auto;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 28px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body.light-mode {
|
||||
background:
|
||||
linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
|
||||
radial-gradient(circle at 16% 12%, rgba(56, 189, 248, 0.18), transparent 28%),
|
||||
radial-gradient(circle at 84% 82%, rgba(34, 197, 94, 0.13), transparent 24%),
|
||||
linear-gradient(135deg, #f9fbfd, var(--bg-main));
|
||||
linear-gradient(90deg, rgba(29, 78, 216, 0.04) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(29, 78, 216, 0.04) 1px, transparent 1px),
|
||||
linear-gradient(135deg, #f8fbff, var(--bg-main));
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
button:focus-visible,
|
||||
input:focus-visible {
|
||||
outline: 3px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
@@ -84,110 +98,90 @@ Organization : OptiHK Limited
|
||||
top: 20px;
|
||||
right: 22px;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(18, 27, 45, 0.88);
|
||||
background: rgba(12, 23, 40, 0.86);
|
||||
color: var(--text-main);
|
||||
border-radius: 8px;
|
||||
min-width: 92px;
|
||||
height: 36px;
|
||||
padding: 0 14px;
|
||||
padding: 0 12px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 14px 34px var(--shadow);
|
||||
backdrop-filter: blur(16px);
|
||||
font-weight: 700;
|
||||
box-shadow: 0 12px 28px var(--shadow);
|
||||
backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
body.light-mode .theme-toggle {
|
||||
background: rgba(255, 255, 255, 0.86);
|
||||
}
|
||||
|
||||
.login-shell {
|
||||
width: min(980px, 100%);
|
||||
min-height: 560px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 400px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: rgba(12, 20, 36, 0.84);
|
||||
box-shadow: 0 32px 96px var(--shadow);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
body.light-mode .login-shell {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.login-shell {
|
||||
width: min(1040px, 100%);
|
||||
min-height: 590px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 410px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: rgba(12, 23, 40, 0.88);
|
||||
box-shadow: 0 30px 80px var(--shadow);
|
||||
}
|
||||
|
||||
body.light-mode .login-shell {
|
||||
background: rgba(255, 255, 255, 0.94);
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
padding: 44px;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(110, 231, 255, 0.1), transparent 35%),
|
||||
linear-gradient(315deg, rgba(124, 58, 237, 0.16), transparent 42%),
|
||||
var(--bg-panel);
|
||||
padding: 38px;
|
||||
background: var(--bg-panel);
|
||||
border-right: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 28px;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-visual::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 92px 48px auto auto;
|
||||
width: 190px;
|
||||
height: 190px;
|
||||
border: 1px solid rgba(110, 231, 255, 0.2);
|
||||
border-radius: 50%;
|
||||
box-shadow:
|
||||
0 0 0 22px rgba(110, 231, 255, 0.025),
|
||||
inset 0 0 0 28px rgba(249, 115, 22, 0.045);
|
||||
}
|
||||
|
||||
.login-visual::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: auto 44px 130px auto;
|
||||
width: 260px;
|
||||
height: 1px;
|
||||
background: linear-gradient(90deg, transparent, var(--accent), transparent);
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.login-visual > * {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
.brand-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-size: 1.25rem;
|
||||
font-size: 1.02rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.brand-logo span {
|
||||
.brand-logo .company-hk {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.company-wordmark {
|
||||
display: inline-flex;
|
||||
gap: 0;
|
||||
white-space: nowrap;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 8px;
|
||||
background:
|
||||
linear-gradient(135deg, var(--accent), var(--accent-strong) 58%, var(--accent-warm));
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-strong) 62%, var(--accent-warm));
|
||||
position: relative;
|
||||
box-shadow: 0 0 0 5px rgba(110, 231, 255, 0.09);
|
||||
box-shadow: 0 0 0 5px rgba(93, 216, 243, 0.08);
|
||||
}
|
||||
|
||||
.brand-mark::before,
|
||||
.brand-mark::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background: white;
|
||||
opacity: 0.9;
|
||||
background: #ffffff;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.brand-mark::before {
|
||||
@@ -204,71 +198,241 @@ Organization : OptiHK Limited
|
||||
width: 2px;
|
||||
}
|
||||
|
||||
.product-kicker {
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.76rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.visual-copy h1 {
|
||||
margin: 0 0 14px 0;
|
||||
max-width: 430px;
|
||||
font-size: clamp(2.1rem, 4vw, 3.25rem);
|
||||
max-width: 520px;
|
||||
font-size: clamp(2.25rem, 4.4vw, 3.7rem);
|
||||
line-height: 1.02;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.visual-copy p {
|
||||
max-width: 430px;
|
||||
max-width: 520px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.65;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.status-strip {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
.eda-preview {
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(18, 27, 45, 0.72);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.78rem;
|
||||
overflow: hidden;
|
||||
background: var(--bg-card);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
.status-pill strong {
|
||||
.eda-preview img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.preview-bar {
|
||||
height: 36px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 12px;
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.preview-status {
|
||||
color: var(--accent-green);
|
||||
}
|
||||
|
||||
.preview-workspace {
|
||||
display: grid;
|
||||
grid-template-columns: 150px minmax(0, 1fr);
|
||||
min-height: 260px;
|
||||
}
|
||||
|
||||
.preview-sidebar {
|
||||
border-right: 1px solid var(--border);
|
||||
background: var(--input-bg);
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.tree-label {
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.tree-row {
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--text-main);
|
||||
font-size: 0.92rem;
|
||||
margin-bottom: 2px;
|
||||
border-radius: 6px;
|
||||
padding: 0 8px;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.tree-row.muted {
|
||||
color: var(--text-muted);
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
.tree-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 99px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.cell-chip {
|
||||
margin-top: 12px;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.cell-chip span {
|
||||
display: block;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 8px 9px;
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.68rem;
|
||||
background: var(--bg-soft);
|
||||
}
|
||||
|
||||
.preview-canvas {
|
||||
position: relative;
|
||||
min-height: 260px;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
|
||||
var(--bg-card);
|
||||
background-size: 28px 28px;
|
||||
}
|
||||
|
||||
body.light-mode .preview-canvas {
|
||||
background:
|
||||
linear-gradient(90deg, rgba(29, 78, 216, 0.05) 1px, transparent 1px),
|
||||
linear-gradient(0deg, rgba(29, 78, 216, 0.05) 1px, transparent 1px),
|
||||
var(--bg-card);
|
||||
background-size: 28px 28px;
|
||||
}
|
||||
|
||||
.node {
|
||||
position: absolute;
|
||||
width: 94px;
|
||||
height: 44px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(180deg, var(--bg-soft), var(--bg-card));
|
||||
color: var(--text-main);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.68rem;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 14px 28px var(--shadow);
|
||||
}
|
||||
|
||||
.node.a {
|
||||
left: 42px;
|
||||
top: 52px;
|
||||
}
|
||||
|
||||
.node.b {
|
||||
right: 46px;
|
||||
top: 52px;
|
||||
}
|
||||
|
||||
.node.c {
|
||||
left: 50%;
|
||||
top: 154px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.route {
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
background: var(--accent);
|
||||
box-shadow: 0 0 12px rgba(93, 216, 243, 0.45);
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.route.one {
|
||||
width: 124px;
|
||||
left: 132px;
|
||||
top: 74px;
|
||||
}
|
||||
|
||||
.route.two {
|
||||
width: 102px;
|
||||
left: 122px;
|
||||
top: 144px;
|
||||
transform: rotate(34deg);
|
||||
}
|
||||
|
||||
.route.three {
|
||||
width: 102px;
|
||||
right: 118px;
|
||||
top: 144px;
|
||||
transform: rotate(-34deg);
|
||||
}
|
||||
|
||||
.login-card {
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.032), transparent),
|
||||
var(--bg-card);
|
||||
padding: 44px;
|
||||
padding: 42px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mobile-product {
|
||||
display: none;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.system-title {
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.74rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.login-card h2 {
|
||||
margin: 0 0 30px 0;
|
||||
font-size: 1.48rem;
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.login-card .form-note {
|
||||
color: var(--text-muted);
|
||||
line-height: 1.5;
|
||||
margin: 0 0 28px;
|
||||
font-size: 0.94rem;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -284,149 +448,218 @@ Organization : OptiHK Limited
|
||||
label {
|
||||
font-size: 0.84rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.password-row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
min-height: 46px;
|
||||
background-color: var(--input-bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-main);
|
||||
font-family: inherit;
|
||||
font-size: 0.98rem;
|
||||
padding: 13px 14px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 8px;
|
||||
outline: none;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
|
||||
.password-row input {
|
||||
padding-right: 70px;
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
border-color: var(--accent);
|
||||
background: var(--bg-panel);
|
||||
box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.15);
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
}
|
||||
|
||||
button[type="submit"] {
|
||||
.password-toggle {
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
top: 7px;
|
||||
height: 32px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
background: var(--bg-soft);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
min-height: 46px;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
|
||||
color: #04101f;
|
||||
font-family: inherit;
|
||||
font-size: 0.98rem;
|
||||
font-weight: 700;
|
||||
padding: 13px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.1s ease, box-shadow 0.2s ease;
|
||||
margin-top: 8px;
|
||||
box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
|
||||
transition: transform 0.1s ease, box-shadow 0.2s ease, opacity 0.2s ease;
|
||||
margin-top: 4px;
|
||||
box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
|
||||
}
|
||||
|
||||
button[type="submit"]:hover {
|
||||
.submit-btn:hover:not(:disabled) {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
button[type="submit"]:active {
|
||||
.submit-btn:active:not(:disabled) {
|
||||
transform: scale(0.99);
|
||||
}
|
||||
|
||||
.submit-btn:disabled {
|
||||
cursor: wait;
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background-color: var(--error-bg);
|
||||
color: var(--error-text);
|
||||
border: 1px solid rgba(239, 68, 68, 0.38);
|
||||
padding: 12px;
|
||||
border: 1px solid rgba(239, 68, 68, 0.42);
|
||||
padding: 11px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 0.86rem;
|
||||
line-height: 1.45;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
@media (max-width: 860px) {
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: static;
|
||||
align-self: flex-end;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.login-shell {
|
||||
grid-template-columns: 1fr;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: static;
|
||||
justify-self: end;
|
||||
margin-bottom: 16px;
|
||||
.mobile-product {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
.login-card {
|
||||
padding: 30px 22px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button class="theme-toggle" id="theme-toggle" type="button">Bright Mode</button>
|
||||
<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Switch color theme">Light mode</button>
|
||||
|
||||
<main class="login-shell">
|
||||
<section class="login-visual">
|
||||
<div class="brand-logo">
|
||||
<div class="brand-mark"></div>
|
||||
opti<span>hk</span>
|
||||
<section class="login-visual" aria-label="mxPIC EDA workspace preview">
|
||||
<div class="brand-row">
|
||||
<div class="brand-logo">
|
||||
<div class="brand-mark" aria-hidden="true"></div>
|
||||
MxPic - by <span class="company-wordmark">Opti<span class="company-hk">HK</span></span>
|
||||
</div>
|
||||
<div class="product-kicker">EDA platform</div>
|
||||
</div>
|
||||
|
||||
<div class="visual-copy">
|
||||
<h1>Photonic EDA workspace for reusable PIC cells.</h1>
|
||||
<p>Build hierarchical canvases from PDK components, inspect ports and parameters, and prepare structured layout definitions for mxPIC generation.</p>
|
||||
<h1>MxPIC</h1>
|
||||
<p>A end-to-end EDA solution for photonic integrated</p>
|
||||
</div>
|
||||
|
||||
<div class="status-strip">
|
||||
<div class="status-pill"><strong>PDK</strong>Silterra ready</div>
|
||||
<div class="status-pill"><strong>Cells</strong>Hierarchical</div>
|
||||
<div class="status-pill"><strong>Flow</strong>Canvas to GDS</div>
|
||||
<div class="eda-preview">
|
||||
<img src="/frontend/assets/pic-mzm-directional-couplers.png" alt="2D render of a photonic integrated circuit with MZM arms and directional couplers">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="login-card">
|
||||
<div class="system-title">mxPIC Core Access</div>
|
||||
<h2>Sign in to your EDA workspace</h2>
|
||||
<div class="mobile-product">
|
||||
<div class="brand-logo">
|
||||
<div class="brand-mark" aria-hidden="true"></div>
|
||||
MxPic - by <span class="company-wordmark">Opti<span class="company-hk">HK</span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="/login" method="POST">
|
||||
<div class="system-title">Access</div>
|
||||
<h2>Sign in</h2>
|
||||
|
||||
{% if error %}
|
||||
<div class="error-message" role="alert">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="/login" method="POST" id="login-form">
|
||||
<div class="input-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" required autocomplete="username">
|
||||
<input type="text" id="username" name="username" required autocomplete="username" autofocus>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password">
|
||||
<div class="password-row">
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password">
|
||||
<button class="password-toggle" id="password-toggle" type="button" aria-label="Show password">Show</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit">Log In</button>
|
||||
<button class="submit-btn" id="submit-btn" type="submit">Log in</button>
|
||||
</form>
|
||||
|
||||
{% if error %}
|
||||
<div class="error-message">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
const themeToggle = document.getElementById('theme-toggle');
|
||||
const passwordInput = document.getElementById('password');
|
||||
const passwordToggle = document.getElementById('password-toggle');
|
||||
const loginForm = document.getElementById('login-form');
|
||||
const submitButton = document.getElementById('submit-btn');
|
||||
|
||||
// Apply the selected login-page theme class and persist it for the next visit.
|
||||
function applyTheme(mode) {
|
||||
document.body.classList.toggle('light-mode', mode === 'light');
|
||||
themeToggle.textContent = mode === 'light' ? 'Dark Mode' : 'Bright Mode';
|
||||
const isLight = mode === 'light';
|
||||
document.body.classList.toggle('light-mode', isLight);
|
||||
themeToggle.textContent = isLight ? 'Dark mode' : 'Light mode';
|
||||
localStorage.setItem('mxpic-theme', mode);
|
||||
}
|
||||
|
||||
function setSubmitState() {
|
||||
submitButton.disabled = true;
|
||||
submitButton.textContent = 'Signing in...';
|
||||
}
|
||||
|
||||
applyTheme(localStorage.getItem('mxpic-theme') || 'dark');
|
||||
|
||||
themeToggle.addEventListener('click', () => {
|
||||
applyTheme(document.body.classList.contains('light-mode') ? 'dark' : 'light');
|
||||
});
|
||||
|
||||
passwordToggle.addEventListener('click', () => {
|
||||
const showPassword = passwordInput.type === 'password';
|
||||
passwordInput.type = showPassword ? 'text' : 'password';
|
||||
passwordToggle.textContent = showPassword ? 'Hide' : 'Show';
|
||||
passwordToggle.setAttribute('aria-label', showPassword ? 'Hide password' : 'Show password');
|
||||
});
|
||||
|
||||
loginForm.addEventListener('submit', setSubmitState);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user