From e1e05523d26f0f50a021b478b3704e0d7c5853d8 Mon Sep 17 00:00:00 2001 From: Smittix Date: Fri, 30 Jan 2026 10:04:48 +0000 Subject: [PATCH] refactor: Migrate index.html to use unified nav partial - Replace 100+ lines of duplicated nav markup with partial include - Add is_index_page variable to nav partial for conditional behavior - Satellite/SSTV use switchMode on index, link to dashboard elsewhere - Reduces code duplication, single source of truth for navigation Co-Authored-By: Claude Opus 4.5 --- templates/index.html | 105 ++---------------------------------- templates/partials/nav.html | 19 +++++-- 2 files changed, 20 insertions(+), 104 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3f08e06..f6da5d5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -343,107 +343,10 @@ - - - - - + + {% set active_mode = 'pager' %} + {% set is_index_page = true %} + {% include 'partials/nav.html' %}
diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 862c5bb..f2485cf 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -8,11 +8,11 @@ Variables: - active_mode: Current active mode (e.g., 'pager', 'adsb', 'wifi') - - show_mode_switcher: If true (default), shows mode switching nav for index.html - If false, shows simplified dashboard nav + - is_index_page: If true, Satellite/SSTV use switchMode (panel mode) + If false (default), Satellite links to dashboard #} -{% set show_mode_switcher = show_mode_switcher|default(true) %} +{% set is_index_page = is_index_page|default(false) %} {# Desktop Navigation - uses existing CSS class names for compatibility #}