Added archive view, label editing
Archives can now be viewed, a cover can optionally be inserted into the covers directory. Labels can now be edited.
This commit is contained in:
parent
c3bd73a068
commit
f0b8b1eb3d
8 changed files with 196 additions and 15 deletions
25
flask/templates/view.html
Normal file
25
flask/templates/view.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block meta %}
|
||||
<link rel="stylesheet" href="/static/view.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{archive[1]}}</h2>
|
||||
<div class="grid-container">
|
||||
<div class="archive-info">
|
||||
<b>Hash: </b><span>{{archive[2]}}</span>
|
||||
<b>Owner: </b><a href="/user/{{archive[-2]}}">{{archive[-1]}}</a>
|
||||
<b>Category: </b><span>{{category[4]}}/{{category[1]}}</span>
|
||||
<b>Imported: </b><span>{{archive[4]|ctime}}</span>
|
||||
<b>Size: </b><span>{{archive[4]|spacer}}</span>
|
||||
<b>Labels: {% if login and userdata[0] == archive[8] %}<a href="/labels/{{archive[0]}}">Edit</a>{% endif %}</b>
|
||||
<div>
|
||||
{% for lab in labels %}
|
||||
<div class="label">{{lab[0]}}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<img id="cover" src="/static/covers/{{archive[0]}}.webp" onerror="this.onerror=null; this.src='/static/covers/default.webp'" alt="Cover image">
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue