Changed CSS grid layout for a table layout.

This commit is contained in:
2023-07-30 21:18:36 -04:00
parent 84faf3d84c
commit 468769275b
3 changed files with 68 additions and 93 deletions

View File

@@ -23,16 +23,26 @@
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 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 %}
@@ -41,25 +51,30 @@
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 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>