Update email templates to avoid using bootstrap. Should improve speed, and also cross-email-client compatability

This commit is contained in:
David Taylor
2017-05-18 15:27:50 +01:00
parent 4b87b0a196
commit f3c020b613
5 changed files with 141 additions and 96 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,35 +1,64 @@
@import "bootstrap-compass";
// Core variables and mixins
@import "bootstrap-variables";
@import "bootstrap/variables";
@import "bootstrap/mixins";
$button_color: #357ebf;
// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
@import "bootstrap/glyphicons";
body{
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0px;
// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
}
.main-table{
width: 100%;
border-collapse: collapse;
}
.client-header {
background-image: url("https://www.nottinghamtec.co.uk/imgs/wof2014-1.jpg");
background-color: #222;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
width: 100%;
margin-bottom: 2em;
margin-bottom: 28px;
.logos{
width: 100%;
max-width: 640px;
}
img {
height: 8em;
margin: 2em;
height: 110px;
}
}
.content-container{
width: 100%;
.content {
width: 100%;
max-width: 600px;
padding: 10px;
text-align: left;
.button-container{
width: 100%;
.button {
padding: 6px 12px;
background-color: $button_color;
border-radius: 4px;
a {
color: #fff;
text-decoration: none;
}
}
}
}
}

View File

@@ -1,32 +1,41 @@
{% extends 'base_client_email.html' %}
{% block content %}
<div class="col-sm-12">
<p>Hi {{ to_name|default:"there" }},</p>
<p>Hi {{ to_name|default:"there" }},</p>
<p>{{ request.user.get_full_name }} has requested that you authorise N{{ object.pk|stringformat:"05d" }}
| {{ object.name }}{% if not to_name %} on behalf of {{ object.person.name }}{% endif %}.</p>
<p><b>{{ request.user.get_full_name }}</b> has requested that you authorise <b>N{{ object.pk|stringformat:"05d" }}
| {{ object.name }}</b>{% if not to_name %} on behalf of <b>{{ object.person.name }}</b>{% endif %}.</p>
<p>
Please find the link below to complete the event booking process.
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
Remember that only Presidents or Treasurers are allowed to sign off payments. You may need to forward
this
email on.
{% endif %}
</p>
<p>
Please find the link below to complete the event booking process.
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
Remember that only Presidents or Treasurers are allowed to sign off payments. You may need to forward
this
email on.
{% endif %}
</p>
<div class="row">
<div class="col-sm-6 col-sm-offset-3 text-center">
<a class="btn btn-primary"
href="{{ request.scheme }}://{{ request.get_host }}{% url 'event_authorise' object.pk hmac %}">
Complete Authorisation Form
</a>
</div>
</div>
<p>Please note you event will not be booked until you complete this form.</p>
<table class="button-container" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="button" align="center">
<a href="{{ request.scheme }}://{{ request.get_host }}{% url 'event_authorise' object.pk hmac %}">
Complete Authorisation Form
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Your event will not be booked until you complete this form.</p>
<p>TEC PA &amp; Lighting<br/>
<p>TEC PA & Lighting</p>
</div>
{% endblock %}

View File

@@ -1,23 +1,21 @@
{% extends 'base_client_email.html' %}
{% block content %}
<div class="col-sm-12">
<p>Hi {{ to_name|default:"there" }},</p>
<p>Hi {{ to_name|default:"there" }},</p>
<p>
Your event N{{ object.event.pk|stringformat:"05d" }} has been successfully authorised
for {{ object.amount }}
by {{ object.name }} as of {{ object.last_edited_at }}.
</p>
<p>
Your event <b>N{{ object.event.pk|stringformat:"05d" }}</b> has been successfully authorised
for <b>{{ object.amount }}</b>
by <b>{{ object.name }}</b> as of <b>{{ object.last_edited_at }}</b>.
</p>
<p>
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
Your event is now fully booked and payment will be processed by the finance department automatically.
{% else %}{# external #}
Your event is now fully booked and our finance department will be contact to arrange payment.
{% endif %}
</p>
<p>
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
Your event is now fully booked and payment will be processed by the finance department automatically.
{% else %}{# external #}
Your event is now fully booked and our finance department will be contact to arrange payment.
{% endif %}
</p>
<p>TEC PA & Lighting</p>
</div>
<p>TEC PA &amp; Lighting</p>
{% endblock %}