Spaces:
Running
Running
pop-up is not looking proper. Please do it
Browse files- index.html +31 -26
- style.css +52 -1
index.html
CHANGED
|
@@ -497,25 +497,34 @@
|
|
| 497 |
</div>
|
| 498 |
</section>
|
| 499 |
<!-- Download Modal -->
|
|
|
|
| 500 |
<form id="send_email_to_vM_customer" action="./Ask_sendEmailToCustomer.php" method="post">
|
| 501 |
-
<div id="downloadModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden">
|
| 502 |
-
<div class="bg-white p-8 rounded-lg max-w-md
|
| 503 |
-
<button onclick="closeDownloadModal()" class="absolute top-4 right-4 text-gray-500 hover:text-gray-700"
|
| 504 |
<i data-feather="x" class="w-6 h-6"></i>
|
| 505 |
</button>
|
| 506 |
-
<h3 class="text-2xl font-bold text-[var(--vlc-navy)] mb-
|
| 507 |
-
<div class="space-y-
|
| 508 |
-
<div
|
| 509 |
-
<
|
| 510 |
-
<
|
| 511 |
-
<
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
|
|
|
|
|
|
| 518 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
</div>
|
| 520 |
</div>
|
| 521 |
</div>
|
|
@@ -582,16 +591,13 @@
|
|
| 582 |
document.getElementById('downloadResource').value = resourceName;
|
| 583 |
document.getElementById('send_email_to_vM_customer').action = actionUrl;
|
| 584 |
document.getElementById('downloadModal').classList.remove('hidden');
|
| 585 |
-
document.body.
|
| 586 |
-
document.getElementById('downloadModal').style.display = 'flex';
|
| 587 |
}
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
document.body.
|
| 592 |
-
|
| 593 |
-
modal.style.display = 'none';
|
| 594 |
-
}, 300); // Match the CSS transition duration
|
| 595 |
}
|
| 596 |
// Handle form submission
|
| 597 |
document.getElementById('send_email_to_vM_customer').addEventListener('submit', function(e) {
|
|
@@ -608,9 +614,8 @@ function closeDownloadModal() {
|
|
| 608 |
this.submit();
|
| 609 |
closeDownloadModal();
|
| 610 |
});
|
| 611 |
-
|
| 612 |
function validateEmail(email) {
|
| 613 |
-
const re = /^[
|
| 614 |
return re.test(email);
|
| 615 |
}
|
| 616 |
// Init animations (after scripts loaded)
|
|
|
|
| 497 |
</div>
|
| 498 |
</section>
|
| 499 |
<!-- Download Modal -->
|
| 500 |
+
<!-- Download Modal -->
|
| 501 |
<form id="send_email_to_vM_customer" action="./Ask_sendEmailToCustomer.php" method="post">
|
| 502 |
+
<div id="downloadModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center transition-opacity duration-300 hidden">
|
| 503 |
+
<div class="bg-white p-8 rounded-lg w-full max-w-md mx-4 relative">
|
| 504 |
+
<button onclick="closeDownloadModal()" class="absolute top-4 right-4 text-gray-500 hover:text-gray-700">
|
| 505 |
<i data-feather="x" class="w-6 h-6"></i>
|
| 506 |
</button>
|
| 507 |
+
<h3 class="text-2xl font-bold text-[var(--vlc-navy)] mb-6">Download Resource</h3>
|
| 508 |
+
<div class="space-y-6">
|
| 509 |
+
<div>
|
| 510 |
+
<label for="vM_customer_email" class="block text-sm font-medium text-gray-700 mb-1">Enter your email to download</label>
|
| 511 |
+
<span id="VMerror" class="hidden text-sm text-red-500">Please enter a valid business email</span>
|
| 512 |
+
<input
|
| 513 |
+
name="vM_customer_email"
|
| 514 |
+
id="vM_customer_email"
|
| 515 |
+
type="email"
|
| 516 |
+
placeholder="Email address*"
|
| 517 |
+
required
|
| 518 |
+
autocomplete="email"
|
| 519 |
+
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[var(--vlc-sky)] focus:border-[var(--vlc-sky)]"
|
| 520 |
+
/>
|
| 521 |
</div>
|
| 522 |
+
<input type="hidden" id="downloadResource" name="resource" value="">
|
| 523 |
+
<button type="submit" class="w-full btn-primary py-3 rounded-md font-medium">
|
| 524 |
+
Download Now
|
| 525 |
+
</button>
|
| 526 |
+
<input type="hidden" id="g-recaptcha-response-three" name="g-recaptcha-response-three">
|
| 527 |
+
<input type="hidden" name="action" value="validate_captcha_three">
|
| 528 |
</div>
|
| 529 |
</div>
|
| 530 |
</div>
|
|
|
|
| 591 |
document.getElementById('downloadResource').value = resourceName;
|
| 592 |
document.getElementById('send_email_to_vM_customer').action = actionUrl;
|
| 593 |
document.getElementById('downloadModal').classList.remove('hidden');
|
| 594 |
+
document.body.classList.add('overflow-hidden');
|
|
|
|
| 595 |
}
|
| 596 |
+
|
| 597 |
+
function closeDownloadModal() {
|
| 598 |
+
document.getElementById('downloadModal').classList.add('hidden');
|
| 599 |
+
document.body.classList.remove('overflow-hidden');
|
| 600 |
+
document.getElementById('VMerror').classList.add('hidden');
|
|
|
|
|
|
|
| 601 |
}
|
| 602 |
// Handle form submission
|
| 603 |
document.getElementById('send_email_to_vM_customer').addEventListener('submit', function(e) {
|
|
|
|
| 614 |
this.submit();
|
| 615 |
closeDownloadModal();
|
| 616 |
});
|
|
|
|
| 617 |
function validateEmail(email) {
|
| 618 |
+
const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
| 619 |
return re.test(email);
|
| 620 |
}
|
| 621 |
// Init animations (after scripts loaded)
|
style.css
CHANGED
|
@@ -7,7 +7,6 @@ body {
|
|
| 7 |
section {
|
| 8 |
padding: 4rem 0;
|
| 9 |
}
|
| 10 |
-
|
| 11 |
.btn-primary {
|
| 12 |
background: var(--vlc-navy);
|
| 13 |
color: white;
|
|
@@ -15,6 +14,58 @@ section {
|
|
| 15 |
border-radius: 0.375rem;
|
| 16 |
font-weight: 500;
|
| 17 |
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
.btn-primary:hover {
|
| 20 |
background: var(--vlc-navy-700);
|
|
|
|
| 7 |
section {
|
| 8 |
padding: 4rem 0;
|
| 9 |
}
|
|
|
|
| 10 |
.btn-primary {
|
| 11 |
background: var(--vlc-navy);
|
| 12 |
color: white;
|
|
|
|
| 14 |
border-radius: 0.375rem;
|
| 15 |
font-weight: 500;
|
| 16 |
transition: all 0.3s ease;
|
| 17 |
+
border: none;
|
| 18 |
+
cursor: pointer;
|
| 19 |
+
text-align: center;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
/* Modal styles */
|
| 23 |
+
#downloadModal {
|
| 24 |
+
transition: opacity 0.3s ease;
|
| 25 |
+
opacity: 0;
|
| 26 |
+
pointer-events: none;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
#downloadModal.hidden {
|
| 30 |
+
opacity: 0;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
#downloadModal:not(.hidden) {
|
| 34 |
+
opacity: 1;
|
| 35 |
+
pointer-events: auto;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
#downloadModal > div {
|
| 39 |
+
background: white;
|
| 40 |
+
padding: 2rem;
|
| 41 |
+
border-radius: 0.5rem;
|
| 42 |
+
width: 100%;
|
| 43 |
+
max-width: 28rem;
|
| 44 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
|
| 45 |
+
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 46 |
+
position: relative;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
#downloadModal input[type="text"] {
|
| 50 |
+
width: 100%;
|
| 51 |
+
padding: 0.75rem;
|
| 52 |
+
border: 1px solid #e5e7eb;
|
| 53 |
+
border-radius: 0.375rem;
|
| 54 |
+
margin-bottom: 1rem;
|
| 55 |
+
font-size: 1rem;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
#downloadModal input[type="text"]:focus {
|
| 59 |
+
outline: none;
|
| 60 |
+
border-color: var(--vlc-sky);
|
| 61 |
+
box-shadow: 0 0 0 3px rgba(0, 160, 233, 0.1);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
#VMerror {
|
| 65 |
+
color: #ef4444;
|
| 66 |
+
font-size: 0.875rem;
|
| 67 |
+
margin-bottom: 0.5rem;
|
| 68 |
+
display: block;
|
| 69 |
}
|
| 70 |
.btn-primary:hover {
|
| 71 |
background: var(--vlc-navy-700);
|