From ffc634522d39bd5b3875bc88303f18a8b807b87a Mon Sep 17 00:00:00 2001 From: PhilsKay Date: Tue, 11 Oct 2022 04:42:50 +0100 Subject: [PATCH] Contact form is working --- assets/css/style.css | 54 ++++++++++++++++++++++++-------------------- assets/js/main.js | 22 +++++++++++++++++- index.html | 30 ++++++++++++++++-------- 3 files changed, 70 insertions(+), 36 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index fb7d9d8..9e2ee66 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -82,7 +82,7 @@ h6 { right: 15px; bottom: 15px; z-index: 996; - background: #3b4ef8; + background: #b1b8f0; width: 40px; height: 40px; border-radius: 4px; @@ -90,6 +90,7 @@ h6 { } .back-to-top i { font-size: 28px; + color:#111; /* color: #fff;*/ line-height: 0; } @@ -307,9 +308,9 @@ h6 { line-height: 0; transition: 0.5s; } -.mobile-nav-toggle.bi-x { - /* color: #fff;*/ -} +/* .mobile-nav-toggle.bi-x { */ + /* color: #fff; */ +/* } */ @media (max-width: 991px) { .mobile-nav-toggle { @@ -429,6 +430,7 @@ h6 { display: block; padding: 8px 32px 10px 32px; margin-top: 25px; + margin-bottom: 25px; border-radius: 5px; transition: 0.5s; color: #fff; @@ -968,10 +970,10 @@ section { /*-------------------------------------------------------------- # Team --------------------------------------------------------------*/ -.team { +/* .team { */ /* background: #fff; */ /* padding: 35px 7rem; */ -} +/* } */ .founder-img { width: 13rem; @@ -1042,9 +1044,10 @@ section { margin: 0 10px; display: inline-block; } -.team .member .social a:hover { +/* .team .member .social a:hover { */ /* color: #fff;*/ -} +/* } */ + .team .member .social i { font-size: 18px; margin: 0 2px; @@ -1201,9 +1204,9 @@ section { .faq .faq-list .icon-show { display: none; } -.faq .faq-list .collapsed { +/* .faq .faq-list .collapsed { */ /* color: black; */ -} +/* } */ .faq .faq-list .collapsed:hover { color: #3b4ef8; } @@ -1243,12 +1246,12 @@ section { font-size: 14px; margin-bottom: 0; } -.contact .php-email-form { +.contact .javascript-email-form { box-shadow: 0 0 30px rgba(214, 215, 216, 0.6); padding: 30px; background: #fff; } -.contact .php-email-form .error-message { +.contact .javascript-email-form .error-message { display: none; /* color: #fff;*/ background: #ed3c0d; @@ -1256,10 +1259,10 @@ section { padding: 15px; font-weight: 600; } -.contact .php-email-form .error-message br + br { +.contact .javascript-email-form .error-message br + br { margin-top: 25px; } -.contact .php-email-form .sent-message { +.contact .javascript-email-form .sent-message { display: none; /* color: #fff;*/ background: #18d26e; @@ -1267,13 +1270,13 @@ section { padding: 15px; font-weight: 600; } -.contact .php-email-form .loading { +.contact .javascript-email-form .loading { display: none; background: #fff; text-align: center; padding: 15px; } -.contact .php-email-form .loading:before { +.contact .javascript-email-form .loading:before { content: ""; display: inline-block; border-radius: 50%; @@ -1285,23 +1288,23 @@ section { -webkit-animation: animate-loading 1s linear infinite; animation: animate-loading 1s linear infinite; } -.contact .php-email-form input, -.contact .php-email-form textarea { +.contact .javascript-email-form input, +.contact .javascript-email-form textarea { border-radius: 5px; box-shadow: none; font-size: 14px; } -.contact .php-email-form input:focus, -.contact .php-email-form textarea:focus { +.contact .javascript-email-form input:focus, +.contact .javascript-email-form textarea:focus { border-color: #8ea5ca; } -.contact .php-email-form input { +.contact .javascript-email-form input { padding: 10px 15px; } -.contact .php-email-form textarea { +.contact .javascript-email-form textarea { padding: 12px 15px; } -.contact .php-email-form button[type="submit"] { +.contact .javascript-email-form button[type="submit"] { background: #3b4ef8; border: 0; padding: 10px 24px; @@ -1309,7 +1312,7 @@ section { transition: 0.4s; border-radius: 5px; } -.contact .php-email-form button[type="submit"]:hover { +.contact .javascript-email-form button[type="submit"]:hover { background: #0a22f6; } @-webkit-keyframes animate-loading { @@ -1486,7 +1489,8 @@ section { transition: 0.3s; } #footer .social-links a:hover { - background: #3b4ef8; + background: #a7aeed; + /* background: #ebeda7; */ /* color: #fff;*/ text-decoration: none; } diff --git a/assets/js/main.js b/assets/js/main.js index d3d0bc5..d4c5e4a 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -243,4 +243,24 @@ }) }); -})() \ No newline at end of file +})() + +/* +Function that sends the email to eduuhub +*/ +function SendMail() { + const Data = '{"service" : "service_t4spjxu", "template" : "template_voik16d"}'; + const Object = JSON.parse(Data); + var params = { + from_name: document.forms["contact-form"]["name"].value, + from_email: document.forms["contact-form"]["email"].value, + subject_tittle: document.forms["contact-form"]["subject"].value, + message: document.forms["contact-form"]["message"].value, + } + emailjs.send(Object.service, Object.template, params).then(function (res) { + var element = document.getElementById('sent_message'); + element.innerHTML = "Your message has been sent. Thank you!"; + element.classList.add("alert"); + element.classList.add("alert-success"); + }) +} \ No newline at end of file diff --git a/index.html b/index.html index 6437dfa..3013358 100644 --- a/index.html +++ b/index.html @@ -28,9 +28,21 @@ - + + + + + + + @@ -1242,7 +1254,7 @@

Call Us

-
+
@@ -1255,13 +1267,10 @@

Call Us

- +
-
-
Loading
-
-
- Your message has been sent. Thank you! +
+
@@ -1372,8 +1381,8 @@

Subscribe

- + + @@ -1383,6 +1392,7 @@

Subscribe

+