comparison default/components/avatar.html @ 133:0a0d9a953d98

css: some more refactoring
author Goffi <goffi@goffi.org>
date Mon, 26 Mar 2018 08:13:53 +0200
parents 5992b774a6a4
children
comparison
equal deleted inserted replaced
132:c70f405f9b86 133:0a0d9a953d98
1 {% macro avatar(jid) %} 1 {% macro avatar(jid, class) %}
2 {%- if identities is defined -%} 2 {%- if identities is defined -%}
3 {%- if identities[jid].avatar_basename is defined %} 3 {%- if identities[jid].avatar_basename is defined %}
4 <img class="avatar" src="{{cache_path}}{{identities[jid].avatar_basename}}"> 4 <img class="avatar {{class}}" src="{{cache_path}}{{identities[jid].avatar_basename}}">
5 {% else %} 5 {% else %}
6 <span class="avatar generated">{{author|first|upper}}</span> 6 <span class="avatar avatar--generated {{class}}"><span class="avatar__content">{{identities[jid].nick|first|upper}}</span></span>
7 {%- endif -%} 7 {%- endif -%}
8 {%- endif -%} 8 {%- endif -%}
9 {% endmacro %} 9 {% endmacro %}