This commit is contained in:
Boof 2023-02-07 09:32:46 +01:00 committed by GitHub
parent cf15b43f1b
commit 0cb50b870e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 13 deletions

View File

@ -1,3 +1,19 @@
const formbutton = document.getElementById("submitbutton");
const emailformoverlay = document.getElementById("email-form-overlay");
const emailformpopup = document.getElementById("email-form-popup");
formbutton.addEventListener("click", function () {
emailformoverlay.style.display = "block";
emailformpopup.style.display = "block";
});
emailformoverlay.addEventListener("click", function () {
emailformoverlay.style.display = "none";
emailformpopup.style.display = "none";
});
//send email form
/*
document.addEventListener('DOMContentLoaded', () => {
const form = document.querySelector('#formid')
const addButton = document.querySelector('#submitbutton')
@ -15,16 +31,4 @@ document.addEventListener('DOMContentLoaded', () => {
.then(console.log)
console.log("I know there is an error, just ignore it.")
})
/*updateButton && updateButton.addEventListener('click', (e) => {
e.preventDefault()
if (!form.checkValidity()) {
return
}
fetch('/updateAddress', { method: 'POST', body: new FormData(form) })
.then((r => r.json()))
.then(console.log)
})*/
})
})*/

View File

@ -27,6 +27,34 @@
.text {
color: #ffffff
}
#email-form-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
#email-form-popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80vw;
height: 90vh;
background-color: white;
z-index: 1;
}
#email-popup-iframe {
width: 100%;
height: 100%;
}
:root {
--text-color: #ffffff;
--nav-link-inactive: #1470e9;

View File

@ -136,6 +136,10 @@
<input value="" name="usedvpn" id="usedvpn" type="hidden" required>
<p style="font-size: 50%; color:#ffffff">When you submit this form you agree to the <a class="colorurl" href="privacy.html">Privacy Policy</a></p>
<button id="submitbutton" type="submit">Send Message</button>
<div id="email-form-overlay"></div>
<div id="email-form-popup">
<iframe width="540" height="305" src="https://22242122.sibforms.com/serve/MUIEAGn6IExejPbN0o9rX5yACspn6IU1cXlsTT7dld_YuNtMwBP-Lu8BWoVs2zQ_Xs-rY6qrBBSCmKVS3dw7DRCnqLd9G-2o-tpy2-PXH12HI3OTKRZ6ILj4Sxj8xtgaUOBiceSqaIv4yzPUOzS3f7s1ApsHF2dss1YmAFP1JAR29ugNWVa8qmtS-HuyWudxbNy3H7v_9j32557P" id="email-popup-iframe" frameborder="0" scrolling="auto" allowfullscreen style="display: block;margin-left: auto;margin-right: auto;max-width: 100%;"></iframe>
</div>
</form>
</div>