diff sat_templates/templates/default/components/avatar.html @ 164:e9f0a4215e46

multi-sites handling (moved templates to "templates" sub-directory) + noscript styles handling.
author Goffi <goffi@goffi.org>
date Mon, 10 Sep 2018 08:53:33 +0200
parents sat_templates/default/components/avatar.html@33c7ce833d3f
children 3195484abd82
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_templates/templates/default/components/avatar.html	Mon Sep 10 08:53:33 2018 +0200
@@ -0,0 +1,9 @@
+{% macro avatar(jid, class) %}
+    {%- if identities is defined -%}
+        {%- if identities[jid].avatar_basename is defined %}
+            <img class="avatar {{class}}" src="{{cache_path}}{{identities[jid].avatar_basename}}">
+        {% else %}
+            <span class="avatar avatar--generated {{class}}"><span class="avatar__content">{{identities[jid].nick|first|upper}}</span></span>
+        {%- endif -%}
+    {%- endif -%}
+{% endmacro %}