feat: show shopping list items in cards

This commit is contained in:
juancwu 2026-02-07 18:27:06 +00:00
commit 6c704828ce
14 changed files with 396 additions and 85 deletions

13
assets/js/theme.js Normal file
View file

@ -0,0 +1,13 @@
// Apply saved theme or system preference on load
if (localStorage.theme === 'dark' || (!localStorage.theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
}
// Theme toggle handler
document.addEventListener('click', (e) => {
if (e.target.closest('[data-theme-switcher]')) {
e.preventDefault();
const isDark = document.documentElement.classList.toggle('dark');
localStorage.theme = isDark ? 'dark' : 'light';
}
});