settings site changes
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user