function renderLogo() { const modal = document.createElement('div') modal.style.cssText = 'z-index: 2; background: rgba(0,0,0,.4); position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: none; justify-content: center; align-items: center; padding: 20px;' const toggleModal = () => { modal.style.display = modal.style.display !== 'none' ? 'none' : 'flex' } const iframe = document.createElement('iframe') iframe.src = 'https://d-maerket.vercel.app//certificate/nord-energi-amba' iframe.style.cssText = 'border: none; border-radius: 4px; height:100%; width:100%; border-radius: 4px;' const iframeContainer = document.createElement('div') iframeContainer.style.cssText = 'max-height: 90%; max-width: 90%; height: 1000px; width: 1000px; max-width: 90%; max-height-90%; box-shadow: -2px 4px 4px 2px rgba(0,0,0,.4); position: relative; border-radius: 4px; background-color: rgb(243 245 244);' const closeButton = document.createElement('button') closeButton.style.cssText = 'width: 40px; height: 40px; padding: 4px; background-color: #D13033; color: white; font-weight: 700; cursor: pointer; border: none; position: absolute; top: 0; right: 0; border-top-right-radius: 4px' closeButton.innerText = '✕' closeButton.addEventListener('click', toggleModal) const button = document.createElement('button') button.innerHTML = '' button.style.cssText = 'position: absolute; top: 10%; right: 0; z-index: 1; cursor: pointer; width: 60px; height: 60px; background-color: white; border: none; border-radius: 4px; padding: 8px; box-shadow: -2px 4px 4px 2px rgba(0,0,0,.4); transition: box-shadow 300ms ease-in-out' button.addEventListener('click', toggleModal) iframeContainer.appendChild(iframe) iframeContainer.appendChild(closeButton) modal.appendChild(iframeContainer) document.body.prepend(modal) document.body.prepend(button) } renderLogo()