Basic functionality ready.

This commit is contained in:
2023-07-30 18:55:12 -04:00
parent 0cc9e55db0
commit 721e4f8107
16 changed files with 301 additions and 18 deletions

View File

@@ -0,0 +1,66 @@
{% 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=grid-container>
<div class="grid">
{% for image in images %}
<div class="column">
<a href="{{image.path}}">
<img src="{{image.thumbnail}}">
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if subdirs|length > 0 %}
<div class="centered-container">
<h1>
Sub-directories
</h1>
</div>
<div class=grid-container>
<div class="grid">
{% for dir in subdirs%}
<div class="column">
{% if request.path == '/gallery/' %}
<a href="{{dir.name}}">
{% else %}
<a href="{{request.path}}{{dir.name}}">
{% endif %}
<div class="grid-icon">
<img src="{% static 'imgs/folder-pictures.png' %}">
</div>
<span>
{{dir.name}}
</span>
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</body>
</html>