Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
emails: Create wider marketing email base template.
Tim Abbottd439a2a53e68
diff --git a/scripts/setup/inline_email_css.py b/scripts/setup/inline_email_css.pyindex 0d5c7fa160c..170572a954e 100755--- a/scripts/setup/inline_email_css.py+++ b/scripts/setup/inline_email_css.py@@ -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 outputor "zerver/emails/email_base_messages.html" in output):assert output.count("<html>") == 0diff --git a/templates/zerver/emails/custom_email_base.pre.html b/templates/zerver/emails/custom_email_base.pre.htmlindex 57f2d941f4b..8d2d92277c9 100644--- a/templates/zerver/emails/custom_email_base.pre.html+++ b/templates/zerver/emails/custom_email_base.pre.html@@ -1,4 +1,4 @@-{% extends "zerver/emails/compiled/email_base_default.html" %}+{% extends "zerver/emails/compiled/email_base_marketing.html" %}{% block illustration %}<img src="{{ email_images_base_uri }}/email_logo.png" alt=""/>diff --git a/templates/zerver/emails/email.css b/templates/zerver/emails/email.cssindex c51af40e19a..87742588f34 100644--- a/templates/zerver/emails/email.css+++ b/templates/zerver/emails/email.css@@ -46,6 +46,10 @@ table td {padding: 10px;}+.container.wide-container {+ max-width: 700px;+}+.content {box-sizing: border-box;display: block;@@ -54,6 +58,10 @@ table td {padding: 10px;}+.content.wide-content {+ max-width: 780px;+}+.main {background-color: #fff;border-radius: 3px;diff --git a/templates/zerver/emails/email_base_marketing.source.html b/templates/zerver/emails/email_base_marketing.source.htmlnew file mode 100644index 00000000000..0cd178ca64d--- /dev/null+++ b/templates/zerver/emails/email_base_marketing.source.html@@ -0,0 +1,51 @@+{% import 'zerver/emails/compiled/macros.html' as macros %}+<!DOCTYPE html>+<html lang="en">+ <head>+ <meta name="viewport" content="width=device-width" />+ <meta charset="UTF-8" />+ <title>Zulip</title>+ </head>+ <body>+ <table border="0" cellpadding="0" cellspacing="0" class="body">+ <tr>+ <td> </td>+ <td class="container wide-container">+ <div class="content wide-content">+ <a href="#" class="illustration">+ {% block illustration %}{% endblock %}+ </a>+ <span class="preheader">+ {% block preheader %}{% endblock %}+ </span>+ <table class="main">+ <tr>+ <td class="wrapper">+ <table border="0" cellpadding="0" cellspacing="0">+ <tr>+ <td>+ {% block content %}{% endblock %}+ </td>+ </tr>+ </table>+ <img src="{{ email_images_base_uri }}/footer.png" alt="{{ _('Swimming fish') }}"/>+ </td>+ </tr>+ </table>+ <div class="footer">+ <table border="0" cellpadding="0" cellspacing="0">+ <tr>+ <td class="content-block">+ <span class="apple-link">{{physical_address}}</span>+ {% block manage_preferences %}{% endblock %}+ </td>+ </tr>+ </table>+ </div>+ </div>+ </td>+ <td> </td>+ </tr>+ </table>+ </body>+</html>