Initial scaffold: FastAPI server, responsive UI shell
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Command Center SPA Router
|
||||
const sections = document.querySelectorAll('.panel');
|
||||
const links = document.querySelectorAll('.nav-links a');
|
||||
|
||||
function navigate(hash) {
|
||||
const target = hash.replace('#', '') || 'agents';
|
||||
sections.forEach(s => s.hidden = s.id !== target);
|
||||
links.forEach(l => l.classList.toggle('active', l.getAttribute('href') === '#' + target));
|
||||
}
|
||||
|
||||
links.forEach(l => l.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
window.location.hash = l.getAttribute('href');
|
||||
}));
|
||||
|
||||
window.addEventListener('hashchange', () => navigate(window.location.hash));
|
||||
navigate(window.location.hash || '#agents');
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Hermes Command Center</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<nav class="sidebar">
|
||||
<div class="logo">🎛️ Command Center</div>
|
||||
<ul class="nav-links">
|
||||
<li><a href="#agents" class="active">💬 Agents</a></li>
|
||||
<li><a href="#config">⚙️ Config</a></li>
|
||||
<li><a href="#vault">📚 Vault</a></li>
|
||||
<li><a href="#network">🌐 Network</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<main class="content">
|
||||
<section id="agents" class="panel">
|
||||
<h2>Agent Chat</h2>
|
||||
<p>Coming soon...</p>
|
||||
</section>
|
||||
<section id="config" class="panel" hidden>
|
||||
<h2>Config Editor</h2>
|
||||
<p>Coming soon...</p>
|
||||
</section>
|
||||
<section id="vault" class="panel" hidden>
|
||||
<h2>Obsidian Vault</h2>
|
||||
<p>Coming soon...</p>
|
||||
</section>
|
||||
<section id="network" class="panel" hidden>
|
||||
<h2>Network Status</h2>
|
||||
<p>Coming soon...</p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
<script src="/static/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
:root {
|
||||
--bg: #0d1117;
|
||||
--surface: #161b22;
|
||||
--border: #30363d;
|
||||
--text: #e6edf3;
|
||||
--text-muted: #8b949e;
|
||||
--accent: #00d4ff;
|
||||
--accent-hover: #33ddff;
|
||||
--danger: #f85149;
|
||||
--success: #3fb950;
|
||||
--warning: #d29922;
|
||||
--radius: 8px;
|
||||
}
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
|
||||
#app { display: flex; min-height: 100vh; }
|
||||
.sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 0; position: fixed; height: 100vh; overflow-y: auto; }
|
||||
.logo { padding: 0 16px 16px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--border); }
|
||||
.nav-links { list-style: none; padding: 12px 0; }
|
||||
.nav-links a { display: block; padding: 10px 16px; color: var(--text-muted); text-decoration: none; font-size: 14px; transition: all 0.15s; }
|
||||
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(0,212,255,0.1); border-right: 2px solid var(--accent); }
|
||||
.content { flex: 1; margin-left: 220px; padding: 24px; }
|
||||
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
|
||||
.panel h2 { margin-bottom: 16px; font-size: 20px; }
|
||||
/* Mobile */
|
||||
@media (max-width: 768px) {
|
||||
.sidebar { width: 100%; height: auto; position: relative; display: flex; flex-wrap: wrap; padding: 8px 0; }
|
||||
.logo { width: 100%; padding: 8px 16px; border-bottom: none; }
|
||||
.nav-links { display: flex; width: 100%; padding: 0; overflow-x: auto; }
|
||||
.nav-links a { padding: 8px 14px; white-space: nowrap; border-right: none; border-bottom: 2px solid transparent; }
|
||||
.nav-links a.active { border-right: none; border-bottom-color: var(--accent); }
|
||||
.content { margin-left: 0; padding: 12px; }
|
||||
}
|
||||
Reference in New Issue
Block a user