|
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: 0.9rem 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: 1.5rem 0.94rem 2.1rem 0.94rem; |
| 41 | + background-color: #fff; |
| 42 | + border-radius: 12px; |
| 43 | + border: outset 1px #eee; |
| 44 | + margin: 0px auto 1rem auto; |
30 | 45 | line-height: 27px; |
| 46 | + box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03); |
31 | 47 | } |
32 | | - .logo-container{ |
| 48 | + |
| 49 | + .icon-container { |
| 50 | + margin: 0 auto; |
| 51 | + width: 48px; |
| 52 | + height: 48px; |
| 53 | + background-color: rgba(254, 240, 199, 1); |
| 54 | + border-radius: 24px; |
33 | 55 | text-align: center; |
34 | | - margin-bottom: 20px; |
35 | 56 | } |
36 | | - .logo { |
37 | | - max-width: 210px; |
| 57 | + |
| 58 | + .icon-container img { |
| 59 | + width: 24px; |
| 60 | + height: 18px; |
| 61 | + margin-top: 15px; |
| 62 | + } |
| 63 | + |
| 64 | + .sysname-container { |
| 65 | + width: fit-content; |
| 66 | + margin: 1rem auto 0 auto; |
| 67 | + background-color: #F2F4F7; |
| 68 | + padding: 0 0.5em; |
| 69 | + border: solid #D0D5DD 1px; |
| 70 | + border-radius: 16px; |
| 71 | + color: #777; |
| 72 | + font-size: 0.75rem; |
| 73 | + line-height: 1.23rem; |
38 | 74 | } |
39 | | - .call-to-action{ |
| 75 | + |
| 76 | + .logo-container { |
40 | 77 | text-align: center; |
41 | 78 | margin-top: 30px; |
42 | 79 | } |
43 | | - .subject{ |
44 | | - font-size: medium; |
45 | | - font-weight: 700; |
46 | | - margin: 20px 0; |
| 80 | + |
| 81 | + .logo { |
| 82 | + max-width: 104px; |
| 83 | + } |
| 84 | + |
| 85 | + .call-to-action { |
| 86 | + text-align: center; |
| 87 | + margin-top: 1.88rem; |
| 88 | + } |
| 89 | + |
| 90 | + .email-title { |
| 91 | + font-weight: 600; |
| 92 | + font-size: 1.13rem; |
| 93 | + width: fit-content; |
| 94 | + margin: auto; |
| 95 | + padding-top: 0.25rem; |
| 96 | + color: #101828; |
| 97 | + } |
| 98 | + |
| 99 | + .subtitle { |
| 100 | + font-weight: 400; |
| 101 | + font-size: 0.88rem; |
| 102 | + width: fit-content; |
| 103 | + margin: 0 auto 0.88em auto; |
| 104 | + color: #475467; |
47 | 105 | } |
48 | | - .msg{ |
49 | | - color: #1b1818; |
| 106 | + |
| 107 | + .msg { |
| 108 | + color: #000000; |
50 | 109 | margin: 20px 0; |
51 | 110 | font-size: medium; |
52 | 111 | } |
53 | | - .btn{ |
| 112 | + |
| 113 | + .btn { |
54 | 114 | appearance: button; |
55 | 115 | 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; |
| 116 | + border: solid #D0D5DD 1px; |
| 117 | + border-radius: 8px; |
| 118 | + font-weight: 600; |
| 119 | + font-size: 1rem; |
| 120 | + line-height: 1.5rem; |
| 121 | + padding: 0.63rem 1rem; |
| 122 | + color: #344054 !important; |
| 123 | + box-sizing: border-box; |
| 124 | + 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 | 125 | } |
64 | | - .btn:hover, .btn:focus { |
65 | | - background: #000; |
66 | | - outline: 0 none; |
67 | | - background: rgba(51, 51, 51, 0.7); |
| 126 | + |
| 127 | + .btn:hover, |
| 128 | + .btn:focus { |
| 129 | + border-color: #000; |
| 130 | + color: #000; |
68 | 131 | } |
| 132 | + |
69 | 133 | a:link:hover { |
70 | 134 | text-decoration: none; |
71 | 135 | } |
| 136 | + |
| 137 | + .footer { |
| 138 | + height: 40px; |
| 139 | + text-align: center; |
| 140 | + color: #475467; |
| 141 | + } |
| 142 | + |
| 143 | + .footer p { |
| 144 | + font-size: 12px; |
| 145 | + margin: 0 auto; |
| 146 | + line-height: 20px; |
| 147 | + } |
72 | 148 | </style> |
73 | 149 | {% endblock styles %} |
74 | 150 | </head> |
75 | 151 | <body> |
76 | 152 | {% block body %} |
77 | 153 | <div class="container"> |
| 154 | + {% block logo %} |
| 155 | + <div class="logo-container"> |
| 156 | + <img src="{{ logo_url }}" alt="Logo" class="logo"> |
| 157 | + </div> |
| 158 | + {% endblock logo %} |
| 159 | + {% block email_info %} |
| 160 | + <div class="email-info">This email is sent to <u>{{ recipient_email }}</u> from [{{ site_name }}]</div> |
| 161 | + {% endblock email_info %} |
78 | 162 | <div class="box"> |
79 | 163 | {% block mail_header %} |
80 | | - <div class="logo-container"> |
81 | | - <img src="{{ logo_url }}" alt="Logo" class="logo"> |
| 164 | + <div class="icon-container"> |
| 165 | + <img src="{{ site_url }}{% static "ui/openwisp/images/email.png" %}" alt="email icon"> |
82 | 166 | </div> |
83 | | - {% if subject %} |
84 | | - <div class="subject">{{ subject }}</div> |
| 167 | + <div class="sysname-container">{{ site_name }}</div> |
| 168 | + {% if title %} |
| 169 | + <div class="email-title">{{ title }}</div> |
| 170 | + {% endif %} |
| 171 | + {% if subtitle %} |
| 172 | + <div class="subtitle">{{ subtitle }}</div> |
85 | 173 | {% endif %} |
86 | 174 | {% endblock mail_header %} |
87 | 175 | {% block mail_body %} |
|
94 | 182 | </div> |
95 | 183 | {% endif %} |
96 | 184 | {% endblock call_to_action %} |
97 | | - {% block mail_footer %} |
98 | | - {% if footer %} |
| 185 | + </div> |
| 186 | + {% block mail_footer %} |
| 187 | + {% if footer %} |
| 188 | + <div class="footer"> |
99 | 189 | {{ footer | safe }} |
100 | | - {% endif %} |
| 190 | + </div> |
| 191 | + {% endif %} |
101 | 192 | {% endblock mail_footer %} |
102 | | - </div> |
| 193 | + {% endblock body %} |
103 | 194 | </div> |
104 | | - {% endblock body %} |
105 | 195 | </body> |
106 | 196 | </html> |
0 commit comments