From cafc2554deb20421d04fbf45ada68aeba8b68614 Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 19 May 2026 22:25:38 +0100 Subject: [PATCH] feat: retire data-animations from index.html, login.html, and base_dashboard.html --- templates/index.html | 24 +----------------------- templates/layout/base_dashboard.html | 7 ------- templates/login.html | 8 +++----- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/templates/index.html b/templates/index.html index 290e27f..491a9ae 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11990,34 +11990,12 @@ }).catch(err => console.warn('Failed to save theme to server:', err)); } - // Animation toggle functions - function toggleAnimations() { - const html = document.documentElement; - const currentState = html.getAttribute('data-animations'); - const newState = currentState === 'off' ? 'on' : 'off'; - - if (newState === 'on') { - html.removeAttribute('data-animations'); - } else { - html.setAttribute('data-animations', newState); - } - - // Save to localStorage for persistence - localStorage.setItem('intercept-animations', newState); - } - - // Load saved theme and animations on page load + // Load saved theme on page load (function () { // First apply localStorage theme for instant load (no flash) const localTheme = localStorage.getItem('intercept-theme') || 'dark'; document.documentElement.setAttribute('data-theme', localTheme); - // Apply animations preference - const localAnimations = localStorage.getItem('intercept-animations'); - if (localAnimations === 'off') { - document.documentElement.setAttribute('data-animations', 'off'); - } - // Then fetch from server to sync (in case changed on another device) fetch('/settings/theme') .then(r => r.json()) diff --git a/templates/layout/base_dashboard.html b/templates/layout/base_dashboard.html index 18ec5c9..84865ca 100644 --- a/templates/layout/base_dashboard.html +++ b/templates/layout/base_dashboard.html @@ -74,13 +74,6 @@ 100% { top: 100%; } } - /* Animations toggle */ - [data-animations="off"] .scanline, - [data-animations="off"] .radar-bg, - [data-animations="off"] .grid-bg { - display: none; - } - /* Dashboard main content */ .dashboard-content { flex: 1; diff --git a/templates/login.html b/templates/login.html index 9d37deb..0537a41 100644 --- a/templates/login.html +++ b/templates/login.html @@ -2,12 +2,10 @@