Browse Source

[Dovecot] Quarantine template: css for mobile devices (#3520)

Lukáš Matula 5 years ago
parent
commit
099be31928
1 changed files with 17 additions and 6 deletions
  1. 17 6
      data/assets/templates/quarantine.tpl

+ 17 - 6
data/assets/templates/quarantine.tpl

@@ -1,5 +1,6 @@
 <html>
   <head>
+  <meta name="x-apple-disable-message-reformatting" />
   <style>
   body {
     font-family: Helvetica, Arial, Sans-Serif;
@@ -15,12 +16,22 @@
     border-bottom: 1px solid #ddd;
     vertical-align: top;
   }
+  td.fixed {
+    white-space: nowrap;
+  }
   th {
     background-color: #56B04C;
     color: white;
   }
-  tr:nth-child(even){background-color: #f2f2f2}
-
+  tr:nth-child(even) {
+    background-color: #f2f2f2;
+  }
+  /* mobile devices */
+  @media all and (max-width: 480px) {
+    .mob {
+    display: none;
+    }    
+  }
   </style>
   </head>
   <body>
@@ -31,15 +42,15 @@
     There are {{counter}} new messages waiting in quarantine:<br>
     {% endif %}
     <table>
-    <tr><th>Subject</th><th>Sender</th><th>Score</th><th>Arrived on</th>{% if quarantine_acl == 1 %}<th>Actions</th>{% endif %}</tr>
+    <tr><th>Subject</th><th>Sender</th><th class="mob">Score</th><th class="mob">Arrived on</th>{% if quarantine_acl == 1 %}<th>Actions</th>{% endif %}</tr>
     {% for line in meta %}
     <tr>
     <td>{{ line.subject|e }}</td>
     <td>{{ line.sender|e }}</td>
-    <td>{{ line.score }}</td>
-    <td>{{ line.created }}</td>
+    <td class="mob">{{ line.score }}</td>
+    <td class="mob">{{ line.created }}</td>
     {% if quarantine_acl == 1 %}
-    <td><a href="https://{{ hostname }}/qhandler/release/{{ line.qhash }}">release</a> | <a href="https://{{ hostname }}/qhandler/delete/{{ line.qhash }}">delete</a></td>
+    <td class="fixed"><a href="https://{{ hostname }}/qhandler/release/{{ line.qhash }}">release</a> | <a href="https://{{ hostname }}/qhandler/delete/{{ line.qhash }}">delete</a></td>
     {% endif %}
     </tr>
     {% endfor %}