diff --git a/README.md b/README.md index 6275025..022ac48 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ i repeat DO NOT USE CREDS IN CODE! Please use .env files (https://www.npmjs.com/ 1) Ti Seng * Webserver Microservices * IoT sensor -* All Database / Backend Functions +* Most Database / Backend Functions of this repo * consumer website api and user function 2) Sean * Admin Website Microservice diff --git a/consumerWebsite/public/css/sp.css b/consumerWebsite/public/css/sp.css index 907b813..971c161 100644 --- a/consumerWebsite/public/css/sp.css +++ b/consumerWebsite/public/css/sp.css @@ -253,4 +253,4 @@ form .top-nav .navbar-toggler:hover{ color: #4eae3a; border-color: #4eae3a; -} \ No newline at end of file +} diff --git a/consumerWebsite/public/js/app.js b/consumerWebsite/public/js/app.js index 1e3d235..7682959 100644 --- a/consumerWebsite/public/js/app.js +++ b/consumerWebsite/public/js/app.js @@ -256,7 +256,7 @@ app.auth = (function (app) { }; })(app); -//ajax form submit +//ajax form submit and pass to api function formAJAX(btn, del) { event.preventDefault(); // avoid to execute the actual submit of the form. var $form = $(btn).closest("[action]"); // gets the 'form' parent diff --git a/consumerWebsite/routes/render.js b/consumerWebsite/routes/render.js index 352cf11..30a493e 100644 --- a/consumerWebsite/routes/render.js +++ b/consumerWebsite/routes/render.js @@ -51,11 +51,27 @@ router.get('/news', function(req, res, next) { res.render('news'); }); +//learn more page +router.get('/learnmore', function(req, res, next) { + res.render('learnmore'); +}); + //login | register page router.get('/login', function(req, res, next) { res.render('signuplogin'); }); +//profile page +router.get('/profile', function(req, res, next) { + res.render('profile'); +}); + +//forgot password page +router.get('/forgotPassword', function(req, res, next) { + res.render('forgotPassword'); + +}); + //contact page router.get('/contact', function(req, res, next) { res.render('contact'); diff --git a/consumerWebsite/views/bot.ejs b/consumerWebsite/views/bot.ejs index 6716b71..33ed08f 100644 --- a/consumerWebsite/views/bot.ejs +++ b/consumerWebsite/views/bot.ejs @@ -85,6 +85,9 @@ + + + diff --git a/consumerWebsite/views/learnmore.ejs b/consumerWebsite/views/learnmore.ejs index 5b3062f..9be0da4 100644 --- a/consumerWebsite/views/learnmore.ejs +++ b/consumerWebsite/views/learnmore.ejs @@ -1,6 +1,5 @@ <%- include('top') %> -

diff --git a/consumerWebsite/views/profile.ejs b/consumerWebsite/views/profile.ejs index 3f07128..03f9351 100644 --- a/consumerWebsite/views/profile.ejs +++ b/consumerWebsite/views/profile.ejs @@ -61,4 +61,4 @@
<%- include('bot') %> - \ No newline at end of file + diff --git a/consumerWebsite/views/top.ejs b/consumerWebsite/views/top.ejs index b6564b1..4e8cab4 100644 --- a/consumerWebsite/views/top.ejs +++ b/consumerWebsite/views/top.ejs @@ -26,7 +26,6 @@ - @@ -112,6 +111,8 @@ + + \ No newline at end of file diff --git a/contact.js b/contact.js index 0485125..5fb66c9 100644 --- a/contact.js +++ b/contact.js @@ -24,17 +24,15 @@ document.addEventListener('DOMContentLoaded', () => { const result = await response.json(); // Handle the API response - //console.log(result); + console.log(result); if (result.success) { // Form submitted successfully, display notification alert('Form submitted successfully!'); location.reload() - // You can replace the alert with your custom notification logic } else { // Form submission failed, display error notification alert('Form submission failed. Please try again.'); - // You can replace the alert with your custom error notification logic } } catch (error) {