Use a single table for Thunderbird

This commit is contained in:
Yingtong Li 2019-01-27 17:41:44 +11:00
parent 1680bdfa03
commit 6e564818ea
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 32 additions and 64 deletions

View File

@ -19,7 +19,7 @@
#} #}
{% set gap %} {% set gap %}
<table class="row"><tbody><tr> <!--This row adds the gap between section heading and content --> <tr> <!--This row adds the gap between section heading and content -->
<th class="small-12 large-12 columns first last"> <th class="small-12 large-12 columns first last">
<table> <table>
<tr> <tr>
@ -28,7 +28,7 @@
</tr> </tr>
</table> </table>
</th> </th>
</tr></tbody></table> </tr>
{% endset %} {% endset %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@ -1081,7 +1081,7 @@
.heading h2 { .heading h2 {
color: #ffffff; color: #ffffff;
margin: 16px 0 0 0; margin: 16px 0 0 0 !important;
} }
.heading p { .heading p {
@ -1394,11 +1394,11 @@
</td></tr></tbody></table> </td></tr></tbody></table>
<table class="container text-center"><tbody><tr><td> <!-- Start main email content --> <table class="container text-center"><tbody><tr><td> <!-- Start main email content -->
<table class="row"><tbody><tr> <!-- Logo --> <table class="row"><tbody>
<th class="small-12 large-12 columns first last"> <tr><th class="small-12 large-12 columns first last"> <!-- Logo -->
<table> <table>
<tr> <tr>
<th> <th>
<center data-parsed=""> <center data-parsed="">
<a href="{{ import('django.conf').settings.PROMO_LOGO_LINK }}" align="center" class="text-center"> <a href="{{ import('django.conf').settings.PROMO_LOGO_LINK }}" align="center" class="text-center">
<img src="{{ import('django.conf').settings.PROMO_LOGO_URL }}" class="swu-logo" alt="Logo"> <img src="{{ import('django.conf').settings.PROMO_LOGO_URL }}" class="swu-logo" alt="Logo">
@ -1408,9 +1408,9 @@
<th class="expander"></th> <th class="expander"></th>
</tr> </tr>
</table> </table>
</th> </th></tr>
</tr></tbody></table> {% block content %}{% endblock content %}
{% block content %}{% endblock content %} </tbody></table>
</td></tr></tbody></table> <!-- / End main email content --> </td></tr></tbody></table> <!-- / End main email content -->
<table class="container text-center"><tbody><tr><td> <!-- Footer --> <table class="container text-center"><tbody><tr><td> <!-- Footer -->

View File

@ -21,7 +21,7 @@
#} #}
{% block content %} {% block content %}
<table class="row"><tbody><tr> <!-- Masthead --> <tr><!-- Masthead -->
<th class="small-12 large-12 columns first last"> <th class="small-12 large-12 columns first last">
<table> <table>
{% for event in events %} {% for event in events %}
@ -32,80 +32,48 @@
{% endfor %} {% endfor %}
</table> </table>
</th> </th>
</tr></tbody></table> </tr>
{% for group in groups if group.bulletinitem_set.filter(date__gte=bulbegin).filter(date__lt=bulend).count() > 0 %} {% for group in groups %}
{% if not loop.first %} {% if not loop.first %}
{{ gap }} {{ gap }}
{% endif %} {% endif %}
<table class="row heading"><tbody><tr> <!-- Section heading --> <tr class="heading"> <!-- Section heading -->
<th class="small-12 large-12 columns first last"> <th class="small-12 large-12 columns first last">
<table> <h2 class="text-center">{{ group.name }}</h2>
<tr>
<th>
<h2 class="text-center">{{ group.name }}</h2>
<th class="expander"></th>
</th>
</tr>
</table>
</th> </th>
</tr></tbody></table> <th class="expander"></th>
</tr>
{{ gap }} {{ gap }}
{% for item in group.bulletinitem_set.filter(date__gte=bulbegin).filter(date__lt=bulend).all() %} {% for item in group.bulletin_items %}
<table class="row"><tbody><tr> <!-- Main Digest content --> <tr> <!-- Main Digest content -->
{% if item.image %} {% if item.image %}
<th class="small-12 large-3 columns first"> <th class="small-12 large-3 columns first">
<table> {% if item.link %}<a href="{{ item.link }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image }}" alt="{{ item.title }}">{% if item.link %}</a>{% endif %}
<tr>
<th>
{% if item.link %}<a href="{{ item.link }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image }}" alt="{{ item.title }}">{% if item.link %}</a>{% endif %}
</th>
</tr>
</table>
</th> </th>
{% endif %} {% endif %}
<th class="small-12 large-{% if item.image %}8{% else %}12 first{% endif %} columns last"> <th class="small-12 large-{% if item.image %}8{% else %}12 first{% endif %} columns last">
<table> <b><h5>{{ item.title }}</h5></b>
<tr> <p>{{ item.content | markdown }}</p>
<th> {% if item.link %}<p><a href="{{ item.link }}">Read more &#x203A;</a></p>{% endif %}
<b><h5>{{ item.title }}</h5></b>
<p>{{ item.content | markdown }}</p>
{% if item.link %}<p><a href="{{ item.link }}">Read more &#x203A;</a></p>{% endif %}
</th>
</tr>
</table>
</th> </th>
</tr></tbody></table> </tr>
{% if not loop.last %}<hr>{% endif %} {% if not loop.last %}<hr>{% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% if more %} {% if more %}
<table class="row heading"><tbody><tr> <tr class="heading"><th class="small-12 large-12 columns first last">
<th class="small-12 large-12 columns first last"> <p>More from MUMUS:</p>
<table> </th></tr>
<tr>
<th>
<p>More from MUMUS:</p>
</th>
</tr>
</table>
</th>
</tr></tbody></table>
{{ gap }} {{ gap }}
<table class="row"><tbody><tr> <!-- Digest Content 2 columns--> <tr> <!-- Digest Content 2 columns-->
{% for item in more %} {% for item in more %}
<th class="small-12 large-4 columns{% if loop.first %} first{% endif %}{% if loop.last %} last{% endif %}"> <th class="small-12 large-4 columns{% if loop.first %} first{% endif %}{% if loop.last %} last{% endif %}">
<table> {% if item.image %}{% if item.link %}<a href="{{ item.link }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image }}" alt="{{ item.title }}">{% if item.link %}</a>{% endif %}<br>{% endif %}
<tr> <b><h5>{{ item.title }}</h5></b>
<th> <p>{{ item.content }}</p>
{% if item.image %}{% if item.link %}<a href="{{ item.link }}">{% endif %}<img src="{{ MEDIA_URL }}{{ item.image }}" alt="{{ item.title }}">{% if item.link %}</a>{% endif %}<br>{% endif %} {% if item.link %}<p><a href="{{ item.link }}">Read more &#x203A;</a></p>{% endif %}
<b><h5>{{ item.title }}</h5></b>
<p>{{ item.content }}</p>
{% if item.link %}<p><a href="{{ item.link }}">Read more &#x203A;</a></p>{% endif %}
</th>
</tr>
</table>
</th> </th>
{% endfor %} {% endfor %}
</table> </tr>
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}