Add underwater sites

This commit is contained in:
2025-04-29 11:59:39 +02:00
parent 46a4efe760
commit 962ba93355
8 changed files with 142 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import { SiteMedia } from './components/SiteMedia.js';
import { NotConserved } from './components/NotConserved.js';
import { Finding } from './components/Finding.js';
import { Prehistoric } from './components/Prehistoric.js';
import { Underwater } from './components/Underwater.js';
/**
* @namespace UI
@@ -213,6 +214,22 @@ UI.openPrehistModal = function (data, selector) {
prehistoric.render().then(html => modal.querySelector('#prehist-sheet').innerHTML = html);
modal.classList.add('is-active');
}
/**
* @todo Biblio?
* @param {object} data The data retrieved from the DB to display as modal content
* @param {string} selector The modal selector
*/
UI.openUnderwaterModal = function (data, selector) {
const modal = document.querySelector(selector);
let underwater = new Underwater();
underwater.data = data;
// For Stimulus biblio_controller
//window.Biblio = prehistoric;
underwater.render().then(html => modal.querySelector('#underwater-sheet').innerHTML = html);
modal.classList.add('is-active');
}
/**
* Open Spotlight gallery
* @param {string} galleryId The id of the trigger element