Add top landscape photos
This commit is contained in:
parent
1930863979
commit
1380bc99a7
1 changed files with 26 additions and 0 deletions
|
@ -83,4 +83,30 @@
|
|||
|
||||
</div>
|
||||
|
||||
<!-- Favorite random landscape photos -->
|
||||
{% load top_tags %}
|
||||
{% load image_tags %}
|
||||
{% random_favorite_photos_landscape 10 as top_landscape_photos %}
|
||||
|
||||
{% if top_landscape_photos %}
|
||||
<div uk-slider>
|
||||
<div class="uk-position-relative uk-visible-toggle uk-light uk-margin-top" tabindex="-1">
|
||||
<div class="uk-slider-items uk-child-width-1-2 uk-child-width-1-3@s uk-child-width-1-4@m">
|
||||
{% for photo in top_landscape_photos %}
|
||||
{% with photo|photo_image_data as data %}
|
||||
<div>
|
||||
<a href="{{ photo.get_absolute_url }}">
|
||||
<img src="{{ data.url }}" alt="{{ photo.album.slug }}" width="{{ data.width }}" height="{{ data.height }}" style="object-fit: cover;" loading="lazy">
|
||||
</a>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a class="uk-position-center-left uk-position-small uk-hidden-hover" href uk-slidenav-previous uk-slider-item="previous"></a>
|
||||
<a class="uk-position-center-right uk-position-small uk-hidden-hover" href uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
<ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin"></ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue