dashboard.html/login.html updated
@@ -12,7 +12,7 @@ Organization : OptiHK Limited
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>mxPIC EDA Dashboard</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">
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&family=Varela+Round&family=Inter:wght@400;500&display=swap" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
@@ -42,12 +42,12 @@ Organization : OptiHK Limited
|
||||
--bg-panel: #eef4fa;
|
||||
--text-main: #142235;
|
||||
--text-muted: #5f7085;
|
||||
--accent: #1d4ed8;
|
||||
--accent-hover: #0f766e;
|
||||
--accent: #3b82f6;
|
||||
--accent-hover: #06b6d4;
|
||||
--accent-green: #15803d;
|
||||
--accent-warm: #b45309;
|
||||
--border: #d6e0eb;
|
||||
--border-strong: #b6c4d4;
|
||||
--border: #b8c5d4;
|
||||
--border-strong: #8fa2b8;
|
||||
--panel-soft: #f8fafc;
|
||||
--folder-icon: #38bdf8;
|
||||
--shadow: rgba(37, 99, 235, 0.1);
|
||||
@@ -173,7 +173,6 @@ Organization : OptiHK Limited
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.theme-toggle,
|
||||
.logout-btn,
|
||||
.secondary-btn,
|
||||
.profile-action,
|
||||
@@ -196,7 +195,80 @@ Organization : OptiHK Limited
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
min-width: 92px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 78px;
|
||||
height: 34px;
|
||||
padding: 0 7px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
background: var(--panel-soft);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.theme-toggle .toggle-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 21px;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
transition: color 180ms ease, text-shadow 180ms ease;
|
||||
color: var(--text-muted);
|
||||
line-height: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.theme-toggle-thumb {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: calc(50% - 3px);
|
||||
height: calc(100% - 4px);
|
||||
border-radius: 999px;
|
||||
background: var(--accent);
|
||||
transition: left 280ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
z-index: 0;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
|
||||
pointer-events: none;
|
||||
}
|
||||
.theme-toggle[data-theme="dark"] .theme-toggle-thumb {
|
||||
left: calc(50% + 1px);
|
||||
}
|
||||
.theme-toggle[data-theme="bright"] .theme-toggle-thumb {
|
||||
left: 2px;
|
||||
}
|
||||
.theme-toggle[data-theme="dark"] .toggle-moon {
|
||||
color: #ffffff;
|
||||
text-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
|
||||
}
|
||||
.theme-toggle[data-theme="bright"] .toggle-sun {
|
||||
color: #ffffff;
|
||||
text-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
|
||||
}
|
||||
.back-btn {
|
||||
border: 1px solid var(--border);
|
||||
background: var(--panel-soft);
|
||||
color: var(--text-muted);
|
||||
border-radius: 8px;
|
||||
min-height: 36px;
|
||||
padding: 0 12px;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
font-size: 0.85rem;
|
||||
transition: border-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
.back-btn:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.logout-btn:hover,
|
||||
@@ -209,9 +281,9 @@ Organization : OptiHK Limited
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1320px;
|
||||
max-width: 1550px;
|
||||
margin: 0 auto;
|
||||
padding: 34px 16px 30px;
|
||||
padding: 34px 8px 30px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
@@ -291,7 +363,7 @@ Organization : OptiHK Limited
|
||||
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 300px;
|
||||
grid-template-columns: minmax(0, 1fr) 420px;
|
||||
gap: 18px;
|
||||
align-items: start;
|
||||
}
|
||||
@@ -318,11 +390,91 @@ Organization : OptiHK Limited
|
||||
.panel-title {
|
||||
margin: 0;
|
||||
font-size: 0.86rem;
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-family: 'Varela Round', sans-serif;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: #ffffff;
|
||||
}
|
||||
body.light-mode .panel-title {
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.expand-btn {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: var(--panel-soft);
|
||||
color: var(--text-muted);
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.expand-btn:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.panel.activity-expanded {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: min(68vw, 860px);
|
||||
max-height: 72vh;
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
|
||||
var(--bg-elevated);
|
||||
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.activity-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 100;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
backdrop-filter: blur(4px);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.activity-backdrop.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body.light-mode .activity-backdrop {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.panel.activity-expanded .panel-body {
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.panel.activity-expanded .activity-list {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.panel.activity-expanded .expand-btn {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
background: rgba(45, 212, 191, 0.1);
|
||||
}
|
||||
|
||||
body.light-mode .panel.activity-expanded {
|
||||
background:
|
||||
linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent),
|
||||
var(--bg-elevated);
|
||||
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
@@ -420,6 +572,55 @@ Organization : OptiHK Limited
|
||||
font-size: 0.8rem;
|
||||
margin-top: 2px;
|
||||
}
|
||||
body.light-mode .project-subtitle {
|
||||
}
|
||||
|
||||
.edit-project-btn {
|
||||
display: none;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 5px;
|
||||
background: var(--panel-soft);
|
||||
color: var(--text-muted);
|
||||
font-size: 0.95rem;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
transition: border-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.project-card:hover .edit-project-btn {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.edit-project-btn:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.project-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.project-name-input-inline {
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
color: var(--text-main);
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--accent);
|
||||
border-radius: 4px;
|
||||
padding: 2px 6px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.project-chips {
|
||||
display: flex;
|
||||
@@ -505,7 +706,7 @@ Organization : OptiHK Limited
|
||||
|
||||
.profile-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
@@ -567,6 +768,7 @@ Organization : OptiHK Limited
|
||||
|
||||
.activity-message {
|
||||
color: var(--text-main);
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.42;
|
||||
overflow-wrap: anywhere;
|
||||
@@ -727,7 +929,7 @@ Organization : OptiHK Limited
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 26px 16px 24px;
|
||||
padding: 26px 8px 24px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
@@ -766,14 +968,18 @@ Organization : OptiHK Limited
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body class="light-mode">
|
||||
<header>
|
||||
<div class="brand">
|
||||
<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="header-actions">
|
||||
<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Switch color theme">Light mode</button>
|
||||
<button class="theme-toggle" id="theme-toggle" type="button" data-theme="bright" aria-label="Toggle color mode" title="Toggle dark/light mode">
|
||||
<span class="theme-toggle-thumb"></span>
|
||||
<span class="toggle-icon toggle-sun">☼</span>
|
||||
<span class="toggle-icon toggle-moon">☾</span>
|
||||
</button>
|
||||
<a href="/logout" class="logout-btn">Logout</a>
|
||||
</div>
|
||||
</header>
|
||||
@@ -845,6 +1051,7 @@ Organization : OptiHK Limited
|
||||
<section class="panel">
|
||||
<div class="panel-header">
|
||||
<h2 class="panel-title">Recent Activity</h2>
|
||||
<button class="expand-btn" id="expand-activity" type="button" title="Expand" aria-label="Expand activity panel">↖</button>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="activity-list" id="activity-list" aria-live="polite">
|
||||
@@ -856,6 +1063,7 @@ Organization : OptiHK Limited
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
<div class="activity-backdrop" id="activity-backdrop" aria-hidden="true"></div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
@@ -949,7 +1157,7 @@ Organization : OptiHK Limited
|
||||
function applyTheme(mode) {
|
||||
const isLight = mode === 'light';
|
||||
document.body.classList.toggle('light-mode', isLight);
|
||||
themeToggle.textContent = isLight ? 'Dark mode' : 'Light mode';
|
||||
themeToggle.setAttribute('data-theme', isLight ? 'bright' : 'dark');
|
||||
localStorage.setItem('mxpic-theme', mode);
|
||||
}
|
||||
|
||||
@@ -1046,6 +1254,63 @@ Organization : OptiHK Limited
|
||||
window.location.href = `/canvas?project=${encodeURIComponent(name)}`;
|
||||
}
|
||||
|
||||
function startRenameProject(oldName, nameRow, editBtn) {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'text';
|
||||
input.className = 'project-name-input-inline';
|
||||
input.value = oldName;
|
||||
input.spellcheck = false;
|
||||
|
||||
const currentSpan = nameRow.querySelector('.project-name');
|
||||
if (currentSpan) currentSpan.replaceWith(input);
|
||||
editBtn.style.display = 'none';
|
||||
input.focus();
|
||||
input.select();
|
||||
|
||||
const finishRename = async () => {
|
||||
if (!input.parentNode) return;
|
||||
const newName = input.value.trim();
|
||||
if (!newName || newName === oldName) {
|
||||
cancelRename();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const response = await fetch(`/api/projects/${encodeURIComponent(oldName)}/rename`, {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name: newName })
|
||||
});
|
||||
const data = await response.json();
|
||||
if (!response.ok) {
|
||||
addActivity(data.error || 'Failed to rename project.', 'error');
|
||||
cancelRename();
|
||||
return;
|
||||
}
|
||||
addActivity(`Renamed project "${oldName}" to "${data.name}"`, 'success');
|
||||
loadProjects();
|
||||
} catch {
|
||||
addActivity('Failed to rename project.', 'error');
|
||||
cancelRename();
|
||||
}
|
||||
};
|
||||
|
||||
const cancelRename = () => {
|
||||
if (input.parentNode) {
|
||||
const restored = document.createElement('span');
|
||||
restored.className = 'project-name';
|
||||
restored.textContent = oldName;
|
||||
input.replaceWith(restored);
|
||||
}
|
||||
editBtn.style.display = 'inline-flex';
|
||||
};
|
||||
|
||||
input.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') { e.preventDefault(); finishRename(); }
|
||||
if (e.key === 'Escape') { e.preventDefault(); cancelRename(); }
|
||||
});
|
||||
input.addEventListener('blur', () => finishRename());
|
||||
}
|
||||
|
||||
async function loadActivity() {
|
||||
try {
|
||||
const response = await fetch('/api/logs?limit=8');
|
||||
@@ -1155,15 +1420,33 @@ Organization : OptiHK Limited
|
||||
icon.setAttribute('aria-hidden', 'true');
|
||||
|
||||
const details = document.createElement('div');
|
||||
details.style.minWidth = '0';
|
||||
details.style.flex = '1';
|
||||
|
||||
const nameRow = document.createElement('div');
|
||||
nameRow.className = 'project-name-row';
|
||||
|
||||
const name = document.createElement('span');
|
||||
name.className = 'project-name';
|
||||
name.textContent = project.name;
|
||||
|
||||
const editBtn = document.createElement('button');
|
||||
editBtn.className = 'edit-project-btn';
|
||||
editBtn.type = 'button';
|
||||
editBtn.textContent = '🖊';
|
||||
editBtn.title = 'Rename project';
|
||||
editBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
startRenameProject(project.name, nameRow, editBtn);
|
||||
});
|
||||
|
||||
nameRow.append(name, editBtn);
|
||||
|
||||
const subtitle = document.createElement('div');
|
||||
subtitle.className = 'project-subtitle';
|
||||
subtitle.textContent = 'Photonic layout project';
|
||||
|
||||
details.append(name, subtitle);
|
||||
details.append(nameRow, subtitle);
|
||||
top.append(icon, details);
|
||||
|
||||
const chips = document.createElement('div');
|
||||
@@ -1393,7 +1676,31 @@ Organization : OptiHK Limited
|
||||
applyTheme(document.body.classList.contains('light-mode') ? 'dark' : 'light');
|
||||
});
|
||||
|
||||
applyTheme(localStorage.getItem('mxpic-theme') || 'dark');
|
||||
const expandActivityBtn = document.getElementById('expand-activity');
|
||||
const activityBackdrop = document.getElementById('activity-backdrop');
|
||||
if (expandActivityBtn && activityBackdrop) {
|
||||
expandActivityBtn.addEventListener('click', () => {
|
||||
const panel = expandActivityBtn.closest('.panel');
|
||||
if (panel) {
|
||||
const expanded = !panel.classList.contains('activity-expanded');
|
||||
panel.classList.toggle('activity-expanded', expanded);
|
||||
activityBackdrop.classList.toggle('active', expanded);
|
||||
expandActivityBtn.textContent = expanded ? '↘' : '↖';
|
||||
activityBackdrop.setAttribute('aria-hidden', expanded ? 'false' : 'true');
|
||||
}
|
||||
});
|
||||
activityBackdrop.addEventListener('click', () => {
|
||||
const panel = document.querySelector('.panel.activity-expanded');
|
||||
if (panel) {
|
||||
panel.classList.remove('activity-expanded');
|
||||
activityBackdrop.classList.remove('active');
|
||||
expandActivityBtn.textContent = '↖';
|
||||
activityBackdrop.setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
applyTheme(localStorage.getItem('mxpic-theme') || 'light');
|
||||
loadTechnologies();
|
||||
loadProfile();
|
||||
loadProjects();
|
||||
@@ -1402,3 +1709,4 @@ Organization : OptiHK Limited
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<!--
|
||||
Description: Login page for authenticating users before entering the MXPIC EDA workspace.
|
||||
Inside functions: applyTheme, setSubmitState
|
||||
Inside functions: setSubmitState
|
||||
Developer : Qin Yue @ 2026
|
||||
Organization : OptiHK Limited
|
||||
-->
|
||||
@@ -35,26 +35,6 @@ Organization : OptiHK Limited
|
||||
--focus-ring: rgba(93, 216, 243, 0.28);
|
||||
}
|
||||
|
||||
body.light-mode {
|
||||
--bg-main: #f4f7fb;
|
||||
--bg-panel: #ffffff;
|
||||
--bg-card: #ffffff;
|
||||
--bg-soft: #eef4fa;
|
||||
--text-main: #142235;
|
||||
--text-muted: #5f7085;
|
||||
--accent: #1d4ed8;
|
||||
--accent-strong: #0f766e;
|
||||
--accent-warm: #b45309;
|
||||
--accent-green: #15803d;
|
||||
--accent-red: #dc2626;
|
||||
--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;
|
||||
@@ -65,23 +45,33 @@ Organization : OptiHK Limited
|
||||
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.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;
|
||||
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.light-mode {
|
||||
body::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
background:
|
||||
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));
|
||||
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;
|
||||
@@ -93,47 +83,25 @@ Organization : OptiHK Limited
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 22px;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(12, 23, 40, 0.86);
|
||||
color: var(--text-main);
|
||||
border-radius: 8px;
|
||||
min-width: 92px;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
cursor: pointer;
|
||||
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.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: 1px solid rgba(42, 57, 79, 0.5);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: rgba(12, 23, 40, 0.88);
|
||||
background: rgba(12, 23, 40, 0.34);
|
||||
backdrop-filter: blur(24px);
|
||||
-webkit-backdrop-filter: blur(24px);
|
||||
box-shadow: 0 30px 80px var(--shadow);
|
||||
}
|
||||
|
||||
body.light-mode .login-shell {
|
||||
background: rgba(255, 255, 255, 0.94);
|
||||
}
|
||||
|
||||
.login-visual {
|
||||
padding: 38px;
|
||||
background: var(--bg-panel);
|
||||
border-right: 1px solid var(--border);
|
||||
background: rgba(12, 23, 40, 0.22);
|
||||
border-right: 1px solid rgba(42, 57, 79, 0.4);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 28px;
|
||||
@@ -227,8 +195,8 @@ Organization : OptiHK Limited
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: var(--bg-card);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
background: rgba(17, 28, 46, 0.30);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
@@ -241,7 +209,7 @@ Organization : OptiHK Limited
|
||||
|
||||
.preview-bar {
|
||||
height: 36px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
border-bottom: 1px solid rgba(42, 57, 79, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -263,8 +231,8 @@ Organization : OptiHK Limited
|
||||
}
|
||||
|
||||
.preview-sidebar {
|
||||
border-right: 1px solid var(--border);
|
||||
background: var(--input-bg);
|
||||
border-right: 1px solid rgba(42, 57, 79, 0.4);
|
||||
background: rgba(9, 19, 32, 0.22);
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
@@ -314,7 +282,7 @@ Organization : OptiHK Limited
|
||||
color: var(--text-muted);
|
||||
font-family: 'IBM Plex Mono', Consolas, monospace;
|
||||
font-size: 0.68rem;
|
||||
background: var(--bg-soft);
|
||||
background: rgba(23, 36, 58, 0.27);
|
||||
}
|
||||
|
||||
.preview-canvas {
|
||||
@@ -323,17 +291,10 @@ Organization : OptiHK Limited
|
||||
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);
|
||||
rgba(17, 28, 46, 0.22);
|
||||
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;
|
||||
@@ -341,7 +302,7 @@ Organization : OptiHK Limited
|
||||
height: 44px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(180deg, var(--bg-soft), var(--bg-card));
|
||||
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;
|
||||
@@ -396,9 +357,9 @@ Organization : OptiHK Limited
|
||||
}
|
||||
|
||||
.login-card {
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.032), transparent),
|
||||
var(--bg-card);
|
||||
background: rgba(17, 28, 46, 0.23);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
padding: 42px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -534,6 +495,50 @@ Organization : OptiHK Limited
|
||||
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;
|
||||
@@ -543,12 +548,6 @@ Organization : OptiHK Limited
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: static;
|
||||
align-self: flex-end;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.login-shell {
|
||||
grid-template-columns: 1fr;
|
||||
min-height: auto;
|
||||
@@ -569,8 +568,9 @@ Organization : OptiHK Limited
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Switch color theme">Light mode</button>
|
||||
|
||||
<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">
|
||||
@@ -600,7 +600,7 @@ Organization : OptiHK Limited
|
||||
</div>
|
||||
|
||||
<div class="system-title">Access</div>
|
||||
<h2>Sign in</h2>
|
||||
<h2>SIGN IN</h2>
|
||||
|
||||
{% if error %}
|
||||
<div class="error-message" role="alert">
|
||||
@@ -622,36 +622,56 @@ Organization : OptiHK Limited
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="submit-btn" id="submit-btn" type="submit">Log in</button>
|
||||
<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 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');
|
||||
|
||||
function applyTheme(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';
|
||||
|
||||
|
After Width: | Height: | Size: 555 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 689 KiB |
|
After Width: | Height: | Size: 256 KiB |
|
After Width: | Height: | Size: 221 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 116 KiB |