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:
1608
TaskTracker.Api/wwwroot/css/site.css
Normal file
1608
TaskTracker.Api/wwwroot/css/site.css
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,53 +1,2 @@
|
|||||||
import { initDashboard, refreshDashboard } from './pages/dashboard.js';
|
// TaskTracker app.js — command palette, keyboard shortcuts, drag-and-drop wiring
|
||||||
import { initTasks } from './pages/tasks.js';
|
// Will be populated in later tasks
|
||||||
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();
|
|
||||||
|
|||||||
2
TaskTracker.Api/wwwroot/lib/Sortable.min.js
vendored
Normal file
2
TaskTracker.Api/wwwroot/lib/Sortable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
20
TaskTracker.Api/wwwroot/lib/chart.umd.min.js
vendored
Normal file
20
TaskTracker.Api/wwwroot/lib/chart.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
TaskTracker.Api/wwwroot/lib/htmx.min.js
vendored
Normal file
1
TaskTracker.Api/wwwroot/lib/htmx.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user