Back to Wagtail

Avatar

wagtail/admin/templates/wagtailadmin/shared/avatar.html

7.4.1933 B
Original Source

{% load i18n wagtailadmin_tags %} {% comment "text/markdown" %} Displays a user avatar using the avatar template Variables this template accepts: - classname - if present, adds classname to the root class list - user - A user object to use for the avatar image - size (string?) - small, large, square - tooltip (string?) - Modifier classes - tooltip_html (string?) - An HTML element to use for the tooltip content - edit_link (boolean?) - Edit link to display underneath the avatar {% endcomment %} {% if tooltip_html %} {{ tooltip_html }} {% endif %} {% if size == 'small' %} {% elif size == 'large' %} {% elif size == 'square' %} {% else %} {% endif %} {% if edit_link %} {% icon name="edit" %} {% endif %}