2021-04-02 17:22:28 +02:00
|
|
|
{% load static %}
|
2021-04-03 23:03:44 +02:00
|
|
|
{% load lostplaces %}
|
2021-04-02 17:22:28 +02:00
|
|
|
|
|
|
|
{% if headline %}
|
|
|
|
<h1 class="LP-Headline">{{headline}}</h1>
|
|
|
|
{% endif %}
|
|
|
|
<div class="LP-ImageGrid">
|
|
|
|
<ul class="LP-ImageGrid__Container">
|
|
|
|
{% for image in image_list %}
|
2021-04-10 08:24:23 +02:00
|
|
|
<li id="thumbnail{{forloop.counter0}}" class="LP-ImageGrid__Item">
|
|
|
|
{% include 'partials/image.html' with source_url=image.filename.thumbnail.url link_url="#image"|addstr:forloop.counter0 %}
|
2021-04-02 17:22:28 +02:00
|
|
|
{% if user.explorer == image.submitted_by%}
|
|
|
|
<span class="LP-ImageGrid__DeleteItem" title="Bild löschen">
|
|
|
|
<a href="{% url 'place_image_delete' pk=image.id %}" class="LP-Link">
|
|
|
|
<img class="LP-Icon" src="{% static 'icons/cancel.svg' %}" />
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2021-04-10 08:24:23 +02:00
|
|
|
<div id="image{{forloop.counter0}}" class="LP-ImageGrid__LightBox">
|
2021-04-03 23:03:44 +02:00
|
|
|
<img class="LP-ImageGrid__FullSizeImage" src="{{image.filename.large.url}}" loading="lazy"/>
|
2021-04-10 08:24:23 +02:00
|
|
|
{% if forloop.counter0 < image_list|length|add:-1 %}
|
|
|
|
<a href="#image{{forloop.counter0|add:1}}" class="LP-ImageGrid__Next">Next</a>
|
2021-04-03 23:03:44 +02:00
|
|
|
{% endif %}
|
2021-04-10 08:24:23 +02:00
|
|
|
{% if forloop.counter0 > 0 %}
|
|
|
|
<a href="#image{{forloop.counter0|add:-1}}" class="LP-ImageGrid__Previous">Previous</a>
|
2021-04-03 23:03:44 +02:00
|
|
|
{% endif %}
|
|
|
|
<span class="LP-ImageGrid__Close LP-ImageGrid__DeleteItem" title="Schließen">
|
2021-10-02 08:44:49 +02:00
|
|
|
<a href="#" class="LP-Link">
|
2021-04-03 23:03:44 +02:00
|
|
|
<img class="LP-Icon" src="{% static 'icons/cancel.svg' %}"/>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-04-02 17:22:28 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
2021-04-06 19:14:58 +02:00
|
|
|
{% if place %}
|
2021-04-04 17:01:00 +02:00
|
|
|
<li class="LP-ImageGrid__Item LP-ImageGrid__Item--add" title="Bild hinzufügen">
|
2021-04-06 19:14:58 +02:00
|
|
|
<a class="LP-Link" href="{% url 'place_image_create' place_id=place.id %}">
|
2021-04-04 17:01:00 +02:00
|
|
|
<img class="LP-Icon" src="{% static 'icons/plus.svg' %}" />
|
|
|
|
</a>
|
|
|
|
</li>
|
2021-04-06 19:14:58 +02:00
|
|
|
{% endif %}
|
2021-04-02 17:22:28 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|