Merge branch 'weekmail' into 'master'

Weekmail images and colors

See merge request ae/Sith!143
This commit is contained in:
Skia 2018-03-26 10:12:14 +02:00
commit d619e0cd9b
4 changed files with 12 additions and 9 deletions

View File

@ -167,7 +167,10 @@ class Weekmail(models.Model):
}).content.decode('utf-8') }).content.decode('utf-8')
def get_banner(self): def get_banner(self):
return "http://" + settings.SITH_URL + static("com/img/weekmail_banner.png") return "http://" + settings.SITH_URL + static("com/img/weekmail_bannerA18.jpg")
def get_footer(self):
return "http://" + settings.SITH_URL + static("com/img/weekmail_footerA18.jpg")
def __str__(self): def __str__(self):
return "Weekmail %s (sent: %s) - %s" % (self.id, self.sent, self.title) return "Weekmail %s (sent: %s) - %s" % (self.id, self.sent, self.title)

View File

@ -10,16 +10,16 @@ img {
</style> </style>
<div style="background: #CBD1DD; padding: 0px 5%;"> <div style="background: #CBD1DD; padding: 0px 5%;">
<div style="background: #F9FAFB;"> <div style="background: #F9FAFB;">
<h2 style="background: #304C83; color: #f9fafb">{{ weekmail.title }}</h2> <h2 style="background: #000; color: #f9fafb">{{ weekmail.title }}</h2>
<img src="{{ weekmail.get_banner() }}" <img src="{{ weekmail.get_banner() }}"
id="OWATemporaryImageDivContainerBannerForOutlook" id="OWATemporaryImageDivContainerBannerForOutlook"
> >
{% if weekmail.intro %} {% if weekmail.intro %}
<h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3> <h3 style="background: #000; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
{{ weekmail.intro|markdown }} {{ weekmail.intro|markdown }}
{% endif %} {% endif %}
<h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3> <h3 style="background: #000; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
<ul> <ul>
{% for a in weekmail.articles.all() %} {% for a in weekmail.articles.all() %}
<li>[{{ a.club }}] {{ a.title }}</li> <li>[{{ a.club }}] {{ a.title }}</li>
@ -27,25 +27,25 @@ img {
</ul> </ul>
{%- for a in weekmail.articles.all() %} {%- for a in weekmail.articles.all() %}
<h3 style="background: #E3A11C; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3> <h3 style="background: #000; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
{{ a.content|markdown }} {{ a.content|markdown }}
{%- endfor -%} {%- endfor -%}
{%- if weekmail.joke %} {%- if weekmail.joke %}
<h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3> <h3 style="background: #000; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
{{ weekmail.joke|markdown }} {{ weekmail.joke|markdown }}
{% endif -%} {% endif -%}
{%- if weekmail.protip %} {%- if weekmail.protip %}
<h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3> <h3 style="background: #000; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
{{ weekmail.protip|markdown }} {{ weekmail.protip|markdown }}
{% endif -%} {% endif -%}
{%- if weekmail.conclusion %} {%- if weekmail.conclusion %}
<h3 style="background: #E3A11C; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3> <h3 style="background: #000; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
{{ weekmail.conclusion|markdown }} {{ weekmail.conclusion|markdown }}
{% endif -%} {% endif -%}
<img src="{{ weekmail.get_footer() }}"
</div> </div>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB