浏览代码

Refactor HTML views with new data structures

Kailash Nadh 5 年之前
父节点
当前提交
e9685b2ce5
共有 3 个文件被更改,包括 28 次插入13 次删除
  1. 17 2
      email-templates/base.html
  2. 1 1
      email-templates/import-status.html
  3. 10 10
      public/templates/subscription.html

+ 17 - 2
email-templates/base.html

@@ -42,7 +42,20 @@
             .gutter {
             .gutter {
                 padding: 30px;
                 padding: 30px;
             }
             }
-
+            .button {
+                background: #7f2aff;
+                color: #fff !important;
+                display: inline-block;
+                border-radius: 3px;
+                padding: 10px 30px;
+                text-align: center;
+                text-decoration: none;
+                font-weight: bold;
+            }
+            .button:hover {
+                background: #222;
+                color: #fff;
+            }
             img {
             img {
                 max-width: 100%;
                 max-width: 100%;
             }
             }
@@ -67,7 +80,9 @@
     <div class="gutter">&nbsp;</div>
     <div class="gutter">&nbsp;</div>
     <div class="wrap">
     <div class="wrap">
         <div class="header">
         <div class="header">
-            <a href="{{ index . "RootURL" }}"><img src="{{ index . "RootURL" }}/public/static/logo.svg" alt="listmonk" /></a>
+            {{ if ne LogoURL "" }}
+                <a href="{{ RootURL }}"><img src="{{ LogoURL }}" alt="listmonk" /></a>
+            {{ end }}
         </div>
         </div>
 {{ end }}
 {{ end }}
 
 

+ 1 - 1
email-templates/import-status.html

@@ -4,7 +4,7 @@
 <table width="100%">
 <table width="100%">
     <tr>
     <tr>
         <td width="30%"><strong>File</strong></td>
         <td width="30%"><strong>File</strong></td>
-        <td><a href="{{ .RootURL }}/subscribers/import">{{ .Name }}</a></td>
+        <td><a href="{{ RootURL }}/subscribers/import">{{ .Name }}</a></td>
     </tr>
     </tr>
     <tr>
     <tr>
         <td width="30%"><strong>Status</strong></td>
         <td width="30%"><strong>Status</strong></td>

+ 10 - 10
public/templates/subscription.html

@@ -4,19 +4,19 @@
     <h2>Unsubscribe</h2>
     <h2>Unsubscribe</h2>
     <p>Do you wish to unsubscribe from this mailing list?</p>
     <p>Do you wish to unsubscribe from this mailing list?</p>
     <form method="post">
     <form method="post">
-        <p>
+        <div>
             <input type="hidden" name="unsubscribe" value="true" />
             <input type="hidden" name="unsubscribe" value="true" />
-        </p>
 
 
-        {{ if .Data.AllowBlacklist }}
-        <p>
-            <input id="privacy-blacklist" type="checkbox" name="blacklist" value="true" /> <label for="privacy-blacklist">Also unsubscribe from all future e-mails.</label>
-        </p>
+            {{ if .Data.AllowBlacklist }}
+                <p>
+                    <input id="privacy-blacklist" type="checkbox" name="blacklist" value="true" /> <label for="privacy-blacklist">Also unsubscribe from all future e-mails.</label>
+                </p>
+            {{ end }}
 
 
-        {{ end }}
-        <p>
-            <button type="submit" class="button" id="btn-unsub">Unsubscribe</button>
-        </p>
+            <p>
+                <button type="submit" class="button" id="btn-unsub">Unsubscribe</button>
+            </p>
+        </div>
     </form>
     </form>
 </section>
 </section>