Some basic css to make it halfway legible

This commit is contained in:
David Baker 2016-04-28 17:29:39 +01:00
parent 36bb5c2383
commit 46b5547a42
3 changed files with 58 additions and 16 deletions

35
res/templates/mail.css Normal file
View File

@ -0,0 +1,35 @@
body {
font-family: "Open Sans", Helvetica, Arial, sans-serif;
font-size: 12pt;
margin: 1em;
}
#page {
margin: auto;
width: 640px;
padding: 1em;
border: 1px solid #76cfa6;
border-radius: 5px;
}
.room_avatar {
width: 48px;
height: 48px;
float: left;
}
.room_content {
clear: left;
}
.historical {
color: #888;
}
.sender_name {
display: inline;
}
.message_time {
display: inline;
}

View File

@ -1,15 +1,22 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head>
<style type="text/css">
{% include 'mail.css' without context %}
</style>
</head>
<body> <body>
<div className="salutation">Hi {{ user_display_name }},</div> <div id="page">
<div className="summarytext">{{ summary_text }}</div> <div className="salutation">Hi {{ user_display_name }},</div>
<div class="content"> <div className="summarytext">{{ summary_text }}</div>
{% for room in rooms %} <div class="content">
{% include 'room.html' with context %} {% for room in rooms %}
{% endfor %} {% include 'room.html' with context %}
</div> {% endfor %}
<div class="footer"> </div>
<a href="{{ unsubscribe_link }}">Unsubscribe</a> <div class="footer">
<a href="{{ unsubscribe_link }}">Unsubscribe</a>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,5 +1,4 @@
<div class="room"> <div class="room">
<h2>{{ room.title }}</h2>
<div class="room_avatar"> <div class="room_avatar">
{% if room.avatar_url %} {% if room.avatar_url %}
<img src="{{ room.avatar_url|mxc_to_http(48,48) }}" /> <img src="{{ room.avatar_url|mxc_to_http(48,48) }}" />
@ -13,13 +12,14 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
{% if room.invite %} <h2>{{ room.title }}</h2>
<a href="{{ room.link }}">Join the conversation.</a> <div class="room_content">
{% else %} {% if room.invite %}
<div> <a href="{{ room.link }}">Join the conversation.</a>
{% else %}
{% for notif in room.notifs %} {% for notif in room.notifs %}
{% include 'notif.html' with context %} {% include 'notif.html' with context %}
{% endfor %} {% endfor %}
</div> {% endif %}
{% endif %} </div>
</div> </div>