aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-02-26 10:28:06 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-02-26 12:03:32 -0800
commit96db9d510a6891594271af7c284c46335b4d7502 (patch)
treeefc532eec672e22ece950e9f300ac4f78a384170 /python/fatcat_web
parent42e8f882ae0ad604657346a21b36d07b0729d5d3 (diff)
downloadfatcat-96db9d510a6891594271af7c284c46335b4d7502.tar.gz
fatcat-96db9d510a6891594271af7c284c46335b4d7502.zip
web: tweak display of files, webcapture, fileset
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/templates/file_view.html35
-rw-r--r--python/fatcat_web/templates/fileset_view.html18
-rw-r--r--python/fatcat_web/templates/webcapture_view.html15
3 files changed, 34 insertions, 34 deletions
diff --git a/python/fatcat_web/templates/file_view.html b/python/fatcat_web/templates/file_view.html
index 02f47a91..608a2a0a 100644
--- a/python/fatcat_web/templates/file_view.html
+++ b/python/fatcat_web/templates/file_view.html
@@ -8,23 +8,23 @@
<div class="ui stackable mobile reversed grid centered">
<div class="column" style="font-size: 16px; flex: 1;">
-<h3>Releases</h3>
+<h3>Associated Releases</h3>
{% if entity.releases != [] %}
{{ entity_macros.release_list(entity.releases) }}
{% else %}
<p>
- This file is not associated with any fatcat release.
+ This file is not associated with any release entity! This makes a is a stub entry in the catalog.
{% endif %}
-<h3>URLs</h3>
+<h3>Public Access URLs</h3>
{% if file.urls != None %}
{{ entity_macros.url_list(file.urls) }}
{% else %}
-No known public URL, mirror, or archive for this file.
+No known archives or mirrors of this file.
{% endif %}
-<h3>Checksums</h3>
+<h3>Data Integrity Checksums</h3>
<table class="ui definition single line fixed compact small unstackable table">
<tbody>
{% if file.sha1 != None %}
@@ -45,22 +45,23 @@ No known public URL, mirror, or archive for this file.
<div class="column" style="flex: 0 0 24em;">
{% if file._es and file._es.best_url %}
-<a href="{{ file._es.best_url }}" class="ui top attached fluid huge green button"><i class="file icon"></i>Download File</a>
+ {# TODO: this currently shows *any* file, though prefers archive.org #}
+ <a href="{{ file._es.best_url }}" class="ui fluid huge black button" style="text-decoration: underline;">
+ <i class="file icon"></i>View Archived File
+ </a>
{% else %}
-<span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Download Available</span>
+ <span class="ui fluid huge grey segment"><i class="file cross icon"></i>No Public URL</span>
{% endif %}
+<br>
-{% if file.size != None %}
-<div class="ui segment attached">
- <p><b>Size</b> &nbsp;{{ file.size|filesizeformat }}
+<div class="ui top segment attached">
+ {% if file.size != None %}
+ <b>Size</b> &nbsp;{{ file.size|filesizeformat }}<br>
+ {% endif %}
+ {% if file.mimetype != None %}
+ <b>MIME Type</b> &nbsp;<code>{{ file.mimetype }}</code><br>
+ {% endif %}
</div>
-{% endif %}
-
-{% if file.mimetype != None %}
-<div class="ui segment attached">
- <p><b>File Type</b> &nbsp;<code>{{ file.mimetype }}</code>
-</div>
-{% endif %}
{{ entity_macros.fatcat_bits(entity, "file", "", editgroup) }}
diff --git a/python/fatcat_web/templates/fileset_view.html b/python/fatcat_web/templates/fileset_view.html
index 27d5b6da..4e8bfbad 100644
--- a/python/fatcat_web/templates/fileset_view.html
+++ b/python/fatcat_web/templates/fileset_view.html
@@ -8,14 +8,20 @@
<div class="ui stackable mobile reversed grid centered">
<div class="column" style="font-size: 16px; flex: 1;">
-<h3>Releases</h3>
+<h3>Associated Releases</h3>
{% if entity.releases != [] %}
{{ entity_macros.release_list(entity.releases) }}
{% else %}
<p>
This File Set is not associated with any fatcat release.
{% endif %}
-
+
+<h3>Public Access URLs</h3>
+{% if entity.urls %}
+ {{ entity_macros.url_list(entity.urls) }}
+{% else %}
+No known public URL, mirror, or archive for this File Set.
+{% endif %}
<h3>File Manifest ({{ fileset.manifest|count }})</h3>
{% if fileset.manifest %}
@@ -40,14 +46,6 @@ This File Set is empty (contains no files).
{% endif %}
-<br>
-<h3>Base URLs</h3>
-{% if entity.urls %}
- {{ entity_macros.url_list(entity.urls) }}
-{% else %}
-No known public URL, mirror, or archive for this File Set.
-{% endif %}
-
</div>
<div class="column" style="flex: 0 0 24em;">
diff --git a/python/fatcat_web/templates/webcapture_view.html b/python/fatcat_web/templates/webcapture_view.html
index f2f689f3..b35ee0e2 100644
--- a/python/fatcat_web/templates/webcapture_view.html
+++ b/python/fatcat_web/templates/webcapture_view.html
@@ -8,7 +8,7 @@
<div class="ui stackable mobile reversed grid centered">
<div class="column" style="font-size: 16px; flex: 1;">
-<h3>Releases</h3>
+<h3>Associated Releases</h3>
{% if entity.releases != [] %}
{{ entity_macros.release_list(entity.releases) }}
{% else %}
@@ -16,8 +16,7 @@
This Web Capture is not associated with any fatcat release.
{% endif %}
-<br>
-<h3>Archive URLs</h3>
+<h3>Public Archive URLs</h3>
{% if webcapture.archive_urls != None %}
<table class="ui very basic compact single line fixed table">
<tbody>
@@ -42,7 +41,7 @@ No known public archive for this webcapture.
{% endif %}
-<h3>CDX Rows ({{ webcapture.cdx|count }})</h3>
+<h3>Captured Resources ({{ webcapture.cdx|count }})</h3>
{% if webcapture.cdx %}
<div class="ui celled list">
{% for row in webcapture.cdx %}
@@ -53,7 +52,7 @@ No known public archive for this webcapture.
</div>
<div style="margin-left: 1em;">
{{ row.timestamp.strftime("%Y-%m-%d %H:%M:%S") }}
- {% if row.mimetype %}| {{ row.mimetype }} {% endif %}
+ {% if row.mimetype %}| <code style="font-size: smaller;">{{ row.mimetype }}</code> {% endif %}
{% if row.size %}| {{ row.size|filesizeformat }} {% endif %}
<br>
<code><small style="color: #666;">
@@ -73,11 +72,13 @@ This web capture is empty (contains no resources).
<div class="column" style="flex: 0 0 24em;">
{% if webcapture.state == 'active' and webcapture.archive_urls != [] and webcapture.archive_urls[0].rel == "wayback" %}
-<a href="{{ webcapture.archive_urls[0].url }}{{ webcapture._wayback_suffix }}" class="ui top attached fluid huge green button"><i class="file archive outline icon"></i>View Web Archive</a>
+ <a href="{{ webcapture.archive_urls[0].url }}{{ webcapture._wayback_suffix }}" class="ui fluid huge black button" style="text-decoration: underline;">
+ <i class="university icon"></i>View Web Archive
+ </a>
{% endif %}
{% if webcapture.timestamp != None %}
-<div class="ui segment attached">
+<div class="ui segment top attached">
<p><b>Capture Time</b> &nbsp;{{ webcapture.timestamp.strftime("%Y-%m-%d %H:%M:%S") }}
</div>
{% endif %}