Use relative path for images
This commit is contained in:
parent
50d2af98eb
commit
0bcb2998b9
6
js/ui.js
6
js/ui.js
@ -113,7 +113,7 @@ UI.openModal = async function (data) {
|
|||||||
<td colspan="2" style="max-width: 70%">
|
<td colspan="2" style="max-width: 70%">
|
||||||
<p class="is-size-6 has-text-centered p-2">Cliccare sull'immagine per aprire la gallery</p>
|
<p class="is-size-6 has-text-centered p-2">Cliccare sull'immagine per aprire la gallery</p>
|
||||||
<figure class="image is-clickable" id="gallery-1">
|
<figure class="image is-clickable" id="gallery-1">
|
||||||
<img src="/img/${data.surveys[0].filename}" />
|
<img src="../img/${data.surveys[0].filename}" />
|
||||||
<figcaption class="p-2 has-text-centered">${data.surveys[0].didascalia}</figcaption>
|
<figcaption class="p-2 has-text-centered">${data.surveys[0].didascalia}</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</td>
|
</td>
|
||||||
@ -127,7 +127,7 @@ UI.openModal = async function (data) {
|
|||||||
<td colspan="2" style="max-width: 70%">
|
<td colspan="2" style="max-width: 70%">
|
||||||
<p class="is-size-6 has-text-centered p-2">Cliccare sull'immagine per aprire la gallery</p>
|
<p class="is-size-6 has-text-centered p-2">Cliccare sull'immagine per aprire la gallery</p>
|
||||||
<figure class="image is-clickable" id="gallery-2">
|
<figure class="image is-clickable" id="gallery-2">
|
||||||
<img src="/img/${data.photos[0].filename}" />
|
<img src="../img/${data.photos[0].filename}" />
|
||||||
<figcaption class="p-2 has-text-centered">${data.photos[0].didascalia}</figcaption>
|
<figcaption class="p-2 has-text-centered">${data.photos[0].didascalia}</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</td>
|
</td>
|
||||||
@ -186,7 +186,7 @@ UI.imageGallery = function (galleryId, images) {
|
|||||||
if (element) {
|
if (element) {
|
||||||
let gallery = [];
|
let gallery = [];
|
||||||
for (let img of images) {
|
for (let img of images) {
|
||||||
gallery.push({src: `/img/${img.filename}`, description: img.didascalia});
|
gallery.push({src: `../img/${img.filename}`, description: img.didascalia});
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector(`#${galleryId}`).addEventListener('click', () => {
|
document.querySelector(`#${galleryId}`).addEventListener('click', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user