Child: [f6d8a7] (diff)

Download this file

lib.html    27 lines (27 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{% macro gravatar(user, size) -%}
{% if user.preferences.email_address %}
{% if size %}
<img src="{{g.gravatar(user.preferences.email_address, default=g.url('/u/'+user.username.replace('_', '-')+'/user_icon'))}}"
alt="{{user.display_name}}"
title="{{user.display_name}}"
height="{{size}}"
width="{{size}}"/>
{% else %}
<img src="{{g.gravatar(user.preferences.email_address, default=g.url('/u/'+user.username.replace('_', '-')+'/user_icon'))}}"
alt="{{user.display_name}}"
title="{{user.display_name}}"/>
{% endif %}
{% else %}
{% if size %}
<img src="{{'/u/'+user.username.replace('_', '-')+'/user_icon'}}"
alt="{{user.display_name}}"
title="{{user.display_name}}"
height="{{size}}"
width="{{size}}"/>
{% else %}
<img src="{{'/u/'+user.username.replace('_', '-')+'/user_icon'}}"
alt="{{user.display_name}}"
title="{{user.display_name}}"/>
{% endif %}
{% endif %}
{%- endmacro %}