diff --git a/img/popup.jpg b/img/popup.jpg new file mode 100644 index 00000000..51f670d0 Binary files /dev/null and b/img/popup.jpg differ diff --git a/img/popup1.jpg b/img/popup1.jpg new file mode 100644 index 00000000..f95be093 Binary files /dev/null and b/img/popup1.jpg differ diff --git a/img/popup2.jpg b/img/popup2.jpg new file mode 100644 index 00000000..62a6942a Binary files /dev/null and b/img/popup2.jpg differ diff --git a/img/popup3.jpg b/img/popup3.jpg new file mode 100644 index 00000000..3d791ee9 Binary files /dev/null and b/img/popup3.jpg differ diff --git a/index.html b/index.html index 8fc906ac..cb468d25 100644 --- a/index.html +++ b/index.html @@ -8,10 +8,13 @@ content="BuddyTrail is a travel agency website that helps you pick out your holiday vacation" /> + + + BuddyTrail + + + + + + + +
diff --git a/script/popup.js b/script/popup.js new file mode 100644 index 00000000..efeceb04 --- /dev/null +++ b/script/popup.js @@ -0,0 +1,28 @@ +// Show the pop-up automatically when the page loads +window.onload = function() { + document.getElementById('popup').style.display = 'flex'; +}; + +// Close the pop-up when the user clicks outside of it +window.onclick = function(event) { + if (event.target === document.getElementById('popup')) { + document.getElementById('popup').style.display = 'none'; + } +}; + +// Handle form submission +document.getElementById('emailForm').addEventListener('submit', function(event) { + event.preventDefault(); + + const email = document.getElementById('email').value; + if (email) { + alert(`Thank you! A 20% discount code has been sent to ${email}`); + document.getElementById('popup').style.display = 'none'; + } +}); + +// Handlling "No thanks" button +document.getElementById('no-thanks').addEventListener('click', function(event) { + event.preventDefault(); + document.getElementById('popup').style.display = 'none'; +}); diff --git a/styles/popup.css b/styles/popup.css new file mode 100644 index 00000000..c79a26b9 --- /dev/null +++ b/styles/popup.css @@ -0,0 +1,103 @@ +/* Styling for the pop-up */ +.popup { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.7); + justify-content: center; + align-items: center; + z-index: 1000; + } + + #popup-content { + display: flex; + background-color: #fff; + border-radius: 10px; + width: 100%; + max-width: 750px; + height: 450px; + overflow: hidden; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); + } + + .popup-left img { + width: 100%; + height: 100%; + object-fit: cover; + } + + .popup-right { + padding: 10px; + display: flex; + flex-direction: column; + justify-content: center; + width: 50%; + } + + .popup h1 { + font-size: 22px; + color: #000000; + text-align: center; + margin-bottom: 10px; + } + + .popup .h2 { + font-weight: bold; + font-size: 18px; + color: #007BFF; + text-align: center; + margin-bottom: 10px; + } + + .popup-right p{ + font-size: 13px; + text-align: center; + color: #000000; + } + + input[type="email"] { + width: 100%; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 16px; + } + + #signup-btn { + width: 100%; + padding: 8px; + background-color: #007BFF; + color: rgb(0, 0, 0); + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 15px; + margin-bottom: 8px; + font-weight: 460; + } + + + .signup-btn:hover { + background-color: #6a00ff; + } + + #no-thanks { + text-align: center; + color: #212121; + font-size: 14px; + margin-bottom: 8px; + font-weight: 470; + + } + + #terms { + font-size: 12px; + text-align: center; + } + + #link{ + color: black; + } + \ No newline at end of file