summary refs log tree commit diff
path: root/res/templates/notif.html
blob: aa6ed1e06170f0581856ee395344e23f32025c5d (plain) (blame)
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
28
29
30
31
32
<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">
                    {% if message.format == "org.matrix.custom.html" %}
                        {{ message.body_text_html }}
                    {% else %}
                        {{ message.body_text_plain }}
                    {% endif %}
                </div>
            </div>
        {% endfor %}
    </div>
    <div class="notif_link">
        <a href="{{ link }}">View in Vector</a>
    </div>
</div>