templates/layout_email.html.twig line 1

Open in your IDE?
  1. {# email general layout #}
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5.     <meta charset="utf-8"> <!-- utf-8 works for most cases -->
  6.     <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
  7.     <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
  8.         
  9.     <title>Premium Beauty Media</title> <!-- The title tag shows in email notifications, like Android 4.4. -->
  10.     <!-- Web Font / @font-face : BEGIN -->
  11.     <!-- NOTE: If web fonts are not required, lines 9 - 26 can be safely removed. -->
  12.     
  13.     <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
  14.     <!--[if mso]>
  15.         <style>
  16.             * {
  17.                 font-family: sans-serif !important;
  18.             }
  19.         </style>
  20.     <![endif]-->
  21.     
  22.     <!--[if !mso]><!-->
  23.         <!-- insert web font reference -->
  24.                 <link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
  25.     <!--<![endif]-->
  26.     <!-- Web Font / @font-face : END -->
  27.     
  28.     <!-- CSS Reset -->
  29.     <style type="text/css">
  30.         /* What it does: Remove spaces around the email design added by some email clients. */
  31.         /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
  32.         html,
  33.         body {
  34.             margin: 0 auto !important;
  35.             padding: 0 !important;
  36.             height: 100% !important;
  37.             width: 100% !important;
  38.         }
  39.         
  40.         /* What it does: Stops email clients resizing small text. */
  41.         * {
  42.             -ms-text-size-adjust: 100%;
  43.             -webkit-text-size-adjust: 100%;
  44.         }
  45.         
  46.         /* What it does: Centers email on Android 4.4 */
  47.         div[style*="margin: 16px 0"] {
  48.             margin:0 !important;
  49.         }
  50.         
  51.         /* What it does: Stops Outlook from adding extra spacing to tables. */
  52.         table,
  53.         td {
  54.             mso-table-lspace: 0pt !important;
  55.             mso-table-rspace: 0pt !important;
  56.         }
  57.                 
  58.         /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
  59.         table {
  60.             border-spacing: 0 !important;
  61.             border-collapse: collapse !important;
  62.             table-layout: fixed !important;
  63.             Margin: 0 auto !important;
  64.         }
  65.         table table table {
  66.             table-layout: auto; 
  67.         }
  68.         
  69.         /* What it does: Uses a better rendering method when resizing images in IE. */
  70.         img {
  71.             -ms-interpolation-mode:bicubic;
  72.         }
  73.         
  74.         /* What it does: A work-around for iOS meddling in triggered links. */
  75.         .mobile-link--footer a,
  76.         a[x-apple-data-detectors] {
  77.             color:inherit !important;
  78.             text-decoration: underline !important;
  79.         }
  80.       
  81.     </style>
  82.     
  83.     <!-- Progressive Enhancements -->
  84.     <style>
  85.         
  86.         /* What it does: Hover styles for buttons */
  87.         .button-td,
  88.         .button-a {
  89.             transition: all 100ms ease-in;
  90.         }
  91.         .button-td:hover,
  92.         .button-a:hover {
  93.             background: #5294ce !important;
  94.             border-color: #5294ce !important;
  95.         }
  96.         /* Media Queries */
  97.         @media screen and (max-width: 480px) {
  98.             /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */
  99.             .fluid,
  100.             .fluid-centered {
  101.                 width: 100% !important;
  102.                 max-width: 100% !important;
  103.                 height: auto !important;
  104.                 Margin-left: auto !important;
  105.                 Margin-right: auto !important;
  106.             }
  107.             /* And center justify these ones. */
  108.             .fluid-centered {
  109.                 Margin-left: auto !important;
  110.                 Margin-right: auto !important;
  111.             }
  112.             /* What it does: Forces table cells into full-width rows. */
  113.             .stack-column,
  114.             .stack-column-center {
  115.                 display: block !important;
  116.                 width: 100% !important;
  117.                 max-width: 100% !important;
  118.                 direction: ltr !important;
  119.             }
  120.             /* And center justify these ones. */
  121.             .stack-column-center {
  122.                 text-align: center !important;
  123.             }
  124.         
  125.             /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */
  126.             .center-on-narrow {
  127.                 text-align: center !important;
  128.                 display: block !important;
  129.                 Margin-left: auto !important;
  130.                 Margin-right: auto !important;
  131.                 float: none !important;
  132.             }
  133.             table.center-on-narrow {
  134.                 display: inline-block !important;
  135.             }
  136.                 
  137.         }
  138.     </style>
  139. </head>
  140. <body width="100%" bgcolor="#FFFFFF" style="margin: 0;">
  141.     <center style="width: 100%; background: #FFFFFF;">
  142.         <!-- Visually Hidden Preheader Text : BEGIN -->
  143.         <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">
  144.             {{appname}}
  145.         </div>
  146.         <!-- Visually Hidden Preheader Text : END -->
  147.         <!--    
  148.             Set the email width. Defined in two places:
  149.             1. max-width for all clients except Desktop Windows Outlook, allowing the email to squish on narrow but never go wider than 680px.
  150.             2. MSO tags for Desktop Windows Outlook enforce a 680px width.
  151.         -->
  152.         <div style="max-width: 680px; margin: auto;">
  153.             <!--[if (gte mso 9)|(IE)]>
  154.             <table cellspacing="0" cellpadding="0" border="0" width="680" align="center">
  155.             <tr>
  156.             <td>
  157.             <![endif]-->
  158.             <!-- Email Header : BEGIN -->
  159.             <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;">
  160.                 <tr>
  161.                     <td style="padding: 20px 0; text-align: center">
  162.                     <h2 style="font-family: Roboto, sans-serif; font-size:16px; margin-top: 1em; margin-bottom: 1em;">{{appname}}</h2>
  163.                     </td>
  164.                 </tr>
  165.             </table>
  166.             <!-- Email Header : END -->
  167.             
  168.             <!-- Email Body : BEGIN -->
  169.             <table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="100%" style="max-width: 680px;  border: 1px solid #CCCCCC">
  170.                 
  171.                 <!-- 1 Column : BEGIN -->
  172.                 <tr>
  173.                     <td>
  174.                         <table cellspacing="0" cellpadding="0" border="0" width="100%">
  175.                             <tr>
  176.                                 <td style="padding: 5px 40px 10px 40px; text-align: center; font-family: Roboto, sans-serif; font-size: 15px; mso-height-rule: exactly; line-height: 20px; color: #555555;">
  177. {% block content %} {% endblock %}
  178.     
  179.                                 </td>
  180.                             </tr>
  181.                         </table>
  182.                     </td>
  183.                 </tr>
  184.                 <!-- 1 Column : END -->
  185.                 
  186.                
  187.             </table>
  188.             <!-- Email Body : END -->
  189.           
  190.             <!-- Email Footer : BEGIN -->
  191.             <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;">
  192.                 <tr>
  193.                     <td style="padding: 30px 10px;width: 100%;font-size: 12px; font-family: sans-serif; mso-height-rule: exactly; line-height:18px; text-align: center; color: #888888;">
  194.                         PREMIUM BEAUTY MEDIA SAS - 9/11 rue du Mail - 75002 Paris - France
  195.                     </td>
  196.                 </tr>
  197.             </table>
  198.             <!-- Email Footer : END -->
  199.             <!--[if (gte mso 9)|(IE)]>
  200.             </td>
  201.             </tr>
  202.             </table>
  203.             <![endif]-->
  204.         </div>
  205.     </center>
  206. </body>
  207. </html>