mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
New css for weekmail
This commit is contained in:
parent
c0531feb27
commit
7815796d8b
@ -27,11 +27,13 @@ from django.db import models, transaction
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.urlresolvers import reverse_lazy, reverse
|
||||
from django.conf import settings
|
||||
from django.contrib.staticfiles.templatetags.staticfiles import static
|
||||
from django.core.mail import EmailMultiAlternatives
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from core.models import User, Preferences
|
||||
from club.models import Club
|
||||
import os
|
||||
|
||||
class Sith(models.Model):
|
||||
"""A one instance class storing all the modifiable infos"""
|
||||
@ -133,6 +135,9 @@ class Weekmail(models.Model):
|
||||
'weekmail': self,
|
||||
}).content.decode('utf-8')
|
||||
|
||||
def get_banner(self):
|
||||
return "http://" + settings.SITH_URL + static("com/img/weekmail_banner.png")
|
||||
|
||||
def __str__(self):
|
||||
return "Weekmail %s (sent: %s) - %s" % (self.id, self.sent, self.title)
|
||||
|
||||
|
@ -1,19 +1,25 @@
|
||||
<style type="text/css" media="all">
|
||||
h1, h2, h3, h4, h5, h6, p {
|
||||
padding: 5px;
|
||||
padding: 5px ;
|
||||
margin: 5px;
|
||||
}
|
||||
img {
|
||||
margin: 5px ;
|
||||
width: 95%;
|
||||
}
|
||||
</style>
|
||||
<div style="background: black; padding: 0px 5%;">
|
||||
<div style="background: white;">
|
||||
<h2 style="background: lightblue;">{{ weekmail.title }}</h2>
|
||||
|
||||
<div style="background: #CBD1DD; padding: 0px 5%;">
|
||||
<div style="background: #F9FAFB;">
|
||||
<h2 style="background: #304C83; color:#F9FAFB">{{ weekmail.title }}</h2>
|
||||
<img src="{{ weekmail.get_banner() }}"
|
||||
id="OWATemporaryImageDivContainerBannerForOutlook"
|
||||
>
|
||||
{% if weekmail.intro %}
|
||||
<h3 style="background: black; color: white">{% trans %}Intro{% endtrans %}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">{% trans %}Intro{% endtrans %}</h3>
|
||||
{{ weekmail.intro|markdown }}
|
||||
{% endif %}
|
||||
|
||||
<h3 style="background: black; color: white">{% trans %}Table of content{% endtrans %}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">{% trans %}Table of content{% endtrans %}</h3>
|
||||
<ul>
|
||||
{% for a in weekmail.articles.all() %}
|
||||
<li>[{{ a.club }}] {{ a.title }}</li>
|
||||
@ -21,22 +27,22 @@ h1, h2, h3, h4, h5, h6, p {
|
||||
</ul>
|
||||
|
||||
{%- for a in weekmail.articles.all() %}
|
||||
<h3 style="background: lightblue;">[{{ a.club }}] {{ a.title }}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">[{{ a.club }}] {{ a.title }}</h3>
|
||||
{{ a.content|markdown }}
|
||||
{%- endfor -%}
|
||||
|
||||
{%- if weekmail.joke %}
|
||||
<h3 style="background: black; color: white">{% trans %}Joke{% endtrans %}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">{% trans %}Joke{% endtrans %}</h3>
|
||||
{{ weekmail.joke|markdown }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.protip %}
|
||||
<h3 style="background: black; color: white">{% trans %}Pro tip{% endtrans %}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">{% trans %}Pro tip{% endtrans %}</h3>
|
||||
{{ weekmail.protip|markdown }}
|
||||
{% endif -%}
|
||||
|
||||
{%- if weekmail.conclusion %}
|
||||
<h3 style="background: black; color: white">{% trans %}Final word{% endtrans %}</h3>
|
||||
<h3 style="background: #E3A11C; color: #020202">{% trans %}Final word{% endtrans %}</h3>
|
||||
{{ weekmail.conclusion|markdown }}
|
||||
{% endif -%}
|
||||
|
||||
|
BIN
core/static/com/img/weekmail_banner.png
Normal file
BIN
core/static/com/img/weekmail_banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in New Issue
Block a user