feat: Show image of AN only when there are some
This commit is contained in:
@@ -74,25 +74,13 @@
|
|||||||
<!--- Images and Description --->
|
<!--- Images and Description --->
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<!--- Images --->
|
<!--- Images --->
|
||||||
<div class="column block">
|
{% if adoption_notice.get_photos %}
|
||||||
<div class="card">
|
<div class="column block">
|
||||||
<div class="grid card-content">
|
<div class="card">
|
||||||
<div class="gallery">
|
<div class="grid card-content">
|
||||||
{% with photo=adoption_notice.get_photos.0 %}
|
<div class="gallery">
|
||||||
<div class="main-photo">
|
{% with photo=adoption_notice.get_photos.0 %}
|
||||||
<a href="{{ MEDIA_URL }}{{ photo.image }}"
|
<div class="main-photo">
|
||||||
data-pswp-width="{{ photo.image.width }}"
|
|
||||||
data-pswp-height="{{ photo.image.height }}"
|
|
||||||
target="_blank">
|
|
||||||
<img src="{{ MEDIA_URL }}{{ photo.image }}"
|
|
||||||
alt="{{ photo.alt_text }}">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endwith %}
|
|
||||||
|
|
||||||
<div class="thumbnail-row">
|
|
||||||
{% for photo in adoption_notice.get_photos|slice:"1:4" %}
|
|
||||||
<div class="thumbnail">
|
|
||||||
<a href="{{ MEDIA_URL }}{{ photo.image }}"
|
<a href="{{ MEDIA_URL }}{{ photo.image }}"
|
||||||
data-pswp-width="{{ photo.image.width }}"
|
data-pswp-width="{{ photo.image.width }}"
|
||||||
data-pswp-height="{{ photo.image.height }}"
|
data-pswp-height="{{ photo.image.height }}"
|
||||||
@@ -101,12 +89,26 @@
|
|||||||
alt="{{ photo.alt_text }}">
|
alt="{{ photo.alt_text }}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endwith %}
|
||||||
|
|
||||||
|
<div class="thumbnail-row">
|
||||||
|
{% for photo in adoption_notice.get_photos|slice:"1:4" %}
|
||||||
|
<div class="thumbnail">
|
||||||
|
<a href="{{ MEDIA_URL }}{{ photo.image }}"
|
||||||
|
data-pswp-width="{{ photo.image.width }}"
|
||||||
|
data-pswp-height="{{ photo.image.height }}"
|
||||||
|
target="_blank">
|
||||||
|
<img src="{{ MEDIA_URL }}{{ photo.image }}"
|
||||||
|
alt="{{ photo.alt_text }}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
<!--- Description --->
|
<!--- Description --->
|
||||||
<div class="column block">
|
<div class="column block">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
Reference in New Issue
Block a user