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 %}
<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">
<table>
<tr>
@ -28,7 +28,7 @@
</tr>
</table>
</th>
</tr></tbody></table>
</tr>
{% endset %}
<!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 {
color: #ffffff;
margin: 16px 0 0 0;
margin: 16px 0 0 0 !important;
}
.heading p {
@ -1394,11 +1394,11 @@
</td></tr></tbody></table>
<table class="container text-center"><tbody><tr><td> <!-- Start main email content -->
<table class="row"><tbody><tr> <!-- Logo -->
<th class="small-12 large-12 columns first last">
<table class="row"><tbody>
<tr><th class="small-12 large-12 columns first last"> <!-- Logo -->
<table>
<tr>
<th>
<th>
<center data-parsed="">
<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">
@ -1408,9 +1408,9 @@
<th class="expander"></th>
</tr>
</table>
</th>
</tr></tbody></table>
{% block content %}{% endblock content %}
</th></tr>
{% block content %}{% endblock content %}
</tbody></table>
</td></tr></tbody></table> <!-- / End main email content -->
<table class="container text-center"><tbody><tr><td> <!-- Footer -->

View File

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