{# ============================================================================ Admin Bar — displayed on public pages for logged-in admin/editor users. Shows: username, role badge, Edit/Builder links, Dashboard link. Designed to be minimal and respect the active theme. Include in public/base.html: {% if current_user is defined and current_user.is_authenticated %} {% include 'components/admin-bar.html' %} {% endif %} ============================================================================ #} {% if current_user is defined and current_user.is_authenticated %}
{# Left: Logo + Dashboard link #} {# Center: Edit actions (context-sensitive) #}
{% if page is defined and page.id %} {# Viewing a page #} {{ t('admin_bar.edit_page') }} {{ t('admin_bar.page_builder') }} {{ page.status }} {% elif post is defined and post.id %} {# Viewing a post #} {{ t('admin_bar.edit_post') }} {% endif %}
{# Right: User info #}
{{ current_user.role }} {{ current_user.get_display_name() }}
{% endif %}