{# ============================================================ #} {# — daisyUI avatar component #} {# #} {# Props: #} {# src – URL for profile photo. Falls back to #} {# avatar_url lookup, then placeholder/SVG. #} {# alt – alt text (default: "User avatar") #} {# for – User for avatar_url lookup #} {# (default: request.user) #} {# size – xs|sm|md|lg|xl|xxl (default: md), or any #} {# Tailwind w-* class (e.g. "w-16") #} {# shape – rounded|rounded-xl|rounded-full #} {# (default: rounded-full) #} {# status – online|offline|"" (default: no indicator) #} {# placeholder – Initials/text shown when no image #} {# class – extra classes on the .avatar wrapper #} {# #} {# Examples: #} {# #} {# #} {# #} {# ============================================================ #} {% load mvp cotton %} {% if not src %} {% avatar_url for size as src %} {% endif %}
{% if src %} {{ alt }} {% elif placeholder %} {{ placeholder }} {% else %} {% endif %}