2022-12-27 22:09:10 +01:00
|
|
|
{% extends '../global.html' %}
|
|
|
|
|
2022-12-29 21:31:11 +01:00
|
|
|
{% load i18n %}
|
2022-12-27 22:09:10 +01:00
|
|
|
{% load responsive_images %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if created_galleries|length > 0 %}
|
|
|
|
<section class="RV-Images">
|
2022-12-29 21:31:11 +01:00
|
|
|
<h2>{% translate 'Your galleries '%}</h2>
|
2022-12-27 22:09:10 +01:00
|
|
|
<li class="RV-Images__list">
|
|
|
|
{% for gallery in created_galleries %}
|
|
|
|
<a href="{% url 'gallery' pk=gallery.pk %}" class="RV-Image__link RV-Image__link--detail">
|
|
|
|
{% if gallery.images.all|length <= 0 %}
|
2022-12-29 21:31:11 +01:00
|
|
|
{% translate 'no images' %}
|
2022-12-27 22:09:10 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 1 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 200x200 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 2 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x200 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 3 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x100 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length >= 4 %}
|
|
|
|
{% for image in gallery.images.all|slice:":4" %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x100 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.title %}
|
|
|
|
<p class="RV-Image__title">{{gallery.title}}</p>
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</li>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% if invited_galleries|length > 0 %}
|
|
|
|
<section class="RV-Images">
|
2022-12-29 21:31:11 +01:00
|
|
|
<h2>{% translate 'Galleries you were invited to' %}</h2>
|
2022-12-27 22:09:10 +01:00
|
|
|
<li class="RV-Images__list">
|
|
|
|
{% for gallery in invited_galleries %}
|
|
|
|
<a href="{% url 'gallery' pk=gallery.pk %}" class="RV-Image__link RV-Image__link--detail">
|
|
|
|
{% if gallery.images.all|length <= 0 %}
|
2022-12-29 21:31:11 +01:00
|
|
|
{% translate 'no images' %}
|
2022-12-27 22:09:10 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 1 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 200x200 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 2 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x200 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length == 3 %}
|
|
|
|
{% for image in gallery.images.all %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x100 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.images.all|length >= 4 %}
|
|
|
|
{% for image in gallery.images.all|slice:":4" %}
|
|
|
|
<img class="RV-Image__source" src="{% src image.image_file 100x100 %}">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if gallery.title %}
|
|
|
|
<p class="RV-Image__title">{{gallery.title}}</p>
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</li>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock content %}
|