Jelajahi Sumber

fix files icons greying out on public index

Nick Sweeting 4 tahun lalu
induk
melakukan
5c54bcc1f3

+ 1 - 1
archivebox/index/html.py

@@ -121,7 +121,7 @@ def snapshot_icons(snapshot) -> str:
     path = link.archive_path
     canon = link.canonical_outputs()
     output = ""
-    output_template = '<a href="/{}/{}" class="exists-{}" title="{}">{} </a>'
+    output_template = '<a href="/{}/{}" class="exists-{}" title="{}">{}</a> &nbsp;'
     icons = {
         "singlefile": "❶",
         "wget": "🆆",

+ 0 - 8
archivebox/themes/default/main_index.html

@@ -185,14 +185,6 @@
             .title-col a {
                 color: black;
             }
-            .tags {
-                float: right;
-                border-radius: 5px;
-                background-color: #bfdfff;
-                padding: 2px 5px;
-                margin-left: 4px;
-                margin-top: 1px;
-            }
         </style>
         <link rel="stylesheet" href="{% static 'bootstrap.min.css' %}">
         <link rel="stylesheet" href="{% static 'jquery.dataTables.min.css' %}"/>

+ 9 - 9
archivebox/themes/default/main_index_row.html

@@ -2,7 +2,7 @@
 
 <tr>
     <td title="{{link.timestamp}}"> {% if link.bookmarked_date  %} {{ link.bookmarked_date }} {% else %} {{ link.added }} {% endif %} </td>
-    <td class="title-col">
+    <td class="title-col" style="opacity: {% if link.title %}1{% else %}0.3{% endif %}">
         {% if link.is_archived %}
             <a href="archive/{{link.timestamp}}/index.html"><img src="archive/{{link.timestamp}}/favicon.ico" class="link-favicon" decoding="async"></a>
         {% else %}
@@ -23,15 +23,15 @@
         </a>
     </td>
     <td>
-        <a href="archive/{{link.timestamp}}/index.html">📄 
-            <span data-number-for="{{link.url}}" title="Fetching any missing files...">
-                {% if link.icons  %}
-                    {{link.icons}}
-                {% else %}
+        <span data-number-for="{{link.url}}" title="Fetching any missing files...">
+            {% if link.icons  %}
+                {{link.icons}} <small style="float:right; opacity: 0.5">{{link.num_outputs}}</small>
+            {% else %}
+                <a href="archive/{{link.timestamp}}/index.html">📄 
                     {{link.num_outputs}} <img src="{% static 'spinner.gif' %}" class="files-spinner" decoding="async"/>
-                {% endif %}
-            </span>
-        </a>
+                </a>
+            {% endif %}
+        </span>
     </td>
    <td style="text-align:left"><a href="{{link.url}}">{{link.url}}</a></td>
 </tr>

+ 6 - 1
archivebox/themes/default/static/admin.css

@@ -224,7 +224,7 @@ body.model-snapshot.change-list #content .object-tools {
   100% { transform: rotate(360deg); }
 }
 
-.tags > a > .tag {
+.tag {
     float: right;
     border-radius: 5px;
     background-color: #bfdfff;
@@ -232,3 +232,8 @@ body.model-snapshot.change-list #content .object-tools {
     margin-left: 4px;
     margin-top: 1px;
 }
+
+.exists-False {
+    opacity: 0.1;
+    filter: grayscale(100%);
+}