rar-index-py/flask/templates/view.html

25 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block meta %}
<link rel="stylesheet" href="/static/view.css" />
{% endblock %}
{% block content %}
{% if login and userdata[0] == archive[8] %}<a href="/delete/{{archive[0]}}"><button class="big-button"><b style="color:red;">Delete</b></button></a>{% endif %}<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><a href="/search?category={{category[0]}}"><span>{{category[4]}}/{{category[1]}}</span></a>
<b>Imported: </b><span>{{archive[4]|ctime}}</span>
<b>Size: </b><span>{{archive[3]|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[1]}}</div>
{% endfor %}
</div>
</div>
<img id="cover" src="/static/covers/custom/{{archive[0]}}.webp" onerror="this.onerror=null; this.src='/static/covers/default.webp'" alt="Cover image">
</div>
{% endblock %}