settings site changes

This commit is contained in:
2026-04-21 15:30:40 +00:00
parent 74d7f49c8d
commit 298cf13d5c
16 changed files with 1908 additions and 40 deletions

View File

@@ -2,7 +2,8 @@
'use strict';
const ROUTES = {
'/': 's-core',
'/': 's-landing',
'/core': 's-core',
'/channels': 's-channels',
'/categories': 's-categories',
'/gmail': 's-gmail',
@@ -32,11 +33,10 @@
}
function setupSidebarRouting() {
const sidebar = document.querySelector('.sidebar');
if (!sidebar) return;
sidebar.addEventListener('click', e => {
const a = e.target.closest('a');
// Delegated at document so the same handler covers sidebar links AND
// landing-grid cards without duplication. Scoped by the compound selector.
document.addEventListener('click', e => {
const a = e.target.closest('.sidebar a, .landing-grid a');
if (!a) return;
e.preventDefault();
navigate(a.getAttribute('href'));