Modal
Easy to use.
NPM install
npm i frontello-ui-modal
Usage
Form exemple
<a href="htts://wikipedia.org" id="my-link">Open page</a>
Init
<link rel="stylesheet" href="modal.css">
<script src="modal.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
let myLink = document.querySelector('#my-link');
myLink.addEventListener('click', (event) => {
let url = myLink.href;
let modal = (new Modal(myLink.innerText, {
fullPage: true,
})).setBodyIframe(url).addActionOpenUrl(url).addActionCopyUrl(url);
});
});
</script>