Mercurial > libervia-templates
comparison sat_templates/templates/bulma/components/avatar.html @ 263:878e7aee0e4a
bulma (components/avatar): updated avatar data use following change in Libervia
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 02 Aug 2020 20:28:38 +0200 |
parents | 1215a6e2385f |
children | 9847e6dbeefa |
comparison
equal
deleted
inserted
replaced
262:23180988ee6b | 263:878e7aee0e4a |
---|---|
1 {% macro avatar(jid, class="is-48x48") %} | 1 {% macro avatar(jid, class="is-48x48") %} |
2 {%- if identities is defined -%} | 2 {%- if identities is defined -%} |
3 {% set identity = identities[jid] %} | 3 {% set identity = identities.get(jid) %} |
4 {%- if identity.avatar_basename %} | 4 {%- if identity.avatar %} |
5 <div class="is-avatar image {{class}}"> | 5 <div class="is-avatar image {{class}}"> |
6 <img src="/cache/common/{{identities[jid].avatar_basename}}"> | 6 <img src="/cache/common/{{identity.avatar.filename}}"> |
7 </div> | 7 </div> |
8 {% else %} | 8 {% else %} |
9 {% set nick = identity.nicknames[0] if identity.nicknames else jid %} | 9 {% set nick = identity.nicknames[0] if identity.nicknames else jid %} |
10 <span class="is-avatar image {{class}} is-flex has-items-centered has-text-weight-bold is-size-3 {{class}}">{{nick|first|upper}}</span> | 10 <span class="is-avatar image {{class}} is-flex has-items-centered has-text-weight-bold is-size-3 {{class}}">{{nick|first|upper}}</span> |
11 {%- endif -%} | 11 {%- endif -%} |
12 {%- endif -%} | 12 {%- endif -%} |