2012-08-14 18:05:45 +00:00
< ? php
/**
* Email Header
*
* @ author WooThemes
* @ package WooCommerce / Templates / Emails
2012-09-17 10:36:24 +00:00
* @ version 1.7 . 0
2012-08-14 18:05:45 +00:00
*/
2012-09-17 10:36:24 +00:00
// Load colours
$bg = get_option ( 'woocommerce_email_background_color' );
$body = get_option ( 'woocommerce_email_body_background_color' );
$base = get_option ( 'woocommerce_email_base_color' );
$base_text = woocommerce_light_or_dark ( $base , '#202020' , '#ffffff' );
$text = get_option ( 'woocommerce_email_text_color' );
$bg_darker_10 = woocommerce_hex_darker ( $bg , 10 );
$base_lighter_20 = woocommerce_hex_lighter ( $base , 20 );
$text_lighter_20 = woocommerce_hex_lighter ( $text , 20 );
$text_lighter_40 = woocommerce_hex_lighter ( $text , 40 );
$text_darker_50 = woocommerce_hex_darker ( $text , 50 );
// For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline.
$wrapper = "
background - image : url ( data : image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAANklEQVQYV2NkIAIwEqFGkpAiSaAhzwkpAluESxHYBJhTsClCUYDPJBT / IJuEYQK6dTgVgBQCAG5EBSOuEsbJAAAAAElFTkSuQmCC );
background - repeat : repeat - y no - repeat ;
background - position : top center ;
background - color : $bg ;
width : 100 % ! important ;
- webkit - text - size - adjust : none ;
margin : 0 ;
padding : 70 px 0 70 px 0 ;
" ;
$template_container = "
- webkit - box - shadow : 0 0 0 3 px rgba ( 0 , 0 , 0 , 0.025 );
- webkit - border - radius : 6 px ;
background - color : $body ;
border : 1 px solid $bg_darker_10 ;
- webkit - border - radius : 6 px ;
" ;
$template_header = "
background - color : $base ;
color : $base_text ;
- webkit - border - top - left - radius : 6 px ;
- webkit - border - top - right - radius : 6 px ;
border - bottom : 0 ;
font - family : Arial ;
font - weight : bold ;
line - height : 100 % ;
vertical - align : middle ;
" ;
$body_content = "
background - color : $body ;
- webkit - border - radius : 6 px ;
" ;
$body_content_inner = "
color : $text_lighter_20 ;
font - family : Arial ;
font - size : 14 px ;
line - height : 150 % ;
text - align : left ;
" ;
$header_content_h1 = "
color : $base_text ! important ;
margin : 0 ;
padding : 28 px 24 px ;
text - shadow : 0 1 px 0 $base_lighter_20 ;
" ;
2012-08-14 18:05:45 +00:00
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2011-08-16 14:06:08 +00:00
< html >
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=UTF-8 " />
< title >< ? php echo get_bloginfo ( 'name' ); ?> </title>
< style type = " text/css " >
2012-09-17 10:36:24 +00:00
/* Styles for elements that are added dyanmically - we can't show them inline */
img { border : none ; font - size : 14 px ; font - weight : bold ; height : auto ; line - height : 100 % ; outline : none ; text - decoration : none ; text - transform : capitalize ; }
2012-01-10 16:43:06 +00:00
mark { background : transparent none ; color : inherit ; }
2011-10-25 12:54:16 +00:00
h1 , . h1 ,
h2 , . h2 ,
2012-09-17 10:36:24 +00:00
h3 , . h3 {
color : < ? php echo $text_darker_50 ; ?> ;
2011-08-16 14:06:08 +00:00
display : block ;
font - family : Arial ;
font - size : 34 px ;
font - weight : bold ;
line - height : 150 % ;
margin - top : 0 ;
margin - right : 0 ;
margin - bottom : 10 px ;
margin - left : 0 ;
text - align : left ;
2011-09-13 15:04:40 +00:00
line - height : 1.5 ;
2011-08-16 14:06:08 +00:00
}
2012-09-17 10:36:24 +00:00
h2 , . h2 { font - size : 30 px ; }
h3 , . h3 { font - size : 26 px ; }
. header_content a : link , . header_content a : visited {
color :< ? php echo $base_text ; ?> ;
2011-08-16 14:06:08 +00:00
font - weight : normal ;
text - decoration : underline ;
}
2012-09-17 10:36:24 +00:00
. body_content div a : link , . body_content div a : visited {
color : < ? php echo $text ; ?> ;
2011-08-16 14:06:08 +00:00
font - weight : normal ;
text - decoration : underline ;
}
2012-09-17 10:36:24 +00:00
. body_content img {
2011-08-16 14:06:08 +00:00
display : inline ;
height : auto ;
}
2012-09-17 10:36:24 +00:00
. footer_content div a : link , . footer_content div a : visited {
color :< ? php echo $text_lighter_40 ; ?> ;
2011-08-16 14:06:08 +00:00
font - weight : normal ;
text - decoration : underline ;
}
</ style >
</ head >
2012-09-17 10:36:24 +00:00
< body leftmargin = " 0 " marginwidth = " 0 " topmargin = " 0 " marginheight = " 0 " offset = " 0 " >
< center style = " <?php echo $wrapper ; ?> " >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " height = " 100% " width = " 100% " >
2011-08-16 14:06:08 +00:00
< tr >
< td align = " center " valign = " top " >
2011-10-26 17:13:29 +00:00
< ? php
2012-09-17 10:36:24 +00:00
if ( $img = get_option ( 'woocommerce_email_header_image' ) ) {
echo '<p style="margin-top:0;"><img src="' . $img . '" alt="' . get_bloginfo ( 'name' ) . '" /></p>' ;
}
2011-10-26 17:13:29 +00:00
?>
2012-09-17 10:36:24 +00:00
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 600 " id = " template_container " style = " <?php echo $template_container ; ?> " >
2011-08-16 14:06:08 +00:00
< tr >
< td align = " center " valign = " top " >
2012-09-17 10:36:24 +00:00
<!-- Header -->
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 600 " id = " template_header " style = " <?php echo $template_header ; ?> " bgcolor = " <?php echo $base ; ?> " >
2011-08-16 14:06:08 +00:00
< tr >
2012-09-17 10:36:24 +00:00
< td class = " header_content " >
2012-08-14 18:05:45 +00:00
2012-09-17 10:36:24 +00:00
< h1 class = " h1 " style = " <?php echo $header_content_h1 ; ?> " >< ? php echo $email_heading ; ?> </h1>
2011-08-16 14:06:08 +00:00
</ td >
</ tr >
</ table >
2012-09-17 10:36:24 +00:00
<!-- End Header -->
2011-08-16 14:06:08 +00:00
</ td >
</ tr >
< tr >
< td align = " center " valign = " top " >
2012-09-17 10:36:24 +00:00
<!-- Body -->
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 600 " id = " template_body " >
2011-08-16 14:06:08 +00:00
< tr >
2012-09-17 10:36:24 +00:00
< td valign = " top " class = " body_content " style = " <?php echo $body_content ; ?> " >
<!-- Content -->
2011-08-16 14:06:08 +00:00
< table border = " 0 " cellpadding = " 20 " cellspacing = " 0 " width = " 100% " >
< tr >
< td valign = " top " >
2012-09-17 10:36:24 +00:00
< div style = " <?php echo $body_content_inner ; ?> " >