diff --git a/assets/css/style.css b/assets/css/style.css index f621354..b727cf9 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -52,7 +52,7 @@ header.hero{ .hero::before { content: ''; position: absolute; - background: rgba(0, 0, 0, 0.6); + background: rgba(73, 56, 56, 0.6); top: 0; left: 0; width: 100%; @@ -227,7 +227,6 @@ header.hero{ justify-content:space-between; padding: .3rem; transition: all .3s ease-in; - opacity: 1; } @@ -248,6 +247,79 @@ header.hero{ width: 80%; } +/* about us */ +#about-us{ + margin: 1rem 2rem; + border-radius: 10px; + padding: 1rem; + display: flex; + justify-content: space-between; +} + +#about-us .flex-items{ + display: flex; + flex-direction: column; + width: 50%; +} + +#contact-us{ + margin: 1rem 2rem; + border-radius: 10px; + padding: 1rem; +} + +#contact-us .form-control{ + margin-top: .5rem; + display: flex; + flex-direction: column; + max-width: 60%; + line-height: 1.5; + margin-bottom: .5rem; +} +#contact-us .form-control label{ + font-size: large; + font-weight: 600; + margin: .3rem 0; +} + +#contact-us .form-control input,#contact-us .form-control textarea{ + line-height: 2; + padding: .3rem; + border-radius: 10px; +} + +/* main footer */ +#main-footer{ + padding: 1rem; +} + +#main-footer .social{ + display: flex; + justify-content: center; + gap: 2rem; +} + +#main-footer .social a{ + text-decoration: none; + color: #f4f4f4; +} + +#main-footer .footer-content{ + width: 40%; +} + +#main-footer .legal{ + margin-top: .2rem; + display: flex; + justify-content: center; + gap: 1rem; +} + +#main-footer .legal a{ + text-decoration: none; + color: #f4f4f4; +} + /* utilities */ .container{ diff --git a/assets/js/script.js b/assets/js/script.js index 74cc0d0..9927605 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -11,7 +11,7 @@ centralEu.addEventListener('click', () => { panels.forEach(panel => panel.classList.add('hide')); panels[0].classList.toggle('hide'); - + }); easternEu.addEventListener('click', () => { @@ -25,3 +25,57 @@ asia.addEventListener('click', () => { panels[2].classList.toggle('hide'); }); + + + +function submitToAPI(e) { + e.preventDefault(); + var URL = "https://jnr9lnb7cg.execute-api.us-east-1.amazonaws.com/prod/contact-us"; + + var Namere = /[A-Za-z]{1}[A-Za-z]/; + if (!Namere.test($("#name-input").val())) { + alert("Name can not less than 2 char"); + return; + } + + if ($("#email-input").val() == "") { + alert("Please enter your email id"); + return; + } + + var reeamil = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/; + if (!reeamil.test($("#email-input").val())) { + alert("Please enter valid email address"); + return; + } + + var name = $("#name-input").val(); + var email = $("#email-input").val(); + var desc = $("#description-input").val(); + var data = { + name: name, + email: email, + desc: desc + }; + + $.ajax({ + type: "POST", + url: URL, + dataType: "json", + crossDomain: "true", + contentType: "application/json; charset=utf-8", + data: JSON.stringify(data), + + + success: function () { + // clear form and show a success message + alert("Your message sent SucessFully !"); + document.getElementById("contact-form").reset(); + location.reload(); + }, + error: function () { + // show an error message + alert("There was some error , try dropping us an email"); + } + }); +} diff --git a/index.html b/index.html index 578805a..0ecd9cc 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,12 @@ rel="stylesheet" /> - + +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt @@ -153,7 +159,7 @@