.row {
display: flex;
width: 100%;
justify-content: center;
}
.column {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
width: 100%; /* Adjust the width as needed */
margin: 0 auto;
}
.container {
width: 100%;
margin: 0 auto;
max-width: 100%; /* Adjust the max-width as needed */
}
.gist-container {
width: 100%;
margin: 0 auto;
}
.gist-column {
width: 500px;
}
.gist-container iframe {
width: 100%; /* Set the width of the embedded form to 100% */
}
/* Override Gist form styles */
.gist-embed-form div,
.gist-embed-form form,
.gist-embed-form input {
max-width: 100% !important;
width: 100% !important;
}
@media (min-width: 768px) {
.container {
margin-left: 25%;
margin-right: 25%;
}
}
// Prevent refreshing of Gist form iFrame on mobile devices
if (/Mobi/i.test(navigator.userAgent)) {
// Check if the user agent is a mobile device
(function () {
var iframes = document.querySelectorAll(‘.gist-container iframe’);
for (var i = 0; i < iframes.length; i++) {
iframes[i].setAttribute('data-src', iframes[i].getAttribute('src'));
iframes[i].removeAttribute('src');
}
})();
}
// Wait for the Gist form to load
document.addEventListener('DOMContentLoaded', function() {
var formContainer = document.querySelector('.gist-container');
var placeholder = document.getElementById('gist-placeholder');
// Remove the placeholder and show the form
placeholder.style.display = 'none';
// Create the Gist form dynamically
var form = document.createElement('div');
form.classList.add('gist-embed-form');
form.setAttribute('data-form-type', 'embedded');
form.setAttribute('data-form-id', '94476117');
form.setAttribute('data-workspace-id', 'od9ftwc2');
formContainer.appendChild(form);
formContainer.style.display = 'block';
// Load the Gist form script
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://forms-widget.getgist.com/';
script.defer = true;
formContainer.appendChild(script);
});