summary refs log tree commit diff
path: root/res/templates
diff options
context:
space:
mode:
Diffstat (limited to 'res/templates')
-rw-r--r--res/templates/notif.html15
-rw-r--r--res/templates/notif_mail.html15
-rw-r--r--res/templates/room.html23
3 files changed, 34 insertions, 19 deletions
diff --git a/res/templates/notif.html b/res/templates/notif.html
deleted file mode 100644
index aee52ec8c9..0000000000
--- a/res/templates/notif.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <body>
-    <div className="salutation">Hi {{ user_display_name }},</div>
-    <div className="summarytext">{{ summary_text }}</div>
-    <div class="content">
-        {% for room in rooms %}
-            {% include 'room.html' with context %}
-        {% endfor %}
-    </div>
-    <div class="footer">
-        <a href="{{ unsubscribe_link }}">Unsubscribe</a>
-    </div>
-  </body>
-</html>
diff --git a/res/templates/notif_mail.html b/res/templates/notif_mail.html
new file mode 100644
index 0000000000..fbfb0a767c
--- /dev/null
+++ b/res/templates/notif_mail.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html lang="en">
+    <body>
+        <div className="salutation">Hi {{ user_display_name }},</div>
+        <div className="summarytext">{{ summary_text }}</div>
+        <div class="content">
+            {% for room in rooms %}
+                {% include 'room.html' with context %}
+            {% endfor %}
+        </div>
+        <div class="footer">
+            <a href="{{ unsubscribe_link }}">Unsubscribe</a>
+        </div>
+    </body>
+</html>
diff --git a/res/templates/room.html b/res/templates/room.html
index ef36b4ee58..f369575b98 100644
--- a/res/templates/room.html
+++ b/res/templates/room.html
@@ -1,6 +1,21 @@
 <div class="room">
-  <h2>{{ room.title }}</h2>
-  <div>
-    Things have happened in this room
-  </div>
+    <h2>{{ room.title }}</h2>
+    <div class="room_avatar">
+        {% if room.avatar_url %}
+            <img src="{{ room.avatar_url|mxc_to_http(48,48) }}" />
+        {% else %}
+            {% if room.hash % 3 == 0 %}
+                <img src="https://vector.im/beta/img/76cfa6.png"  />
+            {% elif room.hash % 3 == 1 %}
+                <img src="https://vector.im/beta/img/50e2c2.png"  />
+            {% else %}
+                <img src="https://vector.im/beta/img/f4c371.png"  />
+            {% endif %}
+        {% endif %}
+    </div>
+    <div>
+        {% for notif in room.notifs %}
+            {% include 'notif.html' with context %}
+        {% endfor %}
+    </div>
 </div>