diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index 639e140..6e06310 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -18,8 +18,9 @@ {% endif %} - - + + + + + + diff --git a/templates/agents.html b/templates/agents.html index 4abedf4..b28be02 100644 --- a/templates/agents.html +++ b/templates/agents.html @@ -6,8 +6,9 @@ iNTERCEPT // Remote Agents - - + + + -
- - -
+
+ +
+ + {% include 'partials/nav.html' with context %}
@@ -1102,5 +1100,6 @@ connectStream(); addLogEntry('system', 'Network Monitor initialized'); - + + diff --git a/templates/partials/nav.html b/templates/partials/nav.html index f2485cf..bf9bdc9 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -1,317 +1,283 @@ -{# - Global Navigation Partial - Single source of truth for app navigation - - Compatible with: - - index.html (uses switchMode() for mode panels) - - Dashboard pages (uses navigation links) - - Variables: - - active_mode: Current active mode (e.g., 'pager', 'adsb', 'wifi') - - is_index_page: If true, Satellite/SSTV use switchMode (panel mode) - If false (default), Satellite links to dashboard -#} - -{% set is_index_page = is_index_page|default(false) %} - -{# Desktop Navigation - uses existing CSS class names for compatibility #} - - -{# Mobile Navigation Bar #} - - -{# JavaScript stub for pages that don't have switchMode defined #} - +{# + Global Navigation Partial + Single source of truth for app navigation + + Compatible with: + - index.html (uses switchMode() for mode panels) + - Dashboard pages (uses navigation links) + + Variables: + - active_mode: Current active mode (e.g., 'pager', 'adsb', 'wifi') + - is_index_page: If true, Satellite/SSTV use switchMode (panel mode) + If false (default), Satellite links to dashboard +#} + +{% set is_index_page = is_index_page|default(false) %} + +{% macro mode_item(mode, label, icon_svg, href=None) -%} + {%- set is_active = 'active' if active_mode == mode else '' -%} + {%- if href %} + + {{ icon_svg | safe }} + {{ label }} + + {%- elif is_index_page %} + + {%- else %} + + {{ icon_svg | safe }} + {{ label }} + + {%- endif %} +{%- endmacro %} + +{% macro mobile_item(mode, label, icon_svg, href=None) -%} + {%- set is_active = 'active' if active_mode == mode else '' -%} + {%- if href %} + + {{ icon_svg | safe }} {{ label }} + + {%- elif is_index_page %} + + {%- else %} + + {{ icon_svg | safe }} {{ label }} + + {%- endif %} +{%- endmacro %} + +{# Desktop Navigation - uses existing CSS class names for compatibility #} + + +{# Mobile Navigation Bar #} + + +{# JavaScript stub for pages that don't have switchMode defined #} + diff --git a/templates/satellite_dashboard.html b/templates/satellite_dashboard.html index cd05609..7ac14c6 100644 --- a/templates/satellite_dashboard.html +++ b/templates/satellite_dashboard.html @@ -19,6 +19,7 @@ {% endif %} + - + +