summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Korber <philippkorber@gmail.com>2018-11-22 18:04:52 +0100
committerPhilipp Korber <philippkorber@gmail.com>2018-11-22 18:04:52 +0100
commit09153a0562ab33171f97b24259b6e5c651c388fd (patch)
treeba7a46beaa550c507d13a2ae56a1666163a22eba
parenta62782a86ff8618903dd49e8d357188ca94dc711 (diff)
chore(examples) updated example templates to use handlebars
-rw-r--r--mail/example_resources/templates/template_a/html/mail.html5
-rw-r--r--mail/example_resources/templates/template_a/logo.png (renamed from mail/example_resources/templates/template_a/html/logo.png)bin343 -> 343 bytes
-rw-r--r--mail/example_resources/templates/template_a/mail.html (renamed from mail/example_resources/tera_base/base_mail.html)5
-rw-r--r--mail/example_resources/templates/template_a/mail.txt (renamed from mail/example_resources/templates/template_a/text/mail.txt)0
-rw-r--r--mail/example_resources/templates/template_a/template.toml16
5 files changed, 19 insertions, 7 deletions
diff --git a/mail/example_resources/templates/template_a/html/mail.html b/mail/example_resources/templates/template_a/html/mail.html
deleted file mode 100644
index a377e53..0000000
--- a/mail/example_resources/templates/template_a/html/mail.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "base_mail.html" %}
-
-{% block head %}<meta charset="utf-8">{% endblock head %}
-
-{% block body %}logo: <img src="cid:{{cids.logo}}"> Hy {{data.name}}.{% endblock body %}
diff --git a/mail/example_resources/templates/template_a/html/logo.png b/mail/example_resources/templates/template_a/logo.png
index f58bea6..f58bea6 100644
--- a/mail/example_resources/templates/template_a/html/logo.png
+++ b/mail/example_resources/templates/template_a/logo.png
Binary files differ
diff --git a/mail/example_resources/tera_base/base_mail.html b/mail/example_resources/templates/template_a/mail.html
index 4bd251a..146f8f4 100644
--- a/mail/example_resources/tera_base/base_mail.html
+++ b/mail/example_resources/templates/template_a/mail.html
@@ -2,9 +2,10 @@
<html>
<head>
<!-- NOTE THAT THIS IS JUST AN EXAMPLE FOR THE TEMPLATE ENGINE NOT FOR MAIL ON ITSELF -->
- {% block head %}{% endblock head %}
+ <meta charset="utf-8">
</head>
<body>
- {% block body %}{% endblock body %}
+ <img src="cid:{{cids.logo}}"> <br>
+ <h1> Hy {{data.name}},</h1>
</body>
</html>
diff --git a/mail/example_resources/templates/template_a/text/mail.txt b/mail/example_resources/templates/template_a/mail.txt
index 903c8ce..903c8ce 100644
--- a/mail/example_resources/templates/template_a/text/mail.txt
+++ b/mail/example_resources/templates/template_a/mail.txt
diff --git a/mail/example_resources/templates/template_a/template.toml b/mail/example_resources/templates/template_a/template.toml
new file mode 100644
index 0000000..4da0f10
--- /dev/null
+++ b/mail/example_resources/templates/template_a/template.toml
@@ -0,0 +1,16 @@
+name = "template_a"
+subject = "Hy dear {{name}}"
+
+[[bodies]]
+path = "mail.txt"
+
+[[bodies]]
+path = "mail.html"
+
+ [bodies.embeddings]
+ logo = "logo.png"
+
+[[attachments]]
+iri = "path:./portfolio.pdf"
+media_type = "application/pdf"
+