summaryrefslogtreecommitdiff
path: root/app/views/layouts/_mailer.html.haml
blob: 95ebe09a2e62a183cd0422857ea93afde61fde03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
%html{ lang: "en" }
  %head
    %meta{ content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type" }/
    %meta{ content: "width=device-width, initial-scale=1", name: "viewport" }/
    %meta{ content: "IE=edge", "http-equiv" => "X-UA-Compatible" }/
    %title= message.subject

    -# Avoid premailer processing of client-specific styles (@media tag not supported)
    -# We need to inline the contents here because mail clients (e.g. iOS Mail, Outlook)
    -# do not support linked stylesheets.
    %style{ type: 'text/css', 'data-premailer': 'ignore' }
      = asset_to_string('mailer_client_specific.css').html_safe

    = stylesheet_link_tag 'mailer.css'
  %body
    = yield :preview_text
    %table#body{ border: "0", cellpadding: "0", cellspacing: "0" }
      %tbody
        %tr.line
          %td
        %tr.header
          %td
            = html_header_message
            = header_logo
        %tr
          %td
            %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0" }
              %tbody
                %tr
                  %td.wrapper-cell
                    %table.content{ border: "0", cellpadding: "0", cellspacing: "0" }
                      %tbody
                        = yield

        = render_if_exists 'layouts/mailer/additional_text'

        = yield :footer

        = yield :additional_footer
        %tr
          %td.footer-message
            = html_footer_message