From 118bddb41a55f5203ab8f848247087812be0f34e Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 16 Feb 2021 15:55:07 -0500 Subject: [PATCH] fix admin title and url truncation and add edit/admin link and ID to Snapshot detail page --- archivebox/templates/admin/base.html | 2 +- archivebox/templates/core/index_row.html | 4 ++-- archivebox/templates/core/snapshot.html | 6 ++++-- archivebox/templates/static/admin.css | 23 +++++++++++++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/archivebox/templates/admin/base.html b/archivebox/templates/admin/base.html index d581337f..dc71418a 100644 --- a/archivebox/templates/admin/base.html +++ b/archivebox/templates/admin/base.html @@ -89,7 +89,7 @@ Add ➕ / Snapshots / Tags / - Users / + Admin / Docs     {% block welcome-msg %} diff --git a/archivebox/templates/core/index_row.html b/archivebox/templates/core/index_row.html index cba3ec39..ba34a8c6 100644 --- a/archivebox/templates/core/index_row.html +++ b/archivebox/templates/core/index_row.html @@ -10,7 +10,7 @@ {% endif %} - {{link.title|default:'Loading...'}} + {{link.title|default:'Loading...'|truncatechars:128}} {% if link.tags_str %} {% if link.tags_str != None %} @@ -33,5 +33,5 @@ {% endif %} - {{link.url}} + {{link.url|truncatechars:128}} diff --git a/archivebox/templates/core/snapshot.html b/archivebox/templates/core/snapshot.html index c7b99c56..3c6fd64b 100644 --- a/archivebox/templates/core/snapshot.html +++ b/archivebox/templates/core/snapshot.html @@ -335,13 +335,15 @@
diff --git a/archivebox/templates/static/admin.css b/archivebox/templates/static/admin.css index 142e1b89..d8673dc7 100644 --- a/archivebox/templates/static/admin.css +++ b/archivebox/templates/static/admin.css @@ -237,3 +237,26 @@ body.model-snapshot.change-list #content .object-tools { opacity: 0.1; filter: grayscale(100%); } + + +#result_list tbody td.field-cmd_str pre, +#result_list tbody td.field-output_str pre { + max-width: 22vw; + word-wrap: anywhere; + white-space: break-spaces; + max-height: 40px; + overflow: hidden; + margin: 2px; + background-color: rgba(0,0,0,0.05); + padding: 1px 4px 16px 8px; + border-radius: 4px; +} + +#result_list tbody td.field-extractor { + font-weight: 800; + font-variant: small-caps; +} + +#result_list tbody td.field-status { + font-variant: small-caps; +}