diff --git a/backend/src/backend/internal/jinja_templates/approval.jinja b/backend/src/backend/internal/jinja_templates/approval.jinja
index d95ae11..711fed8 100644
--- a/backend/src/backend/internal/jinja_templates/approval.jinja
+++ b/backend/src/backend/internal/jinja_templates/approval.jinja
@@ -6,19 +6,23 @@
-
-
Neuer Artikel:
-
{{data.title}}
-
{{data.subtitle}}
+
@@ -35,18 +39,54 @@
}
- div {
- display: flex;
- align-items: center;
- flex-direction: column;
- background-color: lightgrey;
- padding: 32px 64px;
- border-radius: 3px;
+ #card {
+ background-image: linear-gradient(to bottom, #1d3238, #3c6a7b);
+ padding: 16px 32px;
+ border-radius: 8px;
}
+ .center {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ }
+
+ img {
+ width: 88px;
+ padding: 0 0 16px 0;
+ }
+
+ h1,
+ h2,
h3,
- h4 {
- margin: 0;
+ h4,
+ p {
+ color: white;
+ }
+
+ .accent {
+ color: #ffff00;
+ font-weight: 600;
+ }
+
+ #hide {
+ color: #bbbebf;
+ font-size: 12px;
+ font-weight: 700;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ p,
+ hr {
+ margin: 16px 0 16px 0;
+ }
+
+ p {
+ line-height: 1.5;
+ font-size: 14px;
}
button {
@@ -54,6 +94,14 @@
background-color: azure;
border-radius: 3px;
border: none;
+ font-weight: 700;
+ color: #1d3238;
+ margin: 16px 0 24px 0;
+ width: 100%;
+ }
+
+ hr {
+ width: 100%;
}
#admin {
diff --git a/backend/src/backend/internal/jinja_templates/newsletter.jinja b/backend/src/backend/internal/jinja_templates/newsletter.jinja
index 853d4e9..a43e870 100644
--- a/backend/src/backend/internal/jinja_templates/newsletter.jinja
+++ b/backend/src/backend/internal/jinja_templates/newsletter.jinja
@@ -6,19 +6,23 @@
-
-
Hey {{data.user.name}}, es gibt einen neuen Artikel:
-
{{data.article.title}}
-
{{data.article.subtitle}}
-
{{data.article.description}}
-
-
-
-
-
-
- Abbestellen
+
+
+

+
+
Neuer Artikel
+
{{data.date}} | Autor: {{data.author}} | Lesezeit: {{data.time2read}} min
+
{{data.title}}
+
{{data.subtitle}}
+
{{data.description}}
+
+
+
+
@@ -33,18 +37,54 @@
}
- div {
- display: flex;
- align-items: center;
- flex-direction: column;
- background-color: lightgrey;
- padding: 32px 64px;
- border-radius: 3px;
+ #card {
+ background-image: linear-gradient(to bottom, #1d3238, #3c6a7b);
+ padding: 16px 32px;
+ border-radius: 8px;
}
+ .center {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ }
+
+ img {
+ width: 88px;
+ padding: 0 0 16px 0;
+ }
+
+ h1,
+ h2,
h3,
- h4 {
- margin: 0;
+ h4,
+ p {
+ color: white;
+ }
+
+ .accent {
+ color: #ffff00;
+ font-weight: 600;
+ }
+
+ #hide {
+ color: #bbbebf;
+ font-size: 12px;
+ font-weight: 700;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ p,
+ hr {
+ margin: 16px 0 16px 0;
+ }
+
+ p {
+ line-height: 1.5;
+ font-size: 14px;
}
button {
@@ -52,5 +92,13 @@
background-color: azure;
border-radius: 3px;
border: none;
+ font-weight: 700;
+ color: #1d3238;
+ margin: 16px 0 24px 0;
+ width: 100%;
+ }
+
+ hr {
+ width: 100%;
}
\ No newline at end of file
diff --git a/backend/src/backend/internal/mail_util.py b/backend/src/backend/internal/mail_util.py
index e7edae1..8e8e04e 100644
--- a/backend/src/backend/internal/mail_util.py
+++ b/backend/src/backend/internal/mail_util.py
@@ -12,21 +12,27 @@ from jinja2 import Environment, FileSystemLoader
APP_ROOT = Path(__file__).resolve().parent.parent
class ArticleData():
- def __init__(self, title, subtitle, description, link):
+ def __init__(self, title, subtitle, description, link, date, author, time2read):
self.title=title
self.subtitle=subtitle
self.description=description
self.link=link
+ self.data=date
+ self.author=author
+ self.time2read = time2read
title: str
subtitle: str
description: str
link: str
+ date: str
+ author: str
+ time2read: str
class AdminApprovalData(ArticleData):
- def __init__(self,title, subtitle, description, link, secret):
- ArticleData.__init__(self, title, subtitle, description, link)
+ def __init__(self,title, subtitle, description, link, date, author, time2read, secret):
+ ArticleData.__init__(self, title, subtitle, description, link, date, author, time2read)
self.secret = secret
secret: str
@@ -38,7 +44,7 @@ def create_html_from_template(template_name: str, data):
return template.render(data=data)
-def send_newsletter_admin_approval(data: ArticleData ):
+def send_newsletter_admin_approval(data: ArticleData):
html = create_html_from_template("approval", data)
mail = mt.Mail(