lightgallery: add hash plugin
This commit is contained in:
parent
68dfc4755a
commit
5bbc4c7cc3
2 changed files with 12 additions and 2 deletions
|
|
@ -14,11 +14,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
{% block extrajs %}
|
||||
<script src="{% static 'lightgallery/lightgallery.min.js' %}"></script>
|
||||
<script src="{% static 'lightgallery/plugins/hash/lg-hash.min.js' %}"></script>
|
||||
<script src="{% static 'lightgallery/plugins/thumbnail/lg-thumbnail.min.js' %}"></script>
|
||||
<script src="{% static 'lightgallery/plugins/zoom/lg-zoom.min.js' %}"></script>
|
||||
<script>
|
||||
lightGallery(document.getElementById('lightgallery'), {
|
||||
plugins: [lgZoom, lgThumbnail]
|
||||
plugins: [lgHash, lgThumbnail, lgZoom],
|
||||
customSlideName: true,
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
@ -66,7 +68,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
</div>
|
||||
<div class="card-body row" id="lightgallery">
|
||||
{% for photo in photos %}
|
||||
<a class="col-6 col-md-3 mb-2 text-center" href="{{ photo.get_absolute_url }}" data-src="{{ photo.get_display_url }}" data-download-url="{{ photo.image.url }}">
|
||||
<a class="col-6 col-md-3 mb-2 text-center" href="{{ photo.get_absolute_url }}" data-src="{{ photo.get_display_url }}" data-download-url="{{ photo.image.url }}" data-slide-name="{{ photo.slug }}">
|
||||
<img src="{{ photo.get_thumbnail_url }}" loading="lazy" class="img-thumbnail" alt="{{ photo.title }}{% if photo.date_taken %} - {{ photo.date_taken|date }} {{ photo.date_taken|time }}{% endif %} - {{ photo.extended.owner.get_full_name }}{% if photo.extended.license %} - {{ photo.extended.license }}{% endif %}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue