|
1 | 1 | {% load i18n %} |
2 | 2 | {% load l10n %} |
| 3 | +{% load static %} |
3 | 4 | <html lang="en"> |
4 | 5 | <head> |
5 | 6 | <meta charset="UTF-8"> |
6 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
7 | 8 | {% block styles %} |
8 | 9 | <style type="text/css"> |
| 10 | + :root { |
| 11 | + --muted-fg-color: #777; |
| 12 | + --loud-fg-color: #333; |
| 13 | + --muted-bg-color: #F2F4F7; |
| 14 | + --muted-border-color: #D0D5DD; |
| 15 | + } |
| 16 | + |
9 | 17 | body { |
10 | 18 | min-width: 250px; |
11 | | - background: #ffe5e5; |
| 19 | + background: #fff; |
12 | 20 | margin: 0; |
13 | 21 | padding: 0; |
14 | 22 | } |
15 | | - .container{ |
16 | | - background: #ffe5e5; |
| 23 | + |
| 24 | + .email-info { |
| 25 | + margin: 1.1em auto; |
| 26 | + font-size: 0.8em; |
| 27 | + font-weight: 400; |
| 28 | + color: #777; |
| 29 | + text-align: center; |
| 30 | + } |
| 31 | + |
| 32 | + .container { |
| 33 | + background: #fff; |
17 | 34 | height: 100%; |
18 | | - display: flex; |
19 | | - justify-content: center; |
20 | | - align-items: center; |
21 | 35 | } |
22 | | - .box{ |
| 36 | + |
| 37 | + .box { |
23 | 38 | width: auto; |
24 | | - max-width: 650px; |
25 | | - padding: 30px; |
26 | | - background-color: #fcfcfc; |
27 | | - box-sizing: border-box; |
28 | | - box-shadow: 0 15px 25px rgba(256,256, 256,.5); |
29 | | - margin: 30px auto; |
| 39 | + max-width: 700px; |
| 40 | + padding: 24px 15px 34px 15px; |
| 41 | + background-color: #fff; |
| 42 | + box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03); |
| 43 | + border-radius: 12px; |
| 44 | + margin: 0px auto 16px auto; |
30 | 45 | line-height: 27px; |
31 | 46 | } |
32 | | - .logo-container{ |
| 47 | + |
| 48 | + .icon-container { |
| 49 | + margin: 0 auto; |
| 50 | + width: 3em; |
| 51 | + height: 3em; |
| 52 | + background-color: rgba(254, 240, 199, 1); |
| 53 | + border-radius: 3em; |
| 54 | + } |
| 55 | + |
| 56 | + .icon-container img { |
| 57 | + width: 24px; |
| 58 | + height: 18px; |
| 59 | + margin: 15px 6px; |
| 60 | + } |
| 61 | + |
| 62 | + .sysname-container { |
| 63 | + width: fit-content; |
| 64 | + margin: 1em auto 0 auto; |
| 65 | + background-color: #F2F4F7; |
| 66 | + padding: 0 0.5em; |
| 67 | + border: solid #D0D5DD 1px; |
| 68 | + border-radius: 1em; |
| 69 | + color: #777; |
| 70 | + font-size: 12px; |
| 71 | + line-height: 18px; |
| 72 | + } |
| 73 | + |
| 74 | + .logo-container { |
33 | 75 | text-align: center; |
34 | | - margin-bottom: 20px; |
| 76 | + margin-top: 1em; |
35 | 77 | } |
| 78 | + |
36 | 79 | .logo { |
37 | | - max-width: 210px; |
| 80 | + max-width: 104px; |
38 | 81 | } |
39 | | - .call-to-action{ |
| 82 | + |
| 83 | + .call-to-action { |
40 | 84 | text-align: center; |
41 | 85 | margin-top: 30px; |
42 | 86 | } |
43 | | - .subject{ |
44 | | - font-size: medium; |
45 | | - font-weight: 700; |
46 | | - margin: 20px 0; |
| 87 | + |
| 88 | + .email-title { |
| 89 | + font-weight: 600; |
| 90 | + font-size: 18px; |
| 91 | + width: fit-content; |
| 92 | + margin: 0.1em auto; |
| 93 | + color: #101828; |
47 | 94 | } |
48 | | - .msg{ |
| 95 | + |
| 96 | + .subtitle { |
| 97 | + font-weight: 400; |
| 98 | + font-size: 14px; |
| 99 | + width: fit-content; |
| 100 | + margin: 0em auto 1em auto; |
| 101 | + color: #475467; |
| 102 | + } |
| 103 | + |
| 104 | + .msg { |
49 | 105 | color: #1b1818; |
50 | 106 | margin: 20px 0; |
51 | 107 | font-size: medium; |
52 | 108 | } |
53 | | - .btn{ |
| 109 | + |
| 110 | + .btn { |
54 | 111 | appearance: button; |
55 | 112 | text-decoration: none; |
56 | | - color: #fff!important; |
57 | | - background: #333; |
58 | | - border-radius: 4px; |
59 | | - border: 0; |
60 | | - padding: 10px 15px; |
61 | | - font-weight: bold; |
62 | | - font-size: medium; |
| 113 | + border: solid #D0D5DD 1px; |
| 114 | + border-radius: 0.5em; |
| 115 | + font-weight: 600; |
| 116 | + font-size: 1em; |
| 117 | + line-height: 1.5em; |
| 118 | + padding: 0.6em 1em; |
| 119 | + color: #344054 !important; |
| 120 | + box-sizing: border-box; |
| 121 | + box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), inset 0px 0px 0px 1px rgba(16, 24, 40, 0.18), inset 0px -2px 0px rgba(16, 24, 40, 0.05); |
63 | 122 | } |
64 | | - .btn:hover, .btn:focus { |
65 | | - background: #000; |
66 | | - outline: 0 none; |
67 | | - background: rgba(51, 51, 51, 0.7); |
| 123 | + |
| 124 | + .btn:hover, |
| 125 | + .btn:focus { |
| 126 | + border-color: #000; |
| 127 | + color: #000; |
68 | 128 | } |
| 129 | + |
69 | 130 | a:link:hover { |
70 | 131 | text-decoration: none; |
71 | 132 | } |
| 133 | + |
| 134 | + .footer { |
| 135 | + height: 40px; |
| 136 | + text-align: center; |
| 137 | + } |
| 138 | + |
| 139 | + .footer p { |
| 140 | + font-size: 12px; |
| 141 | + margin: 0 auto; |
| 142 | + line-height: 20px; |
| 143 | + } |
72 | 144 | </style> |
73 | 145 | {% endblock styles %} |
74 | 146 | </head> |
75 | 147 | <body> |
76 | 148 | {% block body %} |
77 | 149 | <div class="container"> |
| 150 | + {% block logo %} |
| 151 | + <div class="logo-container"> |
| 152 | + <img src="{{ logo_url }}" alt="Logo" class="logo"> |
| 153 | + </div> |
| 154 | + {% endblock logo %} |
| 155 | + {% block email_info %} |
| 156 | + <div class="email-info">This email is sent to <u>{{ recipient_email }}</u> from [{{ site_name }}]</div> |
| 157 | + {% endblock email_info %} |
78 | 158 | <div class="box"> |
79 | 159 | {% block mail_header %} |
80 | | - <div class="logo-container"> |
81 | | - <img src="{{ logo_url }}" alt="Logo" class="logo"> |
| 160 | + <div class="icon-container"> |
| 161 | + <img src="{{ site_url }}{% static "ui/openwisp/images/email.png" %}" alt="email icon"> |
82 | 162 | </div> |
83 | | - {% if subject %} |
84 | | - <div class="subject">{{ subject }}</div> |
| 163 | + <div class="sysname-container">{{ site_name }}</div> |
| 164 | + {% if title %} |
| 165 | + <div class="email-title">{{ title }}</div> |
| 166 | + {% endif %} |
| 167 | + {% if subtitle %} |
| 168 | + <div class="subtitle">{{ subtitle }}</div> |
85 | 169 | {% endif %} |
86 | 170 | {% endblock mail_header %} |
87 | 171 | {% block mail_body %} |
|
94 | 178 | </div> |
95 | 179 | {% endif %} |
96 | 180 | {% endblock call_to_action %} |
97 | | - {% block mail_footer %} |
98 | | - {% if footer %} |
| 181 | + </div> |
| 182 | + {% block mail_footer %} |
| 183 | + {% if footer %} |
| 184 | + <div class="footer"> |
99 | 185 | {{ footer | safe }} |
100 | | - {% endif %} |
| 186 | + </div> |
| 187 | + {% endif %} |
101 | 188 | {% endblock mail_footer %} |
102 | | - </div> |
| 189 | + {% endblock body %} |
103 | 190 | </div> |
104 | | - {% endblock body %} |
105 | 191 | </body> |
106 | 192 | </html> |
0 commit comments