{# 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 mode == 'satellite' %} {{ icon_svg | safe }} {{ label }} {%- elif href %} {{ icon_svg | safe }} {{ label }} {%- elif is_index_page %} {{ icon_svg | safe }} {{ label }} {%- 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 mode == 'satellite' %} {{ icon_svg | safe }} {{ label }} {%- elif href %} {{ icon_svg | safe }} {{ label }} {%- elif is_index_page %} {{ icon_svg | safe }} {{ label }} {%- else %} {{ icon_svg | safe }} {{ label }} {%- endif %} {%- endmacro %} {# Desktop Navigation - uses existing CSS class names for compatibility #} {# Signals Group #} Signals {{ mode_item('pager', 'Pager', '') }} {{ mode_item('sensor', '433MHz', '') }} {{ mode_item('rtlamr', 'Meters', '') }} {{ mode_item('subghz', 'SubGHz', '') }} {{ mode_item('waterfall', 'Waterfall', '') }} {{ mode_item('morse', 'Morse', '') }} {{ mode_item('ook', 'OOK Decoder', '') }} {# Tracking Group #} Tracking {{ mode_item('adsb', 'Aircraft', '', '/adsb/dashboard') }} {{ mode_item('ais', 'Vessels', '', '/ais/dashboard') }} {{ mode_item('aprs', 'APRS', '') }} {{ mode_item('gps', 'GPS', '') }} {{ mode_item('radiosonde', 'Radiosonde', '') }} {# Space Group #} Space {% if is_index_page %} {{ mode_item('satellite', 'Satellite', '') }} {% else %} {{ mode_item('satellite', 'Satellite', '', '/satellite/dashboard') }} {% endif %} {{ mode_item('sstv', 'ISS SSTV', '') }} {{ mode_item('weathersat', 'Weather Sat', '') }} {{ mode_item('wefax', 'WeFax', '') }} {{ mode_item('sstv_general', 'HF SSTV', '') }} {{ mode_item('spaceweather', 'Space Weather', '') }} {{ mode_item('meteor', 'Meteor Scatter', '') }} {# Wireless Group #} Wireless {{ mode_item('wifi', 'WiFi', '') }} {{ mode_item('bluetooth', 'Bluetooth', '') }} {{ mode_item('bt_locate', 'BT Locate', '') }} {{ mode_item('wifi_locate', 'WF Locate', '') }} {{ mode_item('meshtastic', 'Meshtastic', '') }} {# Intel Group #} Intel {{ mode_item('tscm', 'TSCM', '') }} {{ mode_item('spystations', 'Spy Stations', '') }} {{ mode_item('websdr', 'WebSDR', '') }} {# System Group #} System {{ mode_item('system', 'Health', '') }} {# Dynamic dashboard button (shown when in satellite mode) #} Full Dashboard {# Nav Utilities (clock, SSE status, theme, tools) #} UTC --:--:-- Main Dashboard ? {# Mobile Navigation Bar #} {# Signals Group #} SIG {{ mobile_item('pager', 'Pager', '') }} {{ mobile_item('sensor', '433MHz', '') }} {{ mobile_item('rtlamr', 'Meters', '') }} {{ mobile_item('subghz', 'SubGHz', '') }} {{ mobile_item('waterfall', 'Waterfall', '') }} {{ mobile_item('morse', 'Morse', '') }} {{ mobile_item('ook', 'OOK', '') }} {# Tracking Group #} TRK {{ mobile_item('adsb', 'Aircraft', '', '/adsb/dashboard') }} {{ mobile_item('ais', 'Vessels', '', '/ais/dashboard') }} {{ mobile_item('aprs', 'APRS', '') }} {{ mobile_item('gps', 'GPS', '') }} {{ mobile_item('radiosonde', 'Sonde', '') }} {# Space Group #} SPC {% if is_index_page %} {{ mobile_item('satellite', 'Sat', '') }} {% else %} {{ mobile_item('satellite', 'Sat', '', '/satellite/dashboard') }} {% endif %} {{ mobile_item('sstv', 'SSTV', '') }} {{ mobile_item('weathersat', 'WxSat', '') }} {{ mobile_item('wefax', 'WeFax', '') }} {{ mobile_item('sstv_general', 'HF SSTV', '') }} {{ mobile_item('spaceweather', 'SpaceWx', '') }} {{ mobile_item('meteor', 'Meteor', '') }} {# Wireless Group #} WLS {{ mobile_item('wifi', 'WiFi', '') }} {{ mobile_item('bluetooth', 'BT', '') }} {{ mobile_item('bt_locate', 'Locate', '') }} {{ mobile_item('wifi_locate', 'WF Loc', '') }} {{ mobile_item('meshtastic', 'Mesh', '') }} {# Intel Group #} INT {{ mobile_item('tscm', 'TSCM', '') }} {{ mobile_item('spystations', 'Spy', '') }} {{ mobile_item('websdr', 'WebSDR', '') }} {# System Group #} SYS {{ mobile_item('system', 'System', '') }} {# Utility Buttons (theme, settings, help) #} ? {# JavaScript stub for pages that don't have switchMode defined #}