686 lines
20 KiB
HTML
686 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<!--
|
|
Description: Login page for authenticating users before entering the MXPIC EDA workspace.
|
|
Inside functions: setSubmitState
|
|
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: #06101d;
|
|
--bg-panel: #0c1728;
|
|
--bg-card: #111c2e;
|
|
--bg-soft: #17243a;
|
|
--text-main: #f6f8fb;
|
|
--text-muted: #97a6ba;
|
|
--accent: #5dd8f3;
|
|
--accent-strong: #2563eb;
|
|
--accent-warm: #d97706;
|
|
--accent-green: #34d399;
|
|
--accent-red: #ef4444;
|
|
--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);
|
|
}
|
|
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100dvh;
|
|
font-family: 'IBM Plex Sans', "Segoe UI", sans-serif;
|
|
color: var(--text-main);
|
|
background-color: var(--bg-main);
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
position: relative;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 28px;
|
|
}
|
|
|
|
body::after {
|
|
content: '';
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: -1;
|
|
background:
|
|
linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px),
|
|
linear-gradient(0deg, rgba(255,255,255,0.026) 1px, transparent 1px);
|
|
background-size: 48px 48px;
|
|
}
|
|
|
|
|
|
body.bg-morning { background-image: url('/pic/morning.webp'); }
|
|
body.bg-noon { background-image: url('/pic/noon.webp'); }
|
|
body.bg-sunset { background-image: url('/pic/sunset.webp'); }
|
|
body.bg-night { background-image: url('/pic/night.webp'); }
|
|
|
|
button,
|
|
input {
|
|
font: inherit;
|
|
}
|
|
|
|
button:focus-visible,
|
|
input:focus-visible {
|
|
outline: 3px solid var(--focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.login-shell {
|
|
width: min(1040px, 100%);
|
|
min-height: 590px;
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) 410px;
|
|
border: 1px solid rgba(42, 57, 79, 0.5);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: rgba(12, 23, 40, 0.34);
|
|
backdrop-filter: blur(24px);
|
|
-webkit-backdrop-filter: blur(24px);
|
|
box-shadow: 0 30px 80px var(--shadow);
|
|
}
|
|
|
|
|
|
.login-visual {
|
|
padding: 38px;
|
|
background: rgba(12, 23, 40, 0.22);
|
|
border-right: 1px solid rgba(42, 57, 79, 0.4);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 28px;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.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.02rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.brand-logo .company-hk {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.company-wordmark {
|
|
display: inline-flex;
|
|
gap: 0;
|
|
white-space: nowrap;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.brand-mark {
|
|
width: 34px;
|
|
height: 34px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-strong) 62%, var(--accent-warm));
|
|
position: relative;
|
|
box-shadow: 0 0 0 5px rgba(93, 216, 243, 0.08);
|
|
}
|
|
|
|
.brand-mark::before,
|
|
.brand-mark::after {
|
|
content: "";
|
|
position: absolute;
|
|
background: #ffffff;
|
|
opacity: 0.92;
|
|
}
|
|
|
|
.brand-mark::before {
|
|
left: 8px;
|
|
right: 8px;
|
|
top: 16px;
|
|
height: 2px;
|
|
}
|
|
|
|
.brand-mark::after {
|
|
top: 8px;
|
|
bottom: 8px;
|
|
left: 16px;
|
|
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: 520px;
|
|
font-size: clamp(2.25rem, 4.4vw, 3.7rem);
|
|
line-height: 1.02;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.visual-copy p {
|
|
max-width: 520px;
|
|
color: var(--text-muted);
|
|
line-height: 1.65;
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.eda-preview {
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: rgba(17, 28, 46, 0.30);
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
|
|
aspect-ratio: 16 / 9;
|
|
}
|
|
|
|
.eda-preview img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.preview-bar {
|
|
height: 36px;
|
|
border-bottom: 1px solid rgba(42, 57, 79, 0.4);
|
|
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 rgba(42, 57, 79, 0.4);
|
|
background: rgba(9, 19, 32, 0.22);
|
|
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);
|
|
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: rgba(23, 36, 58, 0.27);
|
|
}
|
|
|
|
.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),
|
|
rgba(17, 28, 46, 0.22);
|
|
background-size: 28px 28px;
|
|
}
|
|
|
|
|
|
.node {
|
|
position: absolute;
|
|
width: 94px;
|
|
height: 44px;
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: 8px;
|
|
background: linear-gradient(180deg, rgba(23, 36, 58, 0.37), rgba(17, 28, 46, 0.30));
|
|
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: rgba(17, 28, 46, 0.23);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
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: 700;
|
|
letter-spacing: 0.05em;
|
|
text-transform: uppercase;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.login-card h2 {
|
|
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;
|
|
gap: 18px;
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
label {
|
|
font-size: 0.84rem;
|
|
color: var(--text-muted);
|
|
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-size: 0.98rem;
|
|
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 var(--focus-ring);
|
|
}
|
|
|
|
.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-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, opacity 0.2s ease;
|
|
margin-top: 4px;
|
|
box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
|
|
}
|
|
|
|
.submit-btn:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.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.42);
|
|
padding: 11px 12px;
|
|
border-radius: 8px;
|
|
font-size: 0.86rem;
|
|
line-height: 1.45;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.dash-clock {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 10;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.digital-time {
|
|
font-size: clamp(2.6rem, 5vw, 4.2rem);
|
|
font-weight: 200;
|
|
letter-spacing: 0.06em;
|
|
color: #f0f0f8;
|
|
text-shadow: 0 0 40px rgba(93, 216, 243, 0.25), 0 0 80px rgba(93, 216, 243, 0.1);
|
|
font-variant-numeric: tabular-nums;
|
|
font-family: 'IBM Plex Mono', Consolas, monospace;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.digital-time .seconds {
|
|
color: #5dd8f3;
|
|
font-weight: 300;
|
|
animation: pulse-sec 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse-sec {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.48; }
|
|
}
|
|
|
|
.dash-time {
|
|
font-size: 0.95rem;
|
|
color: rgba(200, 200, 220, 0.6);
|
|
letter-spacing: 0.15em;
|
|
font-weight: 300;
|
|
text-align: center;
|
|
}
|
|
|
|
@media (max-width: 860px) {
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
justify-content: center;
|
|
padding: 18px;
|
|
}
|
|
|
|
.login-shell {
|
|
grid-template-columns: 1fr;
|
|
min-height: auto;
|
|
}
|
|
|
|
.login-visual {
|
|
display: none;
|
|
}
|
|
|
|
.mobile-product {
|
|
display: block;
|
|
}
|
|
|
|
.login-card {
|
|
padding: 30px 22px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
(function(){var h=new Date().getHours();document.body.classList.add(h>=5&&h<12?'bg-morning':h>=12&&h<17?'bg-noon':h>=17&&h<19?'bg-sunset':'bg-night');})();
|
|
</script>
|
|
<main class="login-shell">
|
|
<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>MxPIC</h1>
|
|
<p>A end-to-end EDA solution for photonic integrated</p>
|
|
</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="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>
|
|
|
|
<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" autofocus>
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label for="password">Password</label>
|
|
<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 class="submit-btn" id="submit-btn" type="submit">Log In</button>
|
|
</form>
|
|
</section>
|
|
</main>
|
|
|
|
<div class="dash-clock" id="dash-clock">
|
|
<div class="digital-time" id="digitalTime">00:00:<span class="seconds">00</span></div>
|
|
<div class="dash-time" id="dateLabel"></div>
|
|
</div>
|
|
|
|
<script>
|
|
(function() {
|
|
var timeEl = document.getElementById('digitalTime');
|
|
var dateEl = document.getElementById('dateLabel');
|
|
var body = document.body;
|
|
var bgList = ['bg-morning', 'bg-noon', 'bg-sunset', 'bg-night'];
|
|
var currentBg = bgList.indexOf(body.className.match(/bg-\w+/)?.[0]) || 0;
|
|
var weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
|
|
function update() {
|
|
var now = new Date();
|
|
var hh = String(now.getHours()).padStart(2, '0');
|
|
var mm = String(now.getMinutes()).padStart(2, '0');
|
|
var ss = String(now.getSeconds()).padStart(2, '0');
|
|
timeEl.innerHTML = hh + ':' + mm + ':<span class="seconds">' + ss + '</span>';
|
|
dateEl.textContent = weekdays[now.getDay()] + ', ' + months[now.getMonth()] + ' ' + now.getDate() + ', ' + now.getFullYear();
|
|
}
|
|
|
|
timeEl.addEventListener('click', function() {
|
|
currentBg = (currentBg + 1) % bgList.length;
|
|
bgList.forEach(function(c) { body.classList.remove(c); });
|
|
body.classList.add(bgList[currentBg]);
|
|
});
|
|
|
|
update();
|
|
setInterval(update, 1000);
|
|
})();
|
|
</script>
|
|
<script>
|
|
const passwordInput = document.getElementById('password');
|
|
const passwordToggle = document.getElementById('password-toggle');
|
|
const loginForm = document.getElementById('login-form');
|
|
const submitButton = document.getElementById('submit-btn');
|
|
|
|
function setSubmitState() {
|
|
submitButton.disabled = true;
|
|
submitButton.textContent = 'Signing in...';
|
|
}
|
|
|
|
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>
|