2026-07-29 15:24:02 -06:00
|
|
|
export const modal = (el) => {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const bindModals = () => {
|
2026-07-29 22:55:24 -06:00
|
|
|
const elems = document.querySelectorAll('a[data-scripture]');
|
|
|
|
|
const dialog = document.querySelectorAll('dialog[data-scripture]');
|
2026-07-29 15:24:02 -06:00
|
|
|
elems.forEach((e) => {
|
2026-07-29 22:55:24 -06:00
|
|
|
e.addEventListener('click', (evt) => {
|
|
|
|
|
const scripture = e.attributes.getNamedItem('data-scripture');
|
|
|
|
|
evt.preventDefault();
|
|
|
|
|
console.log(scripture);
|
|
|
|
|
dialog[0]?.showModal();
|
|
|
|
|
dialog[0]?.setAttribute('data-scripture', scripture);
|
|
|
|
|
dialog[0]?.classList.remove("hidden");
|
|
|
|
|
//document.body.classList.add("overflow-hidden");
|
|
|
|
|
|
|
|
|
|
});
|
2026-07-29 15:24:02 -06:00
|
|
|
});
|
|
|
|
|
};
|