##// END OF EJS Templates
emails: improve fonts and rendering of email htmls....
dan -
r3170:47569100 default
parent child Browse files
Show More
@@ -1,131 +1,142 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 <pre style="display:inline;border-radius:2px;font-size:12px;padding:.2em;${color_scheme.get(tag_type, color_scheme['default'])}">${text}</pre>
14 14 </%def>
15 15
16 16 <%def name="status_text(text, tag_type=None)">
17 17 <%
18 18 color_scheme = {
19 19 'default': 'color:#666666',
20 20 'approved': 'color:#0ac878',
21 21 'rejected': 'color:#e85e4d',
22 22 'under_review': 'color:#ffc854',
23 23 }
24 24 %>
25 25 <span style="font-weight:bold;font-size:12px;padding:.2em;${color_scheme.get(tag_type, color_scheme['default'])}">${text}</span>
26 26 </%def>
27 27
28 ## Constants
29 <%
30 text_regular = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;"
31 text_monospace = "'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;"
32
33 %>
34
28 35 ## headers we additionally can set for email
29 36 <%def name="headers()" filter="n,trim"></%def>
30 37
31 38 <%def name="plaintext_footer()">
32 39 ${_('This is a notification from RhodeCode. %(instance_url)s') % {'instance_url': instance_url}}
33 40 </%def>
34 41
35 42 <%def name="body_plaintext()" filter="n,trim">
36 43 ## this example is not called itself but overridden in each template
37 44 ## the plaintext_footer should be at the bottom of both html and text emails
38 45 ${self.plaintext_footer()}
39 46 </%def>
40 47
41 48 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
42 49 <html xmlns="http://www.w3.org/1999/xhtml">
43 50 <head>
44 51 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
45 52 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
46 53 <title>${self.subject()}</title>
47 54 <style type="text/css">
48 55 /* Based on The MailChimp Reset INLINE: Yes. */
49 56 #outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
50 body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;}
57 body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0; font-family: ${text_regular|n}}
51 58 /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
52 59 .ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
53 60 .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
54 61 /* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */
55 62 #backgroundTable {margin:0; padding:0; line-height: 100% !important;}
56 63 /* End reset */
57 64
58 65 /* defaults for images*/
59 66 img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;}
60 67 a img {border:none;}
61 68 .image_fix {display:block;}
62 69
63 70 body {line-height:1.2em;}
64 71 p {margin: 0 0 20px;}
65 72 h1, h2, h3, h4, h5, h6 {color:#323232!important;}
66 73 a {color:#427cc9;text-decoration:none;outline:none;cursor:pointer;}
67 74 a:focus {outline:none;}
68 75 a:hover {color: #305b91;}
69 76 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color:#427cc9!important;text-decoration:none!important;}
70 77 h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {color: #305b91!important;}
71 78 h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {color: #305b91!important;}
72 79 table {font-size:13px;border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;}
73 80 table td {padding:.65em 1em .65em 0;border-collapse:collapse;vertical-align:top;text-align:left;}
74 81 input {display:inline;border-radius:2px;border-style:solid;border: 1px solid #dbd9da;padding:.5em;}
75 82 input:focus {outline: 1px solid #979797}
76 83 @media only screen and (-webkit-min-device-pixel-ratio: 2) {
77 84 /* Put your iPhone 4g styles in here */
78 85 }
79 86
80 87 /* Android targeting */
81 88 @media only screen and (-webkit-device-pixel-ratio:.75){
82 89 /* Put CSS for low density (ldpi) Android layouts in here */
83 90 }
84 91 @media only screen and (-webkit-device-pixel-ratio:1){
85 92 /* Put CSS for medium density (mdpi) Android layouts in here */
86 93 }
87 94 @media only screen and (-webkit-device-pixel-ratio:1.5){
88 95 /* Put CSS for high density (hdpi) Android layouts in here */
89 96 }
90 97 /* end Android targeting */
91 98
92 99 </style>
93 100
94 101 <!-- Targeting Windows Mobile -->
95 102 <!--[if IEMobile 7]>
96 103 <style type="text/css">
97 104
98 105 </style>
99 106 <![endif]-->
100 107
101 108 <!--[if gte mso 9]>
102 109 <style>
103 110 /* Target Outlook 2007 and 2010 */
104 111 </style>
105 112 <![endif]-->
106 113 </head>
107 114 <body>
108 115 <!-- 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. -->
109 116 <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">
110 117 <tr>
111 118 <td valign="top" style="padding:0;">
112 119 <table cellpadding="0" cellspacing="0" border="0" align="left" width="100%">
113 120 <tr><td style="width:100%;padding:7px;background-color:#202020" valign="top">
114 121 <a style="color:#eeeeee;text-decoration:none;" href="${instance_url}">
115 122 ${_('RhodeCode')}
116 123 % if rhodecode_instance_name:
117 124 - ${rhodecode_instance_name}
118 125 % endif
119 126 </a>
120 127 </td></tr>
121 128 <tr><td style="padding:15px;" valign="top">${self.body()}</td></tr>
122 129 </table>
123 130 </td>
124 131 </tr>
125 132 </table>
126 133 <!-- End of wrapper table -->
127 <p><a style="margin-top:15px;margin-left:1%;font-family:sans-serif;font-weight:100;font-size:11px;color:#666666;text-decoration:none;" href="${instance_url}">
134
135 <div style="clear: both"></div>
136 <p>
137 <a style="margin-top:15px;margin-left:1%;font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace} " href="${instance_url}">
128 138 ${self.plaintext_footer()}
129 </a></p>
139 </a>
140 </p>
130 141 </body>
131 142 </html>
General Comments 0
You need to be logged in to leave comments. Login now