Add preferences and improve weekmail

This commit is contained in:
Skia
2017-01-11 01:34:16 +01:00
committed by Skia
parent d988c09315
commit 83555a3640
11 changed files with 134 additions and 24 deletions

View File

@ -9,26 +9,26 @@
<ul>
{% for a in weekmail.articles.all() %}
<li>[{{ a.club }}] {{ a.title }}</li>
{% endfor %}
{%- endfor %}
</ul>
{% for a in weekmail.articles.all() %}
{%- for a in weekmail.articles.all() %}
<h3>[{{ a.club }}] {{ a.title }}</h3>
{{ a.content|markdown }}
{% endfor %}
{%- endfor -%}
{% if weekmail.joke %}
{%- if weekmail.joke %}
<h3>{% trans %}Joke{% endtrans %}</h3>
{{ weekmail.joke|markdown }}
{% endif %}
{% endif -%}
{% if weekmail.protip %}
{%- if weekmail.protip %}
<h3>{% trans %}Pro tip{% endtrans %}</h3>
{{ weekmail.protip|markdown }}
{% endif %}
{% endif -%}
{% if weekmail.conclusion %}
{%- if weekmail.conclusion %}
<h3>{% trans %}Final word{% endtrans %}</h3>
{{ weekmail.conclusion|markdown }}
{% endif %}
{% endif -%}

View File

@ -0,0 +1,32 @@
# {{ weekmail.title }}
{%- if weekmail.intro %}
## {% trans %}Intro{% endtrans %}
{{ weekmail.intro }}
{% endif %}
## {% trans %}Table of content{% endtrans %}
{% for a in weekmail.articles.all() %}
* [{{ a.club }}] {{ a.title }}
{% endfor -%}
{% for a in weekmail.articles.all() %}
## [{{ a.club }}] {{ a.title }}
{{ a.content }}
{% endfor -%}
{%- if weekmail.joke %}
## {% trans %}Joke{% endtrans %}
{{ weekmail.joke }}
{% endif -%}
{%- if weekmail.protip %}
## {% trans %}Pro tip{% endtrans %}
{{ weekmail.protip }}
{% endif -%}
{%- if weekmail.conclusion %}
## {% trans %}Final word{% endtrans %}
{{ weekmail.conclusion }}
{% endif -%}