view sat_templates/templates/bulma/components/avatar.html @ 403:65c53ec5e777

Bulma: complete redesign: This is a WIP full redesign of the whole web UI. Only chat is usable at the moment, many things are broken. The design uses the new Bulma v1+, has a look closer to industry standards, paves the way for a dark theme, and should be easy to use. It's a basis for coming features such as UI/UX for threads. rel 457
author Goffi <goffi@goffi.org>
date Fri, 11 Apr 2025 21:32:05 +0200
parents 6ae380307ddc
children 5016fb0ff62f
line wrap: on
line source

{% macro avatar(jid, class="") %}
    {%- if identities is defined -%}
        {% set identity = identities.get(jid) %}
        {%- if identity and identity.avatar.filename %}
            <div class="avatar image {{class}}">
                <img src="/cache/common/{{identity.avatar.filename}}">
            </div>
        {% else %}
            {% set nick = identity.nicknames[0] if identity.nicknames else jid %}
            <span class="avatar {{class}} is-flex is-align-items-center is-justify-content-center has-text-weight-bold is-family-code {{class}}">{{nick|initials}}</span>
        {%- endif -%}
    {%- endif -%}
{% endmacro %}