summary refs log tree commit diff
path: root/res/templates-vector/notif.html
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-05-05 01:58:58 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-05-05 02:00:33 +0100
commit3c39fa89027452cc4472ceb85d5d91a254cb2f50 (patch)
tree1eb7f98d74574b6c0a135e3fd1a08c3bccee4e5f /res/templates-vector/notif.html
parenthandle fragments correctly on mxc URLs. (diff)
downloadsynapse-3c39fa89027452cc4472ceb85d5d91a254cb2f50.tar.xz
First cut at Vector-branded mail templates
Diffstat (limited to 'res/templates-vector/notif.html')
-rw-r--r--res/templates-vector/notif.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/res/templates-vector/notif.html b/res/templates-vector/notif.html
new file mode 100644
index 0000000000..97ea425011
--- /dev/null
+++ b/res/templates-vector/notif.html
@@ -0,0 +1,34 @@
+<div class="notif">
+    <div>
+        {% for message in notif.messages %}
+            <div class="message {% if message.is_historical %}historical{% endif %}">
+                {% if message.sender_avatar_url %}
+                    <img alt="" class="sender_avatar" src="{{ message.sender_avatar_url|mxc_to_http(32,32) }}"  />
+                {% 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.msgtype == "m.text" %}
+                        {{ message.body_text_html }}
+                    {% elif message.msgtype == "m.image" %}
+                        <img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
+                    {% elif message.msgtype == "m.file" %}
+                        <span class="filename">{{ message.body_text_plain }}</span>
+                    {% endif %}
+                </div>
+            </div>
+        {% endfor %}
+    </div>
+    <div class="notif_link">
+        <a href="{{ notif.link }}">View {{ room.title }}</a>
+    </div>
+</div>