Files
2026-05-16 22:19:07 +08:00

204 lines
5.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<!-- Importing a clean, modern font -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
<style>
/* Base Dark Theme for EDA */
:root {
--bg-main: #0f172a;
--bg-card: #1e293b;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--accent: #38bdf8;
--accent-hover: #0284c7;
--border: #334155;
}
body {
margin: 0;
font-family: 'Inter', sans-serif;
background-color: var(--bg-main);
color: var(--text-main);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
/* Top Navigation Bar */
header {
width: 100%;
background-color: var(--bg-card);
padding: 15px 40px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border);
box-sizing: border-box;
}
.brand {
font-size: 1.25rem;
font-weight: 600;
letter-spacing: 1px;
}
.brand span {
color: var(--accent);
}
.logout-btn {
color: var(--text-muted);
text-decoration: none;
font-size: 0.9rem;
transition: color 0.2s ease;
}
.logout-btn:hover {
color: #ef4444; /* Red hover for logout */
}
/* Main Content Container */
.container {
width: 100%;
max-width: 800px;
padding: 40px 20px;
flex-grow: 1;
}
h2 {
font-weight: 400;
margin-bottom: 30px;
}
h2 strong {
color: var(--accent);
}
/* Projects Section */
.section-title {
font-size: 1.1rem;
color: var(--text-muted);
margin-bottom: 15px;
border-bottom: 1px solid var(--border);
padding-bottom: 10px;
}
/* File Cards */
.project-list {
list-style: none;
padding: 0;
display: grid;
gap: 15px;
margin-bottom: 40px;
}
.project-card {
background-color: var(--bg-card);
border: 1px solid var(--border);
padding: 15px 20px;
border-radius: 8px;
display: flex;
align-items: center;
transition: transform 0.2s ease, border-color 0.2s ease;
cursor: pointer;
font-size: 0.95rem;
}
.project-card:hover {
transform: translateY(-2px);
border-color: var(--accent);
}
.file-icon {
margin-right: 15px;
color: var(--accent);
font-size: 1.2rem;
}
/* Action Button */
.new-project-form {
display: flex;
justify-content: flex-start;
}
.new-project-btn {
background-color: var(--accent);
color: #0f172a;
font-family: inherit;
font-size: 15px;
font-weight: 600;
padding: 12px 24px;
border: none;
border-radius: 6px;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: background-color 0.2s ease, transform 0.1s ease;
display: flex;
align-items: center;
gap: 8px;
}
.new-project-btn:hover {
background-color: var(--accent-hover);
color: white;
}
.new-project-btn:active {
transform: scale(0.98);
}
/* Footer */
footer {
padding: 20px;
color: var(--border);
font-size: 0.75rem;
text-align: center;
width: 100%;
}
</style>
</head>
<body>
<!-- Top Navigation -->
<header>
<div class="brand">opti<span>hk</span></div>
<a href="/logout" class="logout-btn">Logout</a>
</header>
<!-- Main Dashboard -->
<div class="container">
<h2>Welcome back, <strong>{{ username }}</strong>!</h2>
<div class="section-title">Your Recent Layouts</div>
<ul class="project-list">
<li class="project-card">
<span class="file-icon">📄</span>
400G_Transceiver_v1.gds
</li>
<li class="project-card">
<span class="file-icon">📄</span>
Ring_Modulator_Test.gds
</li>
</ul>
<!-- Canvas Link -->
<form action="/canvas" method="GET" class="new-project-form">
<button type="submit" class="new-project-btn">
<span>+</span> New PIC Layout
</button>
</form>
</div>
<!-- System Footer -->
<footer>
Powered by mxpic core
</footer>
</body>
</html>