432 lines
13 KiB
HTML
432 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<!--
|
|
Description: Login page for authenticating users before entering the MXPIC EDA workspace.
|
|
Inside functions: applyTheme
|
|
Developer : Qin Yue @ 2026
|
|
Organization : OptiHK Limited
|
|
-->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>mxPIC EDA - Login</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
:root {
|
|
--bg-main: #060b16;
|
|
--bg-panel: #0c1424;
|
|
--bg-card: #121b2d;
|
|
--bg-soft: #182237;
|
|
--text-main: #f6f8fb;
|
|
--text-muted: #91a0b5;
|
|
--accent: #6ee7ff;
|
|
--accent-strong: #7c3aed;
|
|
--accent-warm: #f97316;
|
|
--accent-red: #ef4444;
|
|
--border: #28364c;
|
|
--border-strong: #42516a;
|
|
--input-bg: #09111f;
|
|
--shadow: rgba(0, 0, 0, 0.42);
|
|
--error-text: #fecaca;
|
|
--error-bg: rgba(239, 68, 68, 0.14);
|
|
}
|
|
|
|
body.light-mode {
|
|
--bg-main: #edf3f8;
|
|
--bg-panel: #f8fbff;
|
|
--bg-card: #ffffff;
|
|
--bg-soft: #eef5fb;
|
|
--text-main: #132032;
|
|
--text-muted: #64758a;
|
|
--accent: #2563eb;
|
|
--accent-strong: #0f9f7a;
|
|
--accent-warm: #38bdf8;
|
|
--accent-red: #dc2626;
|
|
--border: #d5e0eb;
|
|
--border-strong: #b8c7d8;
|
|
--input-bg: #f5f8fb;
|
|
--shadow: rgba(37, 99, 235, 0.13);
|
|
--error-text: #b91c1c;
|
|
--error-bg: rgba(220, 38, 38, 0.08);
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
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;
|
|
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));
|
|
}
|
|
|
|
.theme-toggle {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 22px;
|
|
border: 1px solid var(--border);
|
|
background: rgba(18, 27, 45, 0.88);
|
|
color: var(--text-main);
|
|
border-radius: 8px;
|
|
height: 36px;
|
|
padding: 0 14px;
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
font-weight: 600;
|
|
box-shadow: 0 14px 34px var(--shadow);
|
|
backdrop-filter: blur(16px);
|
|
}
|
|
|
|
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-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);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
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-logo {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.brand-logo span {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.brand-mark {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 8px;
|
|
background:
|
|
linear-gradient(135deg, var(--accent), var(--accent-strong) 58%, var(--accent-warm));
|
|
position: relative;
|
|
box-shadow: 0 0 0 5px rgba(110, 231, 255, 0.09);
|
|
}
|
|
|
|
.brand-mark::before,
|
|
.brand-mark::after {
|
|
content: "";
|
|
position: absolute;
|
|
background: white;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.brand-mark::before {
|
|
left: 8px;
|
|
right: 8px;
|
|
top: 16px;
|
|
height: 2px;
|
|
}
|
|
|
|
.brand-mark::after {
|
|
top: 8px;
|
|
bottom: 8px;
|
|
left: 16px;
|
|
width: 2px;
|
|
}
|
|
|
|
.visual-copy h1 {
|
|
margin: 0 0 14px 0;
|
|
max-width: 430px;
|
|
font-size: clamp(2.1rem, 4vw, 3.25rem);
|
|
line-height: 1.02;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.visual-copy p {
|
|
max-width: 430px;
|
|
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 {
|
|
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;
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
|
}
|
|
|
|
.status-pill strong {
|
|
display: block;
|
|
color: var(--text-main);
|
|
font-size: 0.92rem;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.login-card {
|
|
background:
|
|
linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
|
|
var(--bg-card);
|
|
padding: 44px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.system-title {
|
|
color: var(--text-muted);
|
|
font-family: 'IBM Plex Mono', Consolas, monospace;
|
|
font-size: 0.74rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.04em;
|
|
text-transform: uppercase;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.login-card h2 {
|
|
margin: 0 0 30px 0;
|
|
font-size: 1.48rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
label {
|
|
font-size: 0.84rem;
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
}
|
|
|
|
input[type="text"],
|
|
input[type="password"] {
|
|
background-color: var(--input-bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text-main);
|
|
font-family: inherit;
|
|
font-size: 0.98rem;
|
|
padding: 13px 14px;
|
|
border-radius: 8px;
|
|
outline: none;
|
|
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
button[type="submit"] {
|
|
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);
|
|
}
|
|
|
|
button[type="submit"]:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
button[type="submit"]:active {
|
|
transform: scale(0.99);
|
|
}
|
|
|
|
.error-message {
|
|
background-color: var(--error-bg);
|
|
color: var(--error-text);
|
|
border: 1px solid rgba(239, 68, 68, 0.38);
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
font-size: 0.85rem;
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
.login-shell {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.login-visual {
|
|
display: none;
|
|
}
|
|
|
|
.theme-toggle {
|
|
position: static;
|
|
justify-self: end;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<button class="theme-toggle" id="theme-toggle" type="button">Bright Mode</button>
|
|
|
|
<main class="login-shell">
|
|
<section class="login-visual">
|
|
<div class="brand-logo">
|
|
<div class="brand-mark"></div>
|
|
opti<span>hk</span>
|
|
</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>
|
|
</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>
|
|
</section>
|
|
|
|
<section class="login-card">
|
|
<div class="system-title">mxPIC Core Access</div>
|
|
<h2>Sign in to your EDA workspace</h2>
|
|
|
|
<form action="/login" method="POST">
|
|
<div class="input-group">
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username" required autocomplete="username">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required autocomplete="current-password">
|
|
</div>
|
|
|
|
<button type="submit">Log In</button>
|
|
</form>
|
|
|
|
{% if error %}
|
|
<div class="error-message">
|
|
{{ error }}
|
|
</div>
|
|
{% endif %}
|
|
</section>
|
|
</main>
|
|
|
|
<script>
|
|
const themeToggle = document.getElementById('theme-toggle');
|
|
|
|
function applyTheme(mode) {
|
|
document.body.classList.toggle('light-mode', mode === 'light');
|
|
themeToggle.textContent = mode === 'light' ? 'Dark Mode' : 'Bright Mode';
|
|
localStorage.setItem('mxpic-theme', mode);
|
|
}
|
|
|
|
applyTheme(localStorage.getItem('mxpic-theme') || 'dark');
|
|
themeToggle.addEventListener('click', () => {
|
|
applyTheme(document.body.classList.contains('light-mode') ? 'dark' : 'light');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|