mirror of
https://github.com/Xevion/simple-viewer.git
synced 2025-12-06 01:16:24 -06:00
95 lines
3.7 KiB
HTML
95 lines
3.7 KiB
HTML
{% extends 'base.html' %}
|
|
{% block head %}
|
|
{{ block.super }}
|
|
<style>
|
|
|
|
|
|
.file-count {
|
|
font-weight: 400; font-style: italic; font-size: 70%;
|
|
}
|
|
|
|
.action-set {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
justify-content: space-around;
|
|
align-content: stretch;
|
|
align-items: center;
|
|
padding: 0 0.5rem;
|
|
}
|
|
</style>
|
|
{% endblock head %}
|
|
{% block content %}
|
|
<div id="browse" class="card">
|
|
<div class="card-header">
|
|
<div class="flex-container" style="width: 100%;">
|
|
<div class="directory-info">
|
|
<p class="card-header-title">
|
|
{{ directory.path }}
|
|
<span class="pl-1 file-count">
|
|
{{ files|length }} files
|
|
</span>
|
|
</p>
|
|
</div>
|
|
<div class="action-set">
|
|
<span class="action icon">
|
|
<a href="{% url 'index' %}">
|
|
<i class="fas fa-arrow-up" aria-hidden="true"></i>
|
|
</a>
|
|
</span>
|
|
<span class="action icon">
|
|
<a href="{% url 'refresh' directory.id %}">
|
|
<i class="fas fa-sync"></i>
|
|
</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-content">
|
|
<div class="content">
|
|
{% for directory in directories %}
|
|
<div>
|
|
<span class="icon">
|
|
<i class="fas fa-folder"></i>
|
|
</span>
|
|
<a href="{% url 'add' %}?path={{ file.fullpath }}">
|
|
{{ directory }}
|
|
</a>
|
|
</div>
|
|
|
|
{% endfor %}
|
|
{% for file in files %}
|
|
<div id="file-{{ file.id }}" class="media">
|
|
{% load static %}
|
|
<div class="image-placeholder mx-2"
|
|
style="min-width: {{ file.thumbnailResolution.y }}px; min-height: {{ file.thumbnailResolution.y }}px;">
|
|
<img loading="lazy" width="{{ file.thumbnailResolution.x }}" height="{{ file.thumbnailResolution.y }}" src="{% static file.thumbnail_static_path %}">
|
|
</div>
|
|
<a href="#file-{{ file.id }}">
|
|
<b class="media-fileid">{{ file.id }}</b>
|
|
</a>
|
|
<span class="media-filename">
|
|
<a href="{% url 'file' directory.id file.filename %}">
|
|
/{{ file.filename }}
|
|
</a>
|
|
</span>
|
|
<span class="media-resolution">
|
|
{{ file.resolution }}
|
|
</span>
|
|
<span class="media-size">
|
|
<i>
|
|
{{ file.human_size }}
|
|
</i>
|
|
</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
|
|
integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg=="
|
|
crossorigin="anonymous"></script>
|
|
<script src="{% static "hover.js" %}"></script>
|
|
{% endblock content %}
|