diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 16:14:49 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 16:14:49 -0700 |
commit | fb4a5f87a22ce33bc46a99df800cb239aca47e33 (patch) | |
tree | d2739f5e55b2289229b0d1d9f15c21ba3cc763bd /python/fatcat/templates/file_view.html | |
parent | 264dbd984dd916428a99b445c7131538c5176f9d (diff) | |
download | fatcat-fb4a5f87a22ce33bc46a99df800cb239aca47e33.tar.gz fatcat-fb4a5f87a22ce33bc46a99df800cb239aca47e33.zip |
bunch more view updates
Diffstat (limited to 'python/fatcat/templates/file_view.html')
-rw-r--r-- | python/fatcat/templates/file_view.html | 85 |
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 %} |