synapse/res/templates/notif.html

35 lines
1.7 KiB
HTML
Raw Normal View History

<div class="notif">
<div>
{% for message in notif.messages %}
<div class="message {% if message.is_historical %}historical{% endif %}">
{% if message.sender_avatar_url %}
<img class="sender_avatar" src="{{ message.sender_avatar_url|mxc_to_http(48,48) }}" />
{% else %}
{% if message.sender_hash % 3 == 0 %}
<img class="sender_avatar" src="https://vector.im/beta/img/76cfa6.png" />
{% elif message.sender_hash % 3 == 1 %}
<img class="sender_avatar" src="https://vector.im/beta/img/50e2c2.png" />
{% else %}
<img class="sender_avatar" src="https://vector.im/beta/img/f4c371.png" />
{% endif %}
<img class="sender_avatar" src="{{ message.sender_avatar_url }}" />
{% endif %}
<div class="sender_name">{{ message.sender_name }}</div>
<div class="message_time">{{ message.ts|format_ts("%H:%M") }}</div>
<div class="message_body">
2016-04-28 08:55:53 -06:00
{% if message.msgtype == "m.text" %}
2016-04-28 09:59:57 -06:00
{{ message.body_text_html }}
2016-04-28 08:55:53 -06:00
{% elif message.msgtype == "m.image" %}
<img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
2016-04-28 09:59:57 -06:00
{% elif message.msgtype == "m.file" %}
<span class="filename">{{ message.body_text_plain }}</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="notif_link">
2016-04-28 10:28:48 -06:00
<a href="{{ notif.link }}">View</a>
</div>
</div>