{% comment %} User Menu Component with Dropdown Shows user avatar, name, and dropdown menu with: - Admin panel link (for staff) - Profile link (optional) - Logout link (optional) Parameters: - show_admin: Show admin link (default: auto-detect if user.is_staff) - show_profile: Show profile link (default: False) - show_logout: Show logout link (default: False) - profile_url: Custom profile URL - logout_url: Custom logout URL Usage: {% include 'django_tailwind/components/user_menu.html' %} With parameters: {% include 'django_tailwind/components/user_menu.html' with show_profile=True show_logout=True %} {% endcomment %} {% load tailwind_info %} {% if request.user.is_authenticated %}

{{ user_name }}

{% if request.user.email %}

{{ request.user.email }}

{% endif %}
{% get_admin_url as admin_url %} {% if show_admin|default:request.user.is_staff %} Admin Panel {% endif %} {% if show_profile %} Profile {% endif %}
{% if show_logout %} {% endif %}
{% endif %}