소스 검색

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

Lukáš Matula 5 년 전
부모
커밋
099be31928
1개의 변경된 파일17개의 추가작업 그리고 6개의 파일을 삭제
  1. 17 6
      data/assets/templates/quarantine.tpl

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

@@ -1,5 +1,6 @@
 <html>
 <html>
   <head>
   <head>
+  <meta name="x-apple-disable-message-reformatting" />
   <style>
   <style>
   body {
   body {
     font-family: Helvetica, Arial, Sans-Serif;
     font-family: Helvetica, Arial, Sans-Serif;
@@ -15,12 +16,22 @@
     border-bottom: 1px solid #ddd;
     border-bottom: 1px solid #ddd;
     vertical-align: top;
     vertical-align: top;
   }
   }
+  td.fixed {
+    white-space: nowrap;
+  }
   th {
   th {
     background-color: #56B04C;
     background-color: #56B04C;
     color: white;
     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>
   </style>
   </head>
   </head>
   <body>
   <body>
@@ -31,15 +42,15 @@
     There are {{counter}} new messages waiting in quarantine:<br>
     There are {{counter}} new messages waiting in quarantine:<br>
     {% endif %}
     {% endif %}
     <table>
     <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 %}
     {% for line in meta %}
     <tr>
     <tr>
     <td>{{ line.subject|e }}</td>
     <td>{{ line.subject|e }}</td>
     <td>{{ line.sender|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 %}
     {% 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 %}
     {% endif %}
     </tr>
     </tr>
     {% endfor %}
     {% endfor %}