From 09153a0562ab33171f97b24259b6e5c651c388fd Mon Sep 17 00:00:00 2001 From: Philipp Korber Date: Thu, 22 Nov 2018 18:04:52 +0100 Subject: chore(examples) updated example templates to use handlebars --- .../templates/template_a/html/logo.png | Bin 343 -> 0 bytes .../templates/template_a/html/mail.html | 5 ----- mail/example_resources/templates/template_a/logo.png | Bin 0 -> 343 bytes mail/example_resources/templates/template_a/mail.html | 11 +++++++++++ mail/example_resources/templates/template_a/mail.txt | 1 + .../templates/template_a/template.toml | 16 ++++++++++++++++ .../templates/template_a/text/mail.txt | 1 - mail/example_resources/tera_base/base_mail.html | 10 ---------- 8 files changed, 28 insertions(+), 16 deletions(-) delete mode 100644 mail/example_resources/templates/template_a/html/logo.png delete mode 100644 mail/example_resources/templates/template_a/html/mail.html create mode 100644 mail/example_resources/templates/template_a/logo.png create mode 100644 mail/example_resources/templates/template_a/mail.html create mode 100644 mail/example_resources/templates/template_a/mail.txt create mode 100644 mail/example_resources/templates/template_a/template.toml delete mode 100644 mail/example_resources/templates/template_a/text/mail.txt delete mode 100644 mail/example_resources/tera_base/base_mail.html diff --git a/mail/example_resources/templates/template_a/html/logo.png b/mail/example_resources/templates/template_a/html/logo.png deleted file mode 100644 index f58bea6..0000000 Binary files a/mail/example_resources/templates/template_a/html/logo.png and /dev/null differ 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 %}{% endblock head %} - -{% block body %}logo: Hy {{data.name}}.{% endblock body %} diff --git a/mail/example_resources/templates/template_a/logo.png b/mail/example_resources/templates/template_a/logo.png new file mode 100644 index 0000000..f58bea6 Binary files /dev/null and b/mail/example_resources/templates/template_a/logo.png differ diff --git a/mail/example_resources/templates/template_a/mail.html b/mail/example_resources/templates/template_a/mail.html new file mode 100644 index 0000000..146f8f4 --- /dev/null +++ b/mail/example_resources/templates/template_a/mail.html @@ -0,0 +1,11 @@ + + + + + + + +
+

Hy {{data.name}},

+ + diff --git a/mail/example_resources/templates/template_a/mail.txt b/mail/example_resources/templates/template_a/mail.txt new file mode 100644 index 0000000..903c8ce --- /dev/null +++ b/mail/example_resources/templates/template_a/mail.txt @@ -0,0 +1 @@ +Hy {{data.name}}. \ No newline at end of file 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" + diff --git a/mail/example_resources/templates/template_a/text/mail.txt b/mail/example_resources/templates/template_a/text/mail.txt deleted file mode 100644 index 903c8ce..0000000 --- a/mail/example_resources/templates/template_a/text/mail.txt +++ /dev/null @@ -1 +0,0 @@ -Hy {{data.name}}. \ No newline at end of file diff --git a/mail/example_resources/tera_base/base_mail.html b/mail/example_resources/tera_base/base_mail.html deleted file mode 100644 index 4bd251a..0000000 --- a/mail/example_resources/tera_base/base_mail.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - {% block head %}{% endblock head %} - - - {% block body %}{% endblock body %} - - -- cgit v1.2.3