瀏覽代碼

Fix default template rendering in Gmail with CSS inlining

Kailash Nadh 6 年之前
父節點
當前提交
9e34e7d39b
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      email-templates/default.tpl

+ 9 - 9
email-templates/default.tpl

@@ -1,8 +1,8 @@
 <!doctype html>
 <html>
     <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
         <base target="_blank">
 
         <style>
@@ -56,16 +56,16 @@
             }
         </style>
     </head>
-<body style="background-color: #F0F1F3;">
-    <div class="gutter">&nbsp;</div>
-    <div class="wrap">
+<body style="background-color: #F0F1F3;font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, sans-serif;font-size: 15px;line-height: 26px;margin: 0;color: #444;">
+    <div class="gutter" style="padding: 30px;">&nbsp;</div>
+    <div class="wrap" style="background-color: #fff;padding: 30px;max-width: 525px;margin: 0 auto;border-radius: 5px;">
         {{ template "content" . }}
     </div>
     
-    <div class="footer">
-        <p>Don't want to receive these e-mails? <a href="{{ .UnsubscribeURL }}">Unsubscribe</a></p>
-        <p>Powered by <a href="https://listmonk.app" target="_blank">listmonk</a></p>
+    <div class="footer" style="text-align: center;font-size: 12px;color: #888;">
+        <p>Don't want to receive these e-mails? <a href="{{ .UnsubscribeURL }}" style="color: #888;">Unsubscribe</a></p>
+        <p>Powered by <a href="https://listmonk.app" target="_blank" style="color: #888;">listmonk</a></p>
     </div>
-    <div class="gutter">&nbsp;{{ TrackView }}</div>
+    <div class="gutter" style="padding: 30px;">&nbsp;{{ TrackView }}</div>
 </body>
 </html>