refactor(bulma): use generic gallery to avoid having multiple same ids
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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'),
|
||||||
});
|
});
|
||||||
|
@@ -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 }}"
|
||||||
|
@@ -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 }}"
|
||||||
|
Reference in New Issue
Block a user