From c1ea25e97359e91ce5123eff5409e6149d148fd0 Mon Sep 17 00:00:00 2001 From: Abhinav Singh Date: Sat, 28 Oct 2023 15:25:23 +0530 Subject: [PATCH 1/2] completed with aboutus and contact --- assets/css/style.css | 76 ++++++++++++++++++++++++++++++++++++++++++-- index.html | 68 +++++++++++++++++++++++++++++++++++---- 2 files changed, 136 insertions(+), 8 deletions(-) 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/index.html b/index.html index 578805a..dcf637e 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,11 @@ rel="stylesheet" /> + @@ -33,12 +38,13 @@
EN RU + LV
@@ -64,7 +70,7 @@

- Contact Us @@ -136,7 +142,7 @@

Import/Export

- +

Our Key Markets

-
+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt @@ -153,7 +159,7 @@

Our Key Markets

-
+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt @@ -170,6 +176,56 @@

Our Key Markets

+ +
+ +
+

About Us

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Error aut dignissimos voluptates ipsa cumque fuga quam ipsum, numquam placeat nesciunt, beatae voluptatum id. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quam iste quidem saepe obcaecati voluptate ipsam, doloremque beatae reiciendis, eum dignissimos nam, quisquam alias vero. +

+
+ +
+ +
+

Book Your Free Business Consultation

+ +
+
+ + + + + + +
+ + +
+ + +
+ + + + From 3af4d0982f78d1a9514426f503b8c2380d4ea69d Mon Sep 17 00:00:00 2001 From: Abhinav Singh Date: Mon, 30 Oct 2023 10:56:02 +0530 Subject: [PATCH 2/2] completed sending emails with aws lambda and gateway --- assets/js/script.js | 56 ++++++++++++++++++++++++++++++++++++++++++++- index.html | 18 +++++++++------ 2 files changed, 66 insertions(+), 8 deletions(-) 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 dcf637e..0ecd9cc 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ media="screen and (max-width: 768px)" href="./css/mobile.css" /> - +
@@ -190,17 +190,17 @@

About Us

Book Your Free Business Consultation

-
+
- + - + - +
- +
@@ -226,6 +226,10 @@

Book Your Free Business Consultation

- + +