refactor(bulma): use generic gallery to avoid having multiple same ids

This commit is contained in:
2025-05-18 14:23:09 +02:00
parent 17dbe85219
commit bbc8732112
4 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@
IMAGES IMAGES
*****/ *****/
#my-gallery .main-photo img { .gallery .main-photo img {
width: 100%; width: 100%;
height: 300px; height: 300px;
object-fit: cover; object-fit: cover;

View File

@@ -1,7 +1,7 @@
import PhotoSwipeLightbox from 'https://unpkg.com/photoswipe/dist/photoswipe-lightbox.esm.js'; import PhotoSwipeLightbox from 'https://unpkg.com/photoswipe/dist/photoswipe-lightbox.esm.js';
const lightbox = new PhotoSwipeLightbox({ const lightbox = new PhotoSwipeLightbox({
gallery: '#my-gallery', gallery: '.gallery',
children: 'a', children: 'a',
pswpModule: () => import('https://unpkg.com/photoswipe'), pswpModule: () => import('https://unpkg.com/photoswipe'),
}); });

View File

@@ -38,7 +38,7 @@
<div class="column block"> <div class="column block">
<div class="card"> <div class="card">
<div class="grid card-content"> <div class="grid card-content">
<div class="cell" id="my-gallery"> <div class="cell gallery">
{% for photo in adoption_notice.get_photos %} {% for photo in adoption_notice.get_photos %}
<a href="{{ MEDIA_URL }}{{ photo.image }}" <a href="{{ MEDIA_URL }}{{ photo.image }}"
data-pswp-width="{{ photo.image.width }}" data-pswp-width="{{ photo.image.width }}"

View File

@@ -18,7 +18,7 @@
</div> </div>
{% endif %} {% endif %}
<div id="my-gallery"> <div class="gallery">
{% with photo=animal.get_photos.0 %} {% with photo=animal.get_photos.0 %}
<div class="main-photo"> <div class="main-photo">
<a href="{{ MEDIA_URL }}{{ photo.image }}" <a href="{{ MEDIA_URL }}{{ photo.image }}"