Files
NibasaViewer/viewer/templates/gallery_view.html

82 lines
2.7 KiB
HTML

{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height" />
<title>
Folder: {{request.path}}
</title>
<link href="{% static 'css/styles.css' %}" rel="stylesheet">
</head>
<body class="background">
<div class="centered-container">
<a href="/gallery/">
<img src="{% static 'imgs/gohome.png' %}">
</a>
<a href="..">
<img src="{% static 'imgs/back.png' %}">
</a>
</div>
{% if images|length > 0 %}
<div class="centered-container">
<h1>
Files
</h1>
</div>
<div class="centered-container">
<table class="mauto">
<tbody>
{% for row in images %}
<tr>
{% for cell in row %}
<td class="column">
<a href="{{cell.path}}">
<img src="{{cell.thumbnail}}">
<br>
<span>
{{cell.path|truncatechars:15}}
</span>
</a>
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% if subdirs|length > 0 %}
<div class="centered-container">
<h1>
Sub-directories
</h1>
</div>
<div class="centered-container">
<table class="mauto">
<tbody>
{% for row in subdirs %}
<tr>
{% for cell in row %}
<td class="column">
{% if request.path == '/gallery/' %}
<a href="{{cell.name}}">
{% else %}
<a href="{{request.path}}{{cell.name}}">
{% endif %}
<img src="{% static 'imgs/folder-pictures.png' %}">
<br>
<span>
{{cell.name}}
</span>
</a>
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</body>
</html>