{% if current_user.is_authenticated and current_user.theme and current_user.theme.is_active %} {# Extended themes: load a full override stylesheet when the theme marks itself #} {% if current_user.theme.css_variables and '"--theme-stylesheet"' in current_user.theme.css_variables %} {% if '"enhanced"' in current_user.theme.css_variables %} {% elif '"hackers"' in current_user.theme.css_variables %} {% endif %} {% endif %} {% endif %} {% block extra_css %}{% endblock %} {# CSRF token for fetch()-based POSTs (vote API, future AJAX endpoints) #} {% if csrf_token is defined %} {% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
{% block content %}{% endblock %}
{% if current_user.is_authenticated and current_user.theme and current_user.theme.is_active and current_user.theme.css_variables and '"hackers"' in current_user.theme.css_variables %} {% endif %} {% if current_user.is_authenticated %}
{% endif %} {% block extra_js %}{% endblock %} {# --- Vote button click handler (delegated, works for all .vote-widget) --- #} {% if current_user.is_authenticated %} {% endif %}