From 07e7b3feb6ade33e1dbc4e0a5572864b6bad161c Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Mon, 4 May 2026 15:59:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F(mail)=20adapt=20to=20mjml?= =?UTF-8?q?=20v5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We upgraded to mjml v5, which has some breaking changes. By default the ubuntu font was loaded, with google fonts, that is not GDPR compliant. We switched to Inter, and uses fonts.bunny.net to load the font, which is GDPR compliant. --- src/mail/bin/mjml-to-html | 2 +- src/mail/mjml/partial/header.mjml | 14 +++++--------- src/mail/mjml/template.mjml | 14 ++++++++++---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/mail/bin/mjml-to-html b/src/mail/bin/mjml-to-html index 27db1a70e..fe0128edf 100755 --- a/src/mail/bin/mjml-to-html +++ b/src/mail/bin/mjml-to-html @@ -6,4 +6,4 @@ DOCS_DIR_MAILS="${DOCS_DIR_MAILS:-../backend/core/templates/mail}/html/" if [ ! -d "${DOCS_DIR_MAILS}" ]; then mkdir -p "${DOCS_DIR_MAILS}"; fi -mjml mjml/*.mjml -o "${DOCS_DIR_MAILS}"; +mjml mjml/*.mjml -o "${DOCS_DIR_MAILS}" --config.allowIncludes true; diff --git a/src/mail/mjml/partial/header.mjml b/src/mail/mjml/partial/header.mjml index fcd83e4aa..3cea82529 100644 --- a/src/mail/mjml/partial/header.mjml +++ b/src/mail/mjml/partial/header.mjml @@ -1,20 +1,16 @@ {{ title }} - - - {% load i18n static extra_tags %} - {{ title }} - + {{ title }} + + + /* Reset */ diff --git a/src/mail/mjml/template.mjml b/src/mail/mjml/template.mjml index a71409d44..97e92ec4b 100644 --- a/src/mail/mjml/template.mjml +++ b/src/mail/mjml/template.mjml @@ -2,6 +2,11 @@ + + {% load i18n static extra_tags %} @@ -16,11 +21,11 @@ - +

{{title|capfirst}}

- + {{message|capfirst}} {{link_label}} @@ -29,6 +34,7 @@ background-color="#000091" color="white" padding-bottom="30px" + font-family="Inter, sans-serif" > {{button_label}} @@ -39,13 +45,13 @@ width="30%" align="center" /> - + {% blocktrans %} Docs, your new essential tool for organizing, sharing and collaborating on your documents as a team. {% endblocktrans %} - +

{% blocktrans %} Brought to you by {{brandname}}