feat(web): add CSS design system and vendored JS libraries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 22:12:57 -05:00
parent c76956fb5b
commit bef7916cf8
5 changed files with 1633 additions and 53 deletions

View File

@@ -1,53 +1,2 @@
import { initDashboard, refreshDashboard } from './pages/dashboard.js';
import { initTasks } from './pages/tasks.js';
import { initContext } from './pages/context.js';
import { initMappings } from './pages/mappings.js';
const pages = ['dashboard', 'tasks', 'context', 'mappings'];
let currentPage = null;
let refreshTimer = null;
function navigate(page) {
if (!pages.includes(page)) page = 'dashboard';
if (currentPage === page) return;
currentPage = page;
// Update nav
document.querySelectorAll('.nav-link').forEach(link => {
link.classList.toggle('active', link.dataset.page === page);
});
// Show/hide pages
pages.forEach(p => {
document.getElementById(`page-${p}`).classList.toggle('hidden', p !== page);
});
// Load page content
const loaders = { dashboard: refreshDashboard, tasks: initTasks, context: initContext, mappings: initMappings };
loaders[page]?.();
// Auto-refresh for dashboard and context
clearInterval(refreshTimer);
if (page === 'dashboard' || page === 'context') {
refreshTimer = setInterval(() => loaders[page]?.(), 30000);
}
}
function onHashChange() {
const hash = location.hash.slice(2) || 'dashboard';
navigate(hash);
}
// Init
document.querySelectorAll('.nav-link').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
location.hash = link.getAttribute('href').slice(1);
});
});
window.addEventListener('hashchange', onHashChange);
initDashboard();
initTasks();
onHashChange();
// TaskTracker app.js — command palette, keyboard shortcuts, drag-and-drop wiring
// Will be populated in later tasks