| 1 |
<?php |
| 2 |
// don't load directly |
| 3 |
if ( !defined('ABSPATH') ) |
| 4 |
die('-1'); |
| 5 |
|
| 6 |
// Load colours |
| 7 |
$bg = uwp_get_option( 'email_background_color', '#f5f5f5' ); |
| 8 |
$body = uwp_get_option( 'email_body_background_color', '#fdfdfd' ); |
| 9 |
$base = uwp_get_option( 'email_base_color', '#557da2' ); |
| 10 |
$base_text = uwp_light_or_dark( $base, '#202020', '#ffffff' ); |
| 11 |
$text = uwp_get_option( 'email_text_color', '#505050' ); |
| 12 |
|
| 13 |
$bg_darker_10 = uwp_hex_darker( $bg, 10 ); |
| 14 |
$body_darker_10 = uwp_hex_darker( $body, 10 ); |
| 15 |
$base_lighter_20 = uwp_hex_lighter( $base, 20 ); |
| 16 |
$base_lighter_40 = uwp_hex_lighter( $base, 40 ); |
| 17 |
$text_lighter_20 = uwp_hex_lighter( $text, 20 ); |
| 18 |
|
| 19 |
$header_bg = uwp_get_option( 'email_header_background_color', '#555555' ); |
| 20 |
$header_color = uwp_get_option( 'email_header_text_color', '#ffffff' ); |
| 21 |
$header_bg_darker_10 = uwp_hex_darker( $header_bg, 10 ); |
| 22 |
|
| 23 |
$footer_bg = uwp_get_option( 'email_footer_background_color', '#666666' ); |
| 24 |
$footer_color = uwp_get_option( 'email_footer_text_color', '#dddddd' ); |
| 25 |
$footer_bg_darker_10 = uwp_hex_darker( $footer_bg, 10 ); |
| 26 |
|
| 27 |
if ( empty( $body ) ) { $body = 'transparent'; } |
| 28 |
if ( empty( $bg_darker_10 ) ) { $bg_darker_10 = 'transparent'; } |
| 29 |
if ( empty( $header_bg ) ) { $header_bg = 'transparent'; } |
| 30 |
if ( empty( $header_bg_darker_10 ) ) { $header_bg_darker_10 = 'transparent'; } |
| 31 |
if ( empty( $footer_bg ) ) { $footer_bg = 'transparent'; } |
| 32 |
if ( empty( $footer_bg_darker_10 ) ) { $footer_bg_darker_10 = 'transparent'; } |
| 33 |
|
| 34 |
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
| 35 |
?> |
| 36 |
#wrapper { |
| 37 |
background-color: <?php echo esc_attr( $bg ); ?>; |
| 38 |
margin: 0; |
| 39 |
-webkit-text-size-adjust: none !important; |
| 40 |
padding: 3%; |
| 41 |
width: 94%; |
| 42 |
} |
| 43 |
#wrapper > p { |
| 44 |
height: 0; |
| 45 |
margin: 0; |
| 46 |
padding: 0; |
| 47 |
} |
| 48 |
#wrapper .wrapper-table { |
| 49 |
margin: auto; |
| 50 |
max-width: 900px; |
| 51 |
width: 100%; |
| 52 |
} |
| 53 |
#template_body { |
| 54 |
background-color: <?php echo esc_attr( $body ); ?>; |
| 55 |
border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>; |
| 56 |
border-radius: 3px !important; |
| 57 |
box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important; |
| 58 |
} |
| 59 |
#template_header { |
| 60 |
background-color: <?php echo esc_attr( $header_bg ); ?>; |
| 61 |
border: 1px solid <?php echo esc_attr( $header_bg_darker_10 ); ?>; |
| 62 |
padding: 15px; |
| 63 |
} |
| 64 |
#template_header, |
| 65 |
#template_header a { |
| 66 |
color: <?php echo esc_attr( $header_color ); ?>; |
| 67 |
font-family: Arial; |
| 68 |
} |
| 69 |
#template_footer { |
| 70 |
background-color: <?php echo esc_attr( $footer_bg ); ?>; |
| 71 |
border: 1px solid <?php echo esc_attr( $footer_bg_darker_10 ); ?>; |
| 72 |
text-align:center; |
| 73 |
padding: 10px 30px 10px 30px; |
| 74 |
} |
| 75 |
#template_footer, |
| 76 |
#template_footer a { |
| 77 |
color: <?php echo esc_attr( $footer_color ); ?>; |
| 78 |
font-family: Arial; |
| 79 |
font-size:12px; |
| 80 |
} |
| 81 |
#footer_text > p { |
| 82 |
margin: .5em 0; |
| 83 |
} |
| 84 |
#template_heading { |
| 85 |
background-color: <?php echo esc_attr( $base ); ?>; |
| 86 |
border-radius: 3px 3px 0 0 !important; |
| 87 |
color: <?php echo esc_attr( $base_text ); ?>; |
| 88 |
border-bottom: 0; |
| 89 |
font-weight: bold; |
| 90 |
line-height: 100%; |
| 91 |
vertical-align: middle; |
| 92 |
font-family: Arial,Helvetica,sans-serif; |
| 93 |
} |
| 94 |
#template_header_logo { |
| 95 |
width: 100%; |
| 96 |
} |
| 97 |
#template_header_logo > p { |
| 98 |
margin: 0; |
| 99 |
font-size: 1.5em; |
| 100 |
} |
| 101 |
#template_heading h1 { |
| 102 |
color: <?php echo esc_attr( $base_text ); ?>; |
| 103 |
} |
| 104 |
#template_footer td { |
| 105 |
padding: 0; |
| 106 |
-webkit-border-radius: 6px; |
| 107 |
font-size: 14px; |
| 108 |
} |
| 109 |
#body_content { |
| 110 |
background-color: <?php echo esc_attr( $body ); ?>; |
| 111 |
} |
| 112 |
#body_content table td { |
| 113 |
padding: 27px; |
| 114 |
} |
| 115 |
#body_content table td td { |
| 116 |
padding: 10px; |
| 117 |
} |
| 118 |
#body_content table td th { |
| 119 |
padding: 10px; |
| 120 |
} |
| 121 |
#body_content p { |
| 122 |
margin: 0 0 16px; |
| 123 |
} |
| 124 |
#body_content_inner { |
| 125 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 126 |
font-family: Arial,Helvetica,sans-serif; |
| 127 |
font-size: 14px; |
| 128 |
line-height: 150%; |
| 129 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 130 |
} |
| 131 |
.td { |
| 132 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 133 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 134 |
} |
| 135 |
.text { |
| 136 |
color: <?php echo esc_attr( $text ); ?>; |
| 137 |
font-family: Arial,Helvetica,sans-serif; |
| 138 |
} |
| 139 |
.link { |
| 140 |
color: <?php echo esc_attr( $base ); ?>; |
| 141 |
} |
| 142 |
#header_wrapper { |
| 143 |
padding: 22px 24px; |
| 144 |
display: block; |
| 145 |
} |
| 146 |
h1 { |
| 147 |
color: <?php echo esc_attr( $base ); ?>; |
| 148 |
font-family: Arial,Helvetica,sans-serif; |
| 149 |
font-size: 30px; |
| 150 |
font-weight: 300; |
| 151 |
line-height: 150%; |
| 152 |
margin: 0; |
| 153 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 154 |
text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>; |
| 155 |
-webkit-font-smoothing: antialiased; |
| 156 |
} |
| 157 |
h2 { |
| 158 |
color: <?php echo esc_attr( $base ); ?>; |
| 159 |
display: block; |
| 160 |
font-family: Arial,Helvetica,sans-serif; |
| 161 |
font-size: 18px; |
| 162 |
font-weight: bold; |
| 163 |
line-height: 130%; |
| 164 |
margin: 16px 0 8px; |
| 165 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 166 |
} |
| 167 |
h3 { |
| 168 |
color: <?php echo esc_attr( $base ); ?>; |
| 169 |
display: block; |
| 170 |
font-family: Arial,Helvetica,sans-serif; |
| 171 |
font-size: 16px; |
| 172 |
font-weight: bold; |
| 173 |
line-height: 130%; |
| 174 |
margin: 16px 0 8px; |
| 175 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 176 |
} |
| 177 |
a { |
| 178 |
color: <?php echo esc_attr( $base ); ?>; |
| 179 |
font-weight: normal; |
| 180 |
text-decoration: underline; |
| 181 |
} |
| 182 |
img { |
| 183 |
border: none; |
| 184 |
display: inline; |
| 185 |
font-size: 14px; |
| 186 |
font-weight: bold; |
| 187 |
height: auto; |
| 188 |
line-height: 100%; |
| 189 |
outline: none; |
| 190 |
text-decoration: none; |
| 191 |
text-transform: capitalize; |
| 192 |
vertical-align: middle; |
| 193 |
} |
| 194 |
.table-bordered { |
| 195 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 196 |
border-collapse: collapse; |
| 197 |
border-spacing: 0; |
| 198 |
width: 100%; |
| 199 |
} |
| 200 |
.table-bordered th, |
| 201 |
.table-bordered td { |
| 202 |
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 203 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 204 |
font-size: 14px; |
| 205 |
} |
| 206 |
.small { |
| 207 |
font-size: 85%; |
| 208 |
} |
| 209 |
.bold { |
| 210 |
font-weight: bold; |
| 211 |
} |
| 212 |
.normal { |
| 213 |
font-weight: normal; |
| 214 |
} |
| 215 |
.text-left { |
| 216 |
text-align: left; |
| 217 |
} |
| 218 |
.text-right { |
| 219 |
text-align: right; |
| 220 |
} |
| 221 |
.text-center { |
| 222 |
text-align: center; |
| 223 |
} |
| 224 |
.text-justify { |
| 225 |
text-align: justify; |
| 226 |
} |
| 227 |
.text-nowrap { |
| 228 |
white-space: nowrap; |
| 229 |
} |
| 230 |
.text-lowercase { |
| 231 |
text-transform: lowercase; |
| 232 |
} |
| 233 |
.text-uppercase { |
| 234 |
text-transform: uppercase; |
| 235 |
} |
| 236 |
.text-capitalize { |
| 237 |
text-transform: capitalize; |
| 238 |
} |
| 239 |
.btn { |
| 240 |
display: inline-block; |
| 241 |
padding: 0.2rem .6rem; |
| 242 |
font-size: 95%; |
| 243 |
font-weight: normal; |
| 244 |
line-height: 1.5; |
| 245 |
text-align: center; |
| 246 |
white-space: nowrap; |
| 247 |
vertical-align: middle; |
| 248 |
cursor: pointer; |
| 249 |
-webkit-user-select: none; |
| 250 |
-moz-user-select: none; |
| 251 |
-ms-user-select: none; |
| 252 |
user-select: none; |
| 253 |
border: 1px solid transparent; |
| 254 |
border-radius: .25rem; |
| 255 |
text-decoration: none; |
| 256 |
} |
| 257 |
.btn-default { |
| 258 |
color: <?php echo esc_attr( $base_text ); ?>; |
| 259 |
background-color: <?php echo esc_attr( $base ); ?>; |
| 260 |
border-color: <?php echo esc_attr( $base ); ?>; |
| 261 |
} |
| 262 |
.btn-primary { |
| 263 |
color: #fff; |
| 264 |
background-color: #0275d8; |
| 265 |
border-color: #0275d8; |
| 266 |
} |
| 267 |
.btn-success { |
| 268 |
color: #fff; |
| 269 |
background-color: #5cb85c; |
| 270 |
border-color: #5cb85c; |
| 271 |
} |