Image upload added

Added temporary fix to loading images on the home page
Fix api.py for requesting images
Minor tweaks to default theme
This commit is contained in:
Michał Gdula 2023-01-10 18:12:55 +00:00
parent 367bb2bcc5
commit 44a6712b6e
8 changed files with 71 additions and 70 deletions

View file

@ -7,7 +7,18 @@
{% block content %}
<div class="app">
<h1>Gallery</h1>
<div id="gallery" class="gallery"></div>
<div id="gallery" class="gallery">
{% for image in images %}
<a class="gallery__item" href="/image/{{ image['id'] }}">
<div class="gallery__item-info">
<p>{{ image['id'] }}</p>
<h2>{{ image['file_name'] }}</h2>
</div>
<span class="gallery__item-filter"></span>
<img class="gallery__item-image" src="/uploads/original/{{ image['file_name'] }}" onload="imgFade(this)" style="display:none;">
</a>
{% endfor %}
</div>
</div>
<script>
let imageList = [];