{% extends "se/base.html" %}
{% load static %}

{% block top_bar %}
    {% include "se/archive.html" %}
{% endblock %}

{% block body %}
    <h3 style="margin-bottom: 0">{{ icon }} {{ filename }} ({{ filesize|filesizeformat }})</h3>
    <small>{{ doc.mimetype }}</small>
    <div style="padding-top: 20px">
        <a href="{{ url }}" download="{{ filename }}" style="text-decoration: none">📥 </a>
        <a href="{{ url }}" download="{{ filename }}">Download</a>
    </div>

    <div style="padding-top: 10px">
        {% if mimebase == 'image' %}
            <img src="{{ url }}"/>
        {% elif mimebase == 'video' %}
            <video src="{{ url }}" controls/>
        {% elif mimebase == 'audio' %}
            <audio src="{{ url }}" controls/>
        {% endif %}
    </div>
{% endblock %}
