{# Anti-FOUC: apply dark class before any rendering #}
{% if current_user.is_authenticated %} {# ── App shell: top nav + sidebar + content ── #}
menu
{% block nav_mobile_back %}{% endblock %}
ModuleDesk
{# Theme toggle #}
light_mode
contrast
dark_mode
sync
Sync All
mail
Messages
shopping_cart
Orders
refresh
{{ current_user.username[:2]|upper }}
{{ current_user.username }}
logout
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
×
{% endfor %}
{% endif %} {% endwith %}
{# Mobile floating sync button #}
sync
{# Notification permission banner #}
notifications
Enable notifications to get alerted when new messages arrive.
Enable
close
{% block content %}{% endblock %}
{% else %} {# ── Public layout (login) ── #}
{% block public_content %}{% endblock %}
{% endif %} {# Safelist: hidden div so CDN Tailwind generates dark classes used by JS #}