##// END OF EJS Templates
emails: fixed some fonts rendering problems in outlook....
marcink -
r4217:e41c2009 stable
parent child Browse files
Show More
@@ -1,34 +1,34 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/debug_style/index.html"/>
3 3
4 4 <%def name="breadcrumbs_links()">
5 5 ${h.link_to(_('Style'), h.route_path('debug_style_home'))}
6 6 &raquo;
7 7 ${c.active}
8 8 </%def>
9 9
10 10
11 11 <%def name="real_main()">
12 12 <div class="box">
13 13 <div class="title">
14 14 ${self.breadcrumbs()}
15 15 </div>
16 16
17 17 <div class='sidebar-col-wrapper'>
18 18 ${self.sidebar()}
19 19 <div class="main-content">
20 20 <h2>Emails</h2>
21 21 <ul>
22 22 % for elem in sorted(c.email_types.keys()):
23 23 <li>
24 <a href="${request.route_path('debug_style_email', email_id=elem, _query={'user':c.rhodecode_user.username})}">${elem}</a>
24 <a href="${request.route_path('debug_style_email', email_id=elem, _query={'user':c.rhodecode_user.username, 'email': ''})}">${elem}</a>
25 25 |
26 26 <a href="${request.route_path('debug_style_email_plain_rendered', email_id=elem, _query={'user':c.rhodecode_user.username})}">plain rendered</a>
27 27 </li>
28 28 % endfor
29 29 </ul>
30 30
31 31 </div> <!-- .main-content -->
32 32 </div>
33 33 </div> <!-- .box -->
34 34 </%def>
@@ -1,525 +1,540 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 ## helpers
4 4 <%def name="tag_button(text, tag_type=None)">
5 5 <%
6 6 color_scheme = {
7 7 'default': 'border:1px solid #979797;color:#666666;background-color:#f9f9f9',
8 8 'approved': 'border:1px solid #0ac878;color:#0ac878;background-color:#f9f9f9',
9 9 'rejected': 'border:1px solid #e85e4d;color:#e85e4d;background-color:#f9f9f9',
10 10 'under_review': 'border:1px solid #ffc854;color:#ffc854;background-color:#f9f9f9',
11 11 }
12 12
13 13 css_style = ';'.join([
14 14 'display:inline',
15 15 'border-radius:2px',
16 16 'font-size:12px',
17 17 'padding:.2em',
18 18 ])
19 19
20 20 %>
21 21 <pre style="${css_style}; ${color_scheme.get(tag_type, color_scheme['default'])}">${text}</pre>
22 22 </%def>
23 23
24 24 <%def name="status_text(text, tag_type=None)">
25 25 <%
26 26 color_scheme = {
27 27 'default': 'color:#666666',
28 28 'approved': 'color:#0ac878',
29 29 'rejected': 'color:#e85e4d',
30 30 'under_review': 'color:#ffc854',
31 31 }
32 32 %>
33 33 <span style="font-weight:bold;font-size:12px;padding:.2em;${color_scheme.get(tag_type, color_scheme['default'])}">${text}</span>
34 34 </%def>
35 35
36 36 <%def name="gravatar_img(email, size=16)">
37 37 <%
38 38 css_style = ';'.join([
39 39 'padding: 0',
40 40 'margin: -4px 0',
41 41 'border-radius: 50%',
42 42 'box-sizing: content-box',
43 43 'display: inline',
44 44 'line-height: 1em',
45 45 'min-width: 16px',
46 46 'min-height: 16px',
47 47 ])
48 48 %>
49 49
50 50 <img alt="gravatar" style="${css_style}" src="${h.gravatar_url(email, size)}" height="${size}" width="${size}">
51 51 </%def>
52 52
53 53 <%def name="link_css()">\
54 54 <%
55 55 css_style = ';'.join([
56 56 'color:#427cc9',
57 57 'text-decoration:none',
58 58 'cursor:pointer'
59 59 ])
60 60 %>\
61 61 ${css_style}\
62 62 </%def>
63 63
64 64 ## Constants
65 65 <%
66 text_regular = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;"
67 text_monospace = "'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;"
66 text_regular = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, sans-serif"
67 text_monospace = "'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace"
68 68
69 69 %>
70 70
71 71 ## headers we additionally can set for email
72 72 <%def name="headers()" filter="n,trim"></%def>
73 73
74 74 <%def name="plaintext_footer()" filter="trim">
75 75 ${_('This is a notification from RhodeCode.')} ${instance_url}
76 76 </%def>
77 77
78 78 <%def name="body_plaintext()" filter="n,trim">
79 79 ## this example is not called itself but overridden in each template
80 80 ## the plaintext_footer should be at the bottom of both html and text emails
81 81 ${self.plaintext_footer()}
82 82 </%def>
83 83
84 84 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
85 85 <html xmlns="http://www.w3.org/1999/xhtml">
86 86 <head>
87 87 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
88 88 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
89 89 <title>${self.subject()}</title>
90 90 <style type="text/css">
91 91 /* Based on The MailChimp Reset INLINE: Yes. */
92 92 #outlook a {
93 93 padding: 0;
94 94 }
95 95
96 96 /* Force Outlook to provide a "view in browser" menu link. */
97 97 body {
98 98 width: 100% !important;
99 99 -webkit-text-size-adjust: 100%;
100 100 -ms-text-size-adjust: 100%;
101 101 margin: 0;
102 102 padding: 0;
103 font-family: ${text_regular|n}
103 font-family: ${text_regular|n};
104 104 }
105 105
106 106 /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
107 107 .ExternalClass {
108 108 width: 100%;
109 109 }
110 110
111 111 /* Force Hotmail to display emails at full width */
112 112 .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
113 113 line-height: 100%;
114 114 }
115 115
116 116 /* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */
117 117 #backgroundTable {
118 118 margin: 0;
119 119 padding: 0;
120 120 line-height: 100% !important;
121 121 }
122 122
123 123 /* End reset */
124 124
125 125 /* defaults for images*/
126 126 img {
127 127 outline: none;
128 128 text-decoration: none;
129 129 -ms-interpolation-mode: bicubic;
130 130 }
131 131
132 132 a img {
133 133 border: none;
134 134 }
135 135
136 136 .image_fix {
137 137 display: block;
138 138 }
139 139
140 140 body {
141 141 line-height: 1.2em;
142 142 }
143 143
144 144 p {
145 145 margin: 0 0 20px;
146 146 }
147 147
148 148 h1, h2, h3, h4, h5, h6 {
149 149 color: #323232 !important;
150 150 }
151 151
152 152 a {
153 153 color: #427cc9;
154 154 text-decoration: none;
155 155 outline: none;
156 156 cursor: pointer;
157 157 }
158 158
159 159 a:focus {
160 160 outline: none;
161 161 }
162 162
163 163 a:hover {
164 164 color: #305b91;
165 165 }
166 166
167 167 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
168 168 color: #427cc9 !important;
169 169 text-decoration: none !important;
170 170 }
171 171
172 172 h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
173 173 color: #305b91 !important;
174 174 }
175 175
176 176 h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
177 177 color: #305b91 !important;
178 178 }
179 179
180 180 table {
181 181 font-size: 13px;
182 182 border-collapse: collapse;
183 183 mso-table-lspace: 0pt;
184 184 mso-table-rspace: 0pt;
185 185 }
186 186
187 table tr {
188 display: table-row;
189 vertical-align: inherit;
190 border-color: inherit;
191 border-spacing: 0 3px;
192 }
193
187 194 table td {
188 195 padding: .65em 1em .65em 0;
189 196 border-collapse: collapse;
190 197 vertical-align: top;
191 198 text-align: left;
192 199 }
193 200
194 201 input {
195 202 display: inline;
196 203 border-radius: 2px;
197 204 border: 1px solid #dbd9da;
198 205 padding: .5em;
199 206 }
200 207
201 208 input:focus {
202 209 outline: 1px solid #979797
203 210 }
204 211
212 code {
213 font-family: ${text_monospace|n};
214 }
215
205 216 @media only screen and (-webkit-min-device-pixel-ratio: 2) {
206 217 /* Put your iPhone 4g styles in here */
207 218 }
208 219
209 220 /* Android targeting */
210 221 @media only screen and (-webkit-device-pixel-ratio:.75){
211 222 /* Put CSS for low density (ldpi) Android layouts in here */
212 223 }
213 224 @media only screen and (-webkit-device-pixel-ratio:1){
214 225 /* Put CSS for medium density (mdpi) Android layouts in here */
215 226 }
216 227 @media only screen and (-webkit-device-pixel-ratio:1.5){
217 228 /* Put CSS for high density (hdpi) Android layouts in here */
218 229 }
219 230 /* end Android targeting */
220 231
221 232 /** MARKDOWN styling **/
222 233 div.markdown-block {
223 234 clear: both;
224 235 overflow: hidden;
225 236 margin: 0;
226 237 padding: 3px 5px 3px
227 238 }
228 239
229 240 div.markdown-block h1, div.markdown-block h2, div.markdown-block h3, div.markdown-block h4, div.markdown-block h5, div.markdown-block h6 {
230 241 border-bottom: none !important;
231 242 padding: 0 !important;
232 243 overflow: visible !important
233 244 }
234 245
235 246 div.markdown-block h1, div.markdown-block h2 {
236 247 border-bottom: 1px #e6e5e5 solid !important
237 248 }
238 249
239 250 div.markdown-block h1 {
240 251 font-size: 32px;
241 252 margin: 15px 0 15px 0 !important;
242 253 padding-bottom: 5px !important
243 254 }
244 255
245 256 div.markdown-block h2 {
246 257 font-size: 24px !important;
247 258 margin: 34px 0 10px 0 !important;
248 259 padding-top: 15px !important;
249 260 padding-bottom: 8px !important
250 261 }
251 262
252 263 div.markdown-block h3 {
253 264 font-size: 18px !important;
254 265 margin: 30px 0 8px 0 !important;
255 266 padding-bottom: 2px !important
256 267 }
257 268
258 269 div.markdown-block h4 {
259 270 font-size: 13px !important;
260 271 margin: 18px 0 3px 0 !important
261 272 }
262 273
263 274 div.markdown-block h5 {
264 275 font-size: 12px !important;
265 276 margin: 15px 0 3px 0 !important
266 277 }
267 278
268 279 div.markdown-block h6 {
269 280 font-size: 12px;
270 281 color: #777777;
271 282 margin: 15px 0 3px 0 !important
272 283 }
273 284
274 285 div.markdown-block hr {
275 286 border: 0;
276 287 color: #e6e5e5;
277 288 background-color: #e6e5e5;
278 289 height: 3px;
279 290 margin-bottom: 13px
280 291 }
281 292
282 293 div.markdown-block ol, div.markdown-block ul, div.markdown-block p, div.markdown-block blockquote, div.markdown-block dl, div.markdown-block li, div.markdown-block table {
283 294 margin: 3px 0 13px 0 !important;
284 295 color: #424242 !important;
285 296 font-size: 13px !important;
286 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
297 font-family: ${text_regular|n};
287 298 font-weight: normal !important;
288 299 overflow: visible !important;
289 300 line-height: 140% !important
290 301 }
291 302
292 303 div.markdown-block pre {
293 304 margin: 3px 0 13px 0 !important;
294 305 padding: .5em;
295 306 color: #424242 !important;
296 307 font-size: 13px !important;
297 308 overflow: visible !important;
298 309 line-height: 140% !important;
299 310 background-color: #F5F5F5
300 311 }
301 312
302 313 div.markdown-block img {
303 314 border-style: none;
304 315 background-color: #fff;
305 316 padding-right: 20px;
306 317 max-width: 100%
307 318 }
308 319
309 320 div.markdown-block strong {
310 321 font-weight: 600;
311 322 margin: 0
312 323 }
313 324
314 325 div.markdown-block ul.checkbox, div.markdown-block ol.checkbox {
315 326 padding-left: 20px !important;
316 327 margin-top: 0 !important;
317 328 margin-bottom: 18px !important
318 329 }
319 330
320 331 div.markdown-block ul, div.markdown-block ol {
321 332 padding-left: 30px !important;
322 333 margin-top: 0 !important;
323 334 margin-bottom: 18px !important
324 335 }
325 336
326 337 div.markdown-block ul.checkbox li, div.markdown-block ol.checkbox li {
327 338 list-style: none !important;
328 339 margin: 6px !important;
329 340 padding: 0 !important
330 341 }
331 342
332 343 div.markdown-block ul li, div.markdown-block ol li {
333 344 list-style: disc !important;
334 345 margin: 6px !important;
335 346 padding: 0 !important
336 347 }
337 348
338 349 div.markdown-block ol li {
339 350 list-style: decimal !important
340 351 }
341 352
342 353 div.markdown-block #message {
343 354 -webkit-border-radius: 2px;
344 355 -moz-border-radius: 2px;
345 356 border-radius: 2px;
346 357 border: 1px solid #dbd9da;
347 358 display: block;
348 359 width: 100%;
349 360 height: 60px;
350 361 margin: 6px 0
351 362 }
352 363
353 364 div.markdown-block button, div.markdown-block #ws {
354 365 font-size: 13px;
355 366 padding: 4px 6px;
356 367 -webkit-border-radius: 2px;
357 368 -moz-border-radius: 2px;
358 369 border-radius: 2px;
359 370 border: 1px solid #dbd9da;
360 371 background-color: #eeeeee
361 372 }
362 373
363 374 div.markdown-block code, div.markdown-block pre, div.markdown-block #ws, div.markdown-block #message {
364 font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;
375 font-family: ${text_monospace|n};
365 376 font-size: 11px;
366 377 -webkit-border-radius: 2px;
367 378 -moz-border-radius: 2px;
368 379 border-radius: 2px;
369 380 background-color: white;
370 381 color: #7E7F7F
371 382 }
372 383
373 384 div.markdown-block code {
374 385 border: 1px solid #eeeeee;
375 386 margin: 0 2px;
376 387 padding: 0 5px
377 388 }
378 389
379 390 div.markdown-block pre {
380 391 border: 1px solid #dbd9da;
381 392 overflow: auto;
382 393 padding: .5em;
383 394 background-color: #F5F5F5
384 395 }
385 396
386 397 div.markdown-block pre > code {
387 398 border: 0;
388 399 margin: 0;
389 400 padding: 0
390 401 }
391 402
392 403 div.rst-block {
393 404 clear: both;
394 405 overflow: hidden;
395 406 margin: 0;
396 407 padding: 3px 5px 3px
397 408 }
398 409
399 410 div.rst-block h2 {
400 411 font-weight: normal
401 412 }
402 413
403 414 div.rst-block h1, div.rst-block h2, div.rst-block h3, div.rst-block h4, div.rst-block h5, div.rst-block h6 {
404 415 border-bottom: 0 !important;
405 416 margin: 0 !important;
406 417 padding: 0 !important;
407 418 line-height: 1.5em !important
408 419 }
409 420
410 421 div.rst-block h1:first-child {
411 422 padding-top: .25em !important
412 423 }
413 424
414 425 div.rst-block h2, div.rst-block h3 {
415 426 margin: 1em 0 !important
416 427 }
417 428
418 429 div.rst-block h1, div.rst-block h2 {
419 430 border-bottom: 1px #e6e5e5 solid !important
420 431 }
421 432
422 433 div.rst-block h2 {
423 434 margin-top: 1.5em !important;
424 435 padding-top: .5em !important
425 436 }
426 437
427 438 div.rst-block p {
428 439 color: black !important;
429 440 margin: 1em 0 !important;
430 441 line-height: 1.5em !important
431 442 }
432 443
433 444 div.rst-block ul {
434 445 list-style: disc !important;
435 446 margin: 1em 0 1em 2em !important;
436 447 clear: both
437 448 }
438 449
439 450 div.rst-block ol {
440 451 list-style: decimal;
441 452 margin: 1em 0 1em 2em !important
442 453 }
443 454
444 455 div.rst-block pre, div.rst-block code {
445 456 font: 12px "Bitstream Vera Sans Mono", "Courier", monospace
446 457 }
447 458
448 459 div.rst-block code {
449 460 font-size: 12px !important;
450 461 background-color: ghostWhite !important;
451 462 color: #444 !important;
452 463 padding: 0 .2em !important;
453 464 border: 1px solid #dedede !important
454 465 }
455 466
456 467 div.rst-block pre code {
457 468 padding: 0 !important;
458 469 font-size: 12px !important;
459 470 background-color: #eee !important;
460 471 border: none !important
461 472 }
462 473
463 474 div.rst-block pre {
464 475 margin: 1em 0;
465 476 padding: 15px;
466 477 border: 1px solid #eeeeee;
467 478 -webkit-border-radius: 2px;
468 479 -moz-border-radius: 2px;
469 480 border-radius: 2px;
470 481 overflow: auto;
471 482 font-size: 12px;
472 483 color: #444;
473 484 background-color: #F5F5F5
474 485 }
475 486
476 487
477 488 </style>
478 489
479 490 <!-- Targeting Windows Mobile -->
480 491 <!--[if IEMobile 7]>
481 492 <style type="text/css">
482 493
483 494 </style>
484 495 <![endif]-->
485 496
486 497 <!--[if gte mso 9]>
487 498 <style>
488 499 /* Target Outlook 2007 and 2010 */
489 500 </style>
490 501 <![endif]-->
491 502 </head>
492 503 <body>
504
505 <div>
493 506 <!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. -->
494 <table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="left" style="margin:1%;width:97%;padding:0;font-family:sans-serif;font-weight:100;border:1px solid #dbd9da">
507 <table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="left" style="margin:1%;width:97%;padding:0;font-family:${text_regular|n};font-weight:100;border:1px solid #dbd9da">
495 508 <tr>
496 509 <td valign="top" style="padding:0;">
497 510 <table cellpadding="0" cellspacing="0" border="0" align="left" width="100%">
498 511 <tr>
499 512 <td style="width:100%;padding:10px 15px;background-color:#202020" valign="top">
500 513 <a style="color:#eeeeee;text-decoration:none;" href="${instance_url}">
501 514 ${_('RhodeCode')}
502 515 % if rhodecode_instance_name:
503 516 - ${rhodecode_instance_name}
504 517 % endif
505 518 </a>
506 519 </td>
507 520 </tr>
508 521 <tr>
509 522 <td style="padding:15px;" valign="top">${self.body()}</td>
510 523 </tr>
511 524 </table>
512 525 </td>
513 526 </tr>
514 527 </table>
515 528 <!-- End of wrapper table -->
529 </div>
516 530
517 <div style="clear: both"></div>
518 <div style="margin-left:1%;font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace}">
531 <div style="width:100%; clear: both; height: 1px">&nbsp;</div>
532
533 <div style="margin-left:1%;font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace};">
519 534 ${_('This is a notification from RhodeCode.')}
520 <a style="font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace}" href="${instance_url}">
535 <a style="font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace};" href="${instance_url}">
521 536 ${instance_url}
522 537 </a>
523 538 </div>
524 539 </body>
525 540 </html>
General Comments 0
You need to be logged in to leave comments. Login now