emails: Create wider marketing email base template.

For our marketing emails, we want a width that's more appropriate for
newsletter context, vs. the narrow emails we use for transactional
content.

I haven't figured out a cleaner way to do this than duplicating most
of email_base_default.source.html. But it's not a big deal to
duplicate, since we've been changing that base template only about
once a year.
This commit is contained in:
Tim Abbott
2021-08-01 21:11:36 -07:00
parent 65557c458d
commit d439a2a53e
4 changed files with 62 additions and 2 deletions

View File

@@ -59,11 +59,12 @@ def inline_template(template_source_name: str) -> None:
# template, since we'll end up with 2 copipes of those tags.
# Thus, we strip this stuff out if the template extends
# another template.
if template_name not in ["email_base_default", "macros"]:
if template_name not in ["email_base_default", "email_base_marketing", "macros"]:
output = strip_unnecesary_tags(output)
if (
"zerver/emails/compiled/email_base_default.html" in output
or "zerver/emails/compiled/email_base_marketing.html" in output
or "zerver/emails/email_base_messages.html" in output
):
assert output.count("<html>") == 0