Add prehistoric icons...
This commit is contained in:
parent
73e804f303
commit
0b5737a576
@ -17,13 +17,22 @@ export class Prehistoric {
|
|||||||
return `
|
return `
|
||||||
<div class="container px-4 pt-4">
|
<div class="container px-4 pt-4">
|
||||||
<p class="p-2">
|
<p class="p-2">
|
||||||
|
<span class="icon has-text-link">
|
||||||
|
<i class="fa fa-tag"></i>
|
||||||
|
</span>
|
||||||
<strong>Denominazione:</strong> ${this._data.denomination}
|
<strong>Denominazione:</strong> ${this._data.denomination}
|
||||||
</p>
|
</p>
|
||||||
<p class="p-2">
|
<p class="p-2">
|
||||||
<strong>Località generica:</strong> ${this._data.genericPlace}
|
<span class="icon has-text-link">
|
||||||
|
<i class="fa fa-hourglass"></i>
|
||||||
|
</span>
|
||||||
|
<strong>Periodo:</strong> ${this._data.period}
|
||||||
</p>
|
</p>
|
||||||
<p class="p-2">
|
<p class="p-2">
|
||||||
<strong>Periodo:</strong> ${this._data.period}
|
<span class="icon has-text-link">
|
||||||
|
<i class="fa fa-map"></i>
|
||||||
|
</span>
|
||||||
|
<strong>Località generica:</strong> ${this._data.genericPlace}
|
||||||
</p>
|
</p>
|
||||||
<p class="mt-4 pl-2 pr-5">
|
<p class="mt-4 pl-2 pr-5">
|
||||||
<strong class="pb-3">Descrizione breve</strong></br>
|
<strong class="pb-3">Descrizione breve</strong></br>
|
||||||
|
@ -252,27 +252,27 @@ UI.sitesMenu = function (menuListSel, map, sites) {
|
|||||||
/**
|
/**
|
||||||
* Open Spotlight gallery
|
* Open Spotlight gallery
|
||||||
* @param {string} galleryId The id of the trigger element
|
* @param {string} galleryId The id of the trigger element
|
||||||
* @param {Array<Object>} images Array of image objects from DB
|
* @param {Array<Object>} items Array of image objects from DB
|
||||||
* @param {boolean} video Is this a video gallery?
|
* @param {boolean} video Is this a video gallery?
|
||||||
*/
|
*/
|
||||||
UI.imageGallery = function (galleryId, images, video = false) {
|
UI.imageGallery = function (galleryId, items, video = false) {
|
||||||
const element = document.querySelector(`#${galleryId}`);
|
const element = document.querySelector(`#${galleryId}`);
|
||||||
|
|
||||||
if (element) {
|
if (element) {
|
||||||
let gallery = [];
|
let gallery = [];
|
||||||
for (let img of images) {
|
for (let media of items) {
|
||||||
let author = img.author ? ` (${img.author})` : '';
|
let author = media.author ? ` (${media.author})` : '';
|
||||||
let mediaObj = {
|
let mediaObj = {
|
||||||
description: img.caption + author
|
description: media.caption + author
|
||||||
};
|
};
|
||||||
|
|
||||||
if (video) {
|
if (video) {
|
||||||
mediaObj.media = 'video';
|
mediaObj.media = 'video';
|
||||||
mediaObj["src-mp4"] = `video/${img.filename}`;
|
mediaObj["src-mp4"] = `video/${media.filename}`;
|
||||||
mediaObj.poster = `video/${img.filename.replace('mp4', 'png')}`;
|
mediaObj.poster = `video/${media.filename.replace('mp4', 'png')}`;
|
||||||
mediaObj.autoplay = true;
|
mediaObj.autoplay = true;
|
||||||
} else {
|
} else {
|
||||||
mediaObj.src = `img/${img.filename}`;
|
mediaObj.src = `img/${media.filename}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
gallery.push(mediaObj);
|
gallery.push(mediaObj);
|
||||||
|
Loading…
Reference in New Issue
Block a user