aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat/templates/file_view.html
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat/templates/file_view.html')
-rw-r--r--python/fatcat/templates/file_view.html85
1 files changed, 70 insertions, 15 deletions
diff --git a/python/fatcat/templates/file_view.html b/python/fatcat/templates/file_view.html
index f45c9238..6a53b6c6 100644
--- a/python/fatcat/templates/file_view.html
+++ b/python/fatcat/templates/file_view.html
@@ -1,27 +1,30 @@
{% extends "base.html" %}
-{% block body %}
+{% block fullbody %}
-<h1>File {{ file.ident }}</h1>
+<div class="ui stackable mobile reversed grid centered">
+<div class="one wide column"></div>
+<div class="fifteen wide column">
+ <h1 class="ui header">
+ <div class="sub header"><code>file {{ file.ident }}</code></div></h1>
+</div>
+</div>
+
+<div class="ui stackable mobile reversed grid centered">
+<div class="one wide column"></div>
+<div class="ten wide column">
<p><b>Size:</b> {{ file.size }} (bytes)
-<p><b>SHA-1 checksum:</b> <code>{{ file.sha1 }}</code>
-{% if file.sha256 != None %}
-<p><b>SHA-256 checksum:</b> <code>{{ file.sha256 }}</code>
-{% endif %}
-{% if file.md5 != None %}
-<p><b>MD5 checksum:</b> <code>{{ file.md5 }}</code>
+
+{% if file.mimetype %}
+<p><b>File Type:</b> <code>{{ file.mimetype }}</code>
{% endif %}
-<p><b>fatcat File Identifier:</b> <code>{{ file.ident }}</code> (revision #{{ file.revision }}, {{ file.state }})
+
{% if file.extra != None %}
<p><b>Additional Metadata (raw JSON):</b>
<pre>{{ file.extra }}</pre>
{% endif %}
-<!--
-Raw JSON Object:
-{{ file }}
--->
-
+<h3>Releases</h3>
{% if file.releases != None %}
<p>Releases associated with this file:
<ul>
@@ -33,13 +36,65 @@ Raw JSON Object:
This file is not associated with any fatcat release.
{% endif %}
+<h3>URLs</h3>
{% if file.url != None %}
<p>Known locations of this file:
<ul>
- <li><a href="{{ file.url }}"><code>{{ file.url }}</code></a>
+ <li><a href="{{ file.url }}">{{ file.url.split('/')[2] }}</a>
+ (<a href="https://web.archive.org/web/2/{{ file.url }}">Wayback mirror</a>)
</ul>
{% else %}
No known public URL, mirror, or archive for this file.
{% endif %}
+<h3>Checksums</h3>
+<table class="ui table">
+ <thead>
+ <tr><th>Algorithm
+ <th>Value
+ <tbody>
+ {% if file.sha1 != None %}
+ <tr><td>SHA-1
+ <td><code>{{ file.sha1 }}
+ {% endif %}
+ {% if file.sha1 != None %}
+ <tr><td>SHA-256
+ <td><code>{{ file.sha256 }}
+ {% endif %}
+ {% if file.md5!= None %}
+ <tr><td>MD5
+ <td><code>{{ file.md5 }}
+ {% endif %}
+</table>
+
+<!--
+Raw Object:
+{{ file|safe }}
+-->
+
+</div>
+<div class="five wide column">
+
+{% if file.url != None %}
+<a href="https://web.archive.org/web/2/{{ file.url }}" class="ui top attached fluid huge green button"><i class="file icon"></i>Download File</a>
+{% else %}
+<span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Download Available</span>
+{% endif %}
+
+<div class="ui segment attached">
+
+<b>Fatcat Bits</b>
+<p>Revision #{{ file.revision }}. State is "{{ file.state }}"
+<br><a href="https://api.qa.fatcat.wiki/v0/file/{{ file.ident }}">As JSON object via API</a>
+
+</div>
+<div class="two ui buttons bottom attached">
+ <a href="/file/{{ file.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/file/{{ file.ident }}/history" class="ui button">View History</a>
+</div>
+
+</div>
+</div>
+
+
{% endblock %}