From c2651785df6f1e4a213f73d5a219cb4a4e92b3f9 Mon Sep 17 00:00:00 2001 From: Leo <95978312+yaefdb@users.noreply.github.com> Date: Sun, 21 Jan 2024 02:33:00 +0800 Subject: [PATCH 1/5] update --- consumerWebsite/public/css/sp.css | 2 +- consumerWebsite/public/js/contact.js | 4 +- consumerWebsite/routes/render.js | 24 ++++++++++ consumerWebsite/views/bot.ejs | 3 ++ consumerWebsite/views/forgotPassword.ejs | 17 +++++++ consumerWebsite/views/index.ejs | 6 +-- consumerWebsite/views/learnmore.ejs | 41 +++++++++++++++++ consumerWebsite/views/logintop.ejs | 2 +- consumerWebsite/views/profile.ejs | 57 ++++++++++++++++++++++++ consumerWebsite/views/signuplogin.ejs | 15 +++++++ consumerWebsite/views/top.ejs | 6 +-- 11 files changed, 166 insertions(+), 11 deletions(-) create mode 100644 consumerWebsite/views/forgotPassword.ejs create mode 100644 consumerWebsite/views/learnmore.ejs create mode 100644 consumerWebsite/views/profile.ejs diff --git a/consumerWebsite/public/css/sp.css b/consumerWebsite/public/css/sp.css index 236fe6a..b127874 100644 --- a/consumerWebsite/public/css/sp.css +++ b/consumerWebsite/public/css/sp.css @@ -251,4 +251,4 @@ form .top-nav .navbar-toggler:hover{ color: #4eae3a; border-color: #4eae3a; -} \ No newline at end of file +} diff --git a/consumerWebsite/public/js/contact.js b/consumerWebsite/public/js/contact.js index 98a07a6..75ef351 100644 --- a/consumerWebsite/public/js/contact.js +++ b/consumerWebsite/public/js/contact.js @@ -23,17 +23,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) { diff --git a/consumerWebsite/routes/render.js b/consumerWebsite/routes/render.js index 857727c..1b1f2c9 100644 --- a/consumerWebsite/routes/render.js +++ b/consumerWebsite/routes/render.js @@ -51,12 +51,36 @@ router.get('/news', function(req, res, next) { res.render('news'); }); +<<<<<<< Updated upstream //login / register page +======= +//learn more page +router.get('/learnmore', function(req, res, next) { + res.render('learnmore'); +}); + +//login | register page +>>>>>>> Stashed changes router.get('/login', function(req, res, next) { res.render('signuplogin'); }); +<<<<<<< Updated upstream //login / register page +======= +//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 +>>>>>>> Stashed changes router.get('/contact', function(req, res, next) { res.render('contact'); }); diff --git a/consumerWebsite/views/bot.ejs b/consumerWebsite/views/bot.ejs index 898fd63..22424d4 100644 --- a/consumerWebsite/views/bot.ejs +++ b/consumerWebsite/views/bot.ejs @@ -85,4 +85,7 @@ + + + diff --git a/consumerWebsite/views/forgotPassword.ejs b/consumerWebsite/views/forgotPassword.ejs new file mode 100644 index 0000000..71f8933 --- /dev/null +++ b/consumerWebsite/views/forgotPassword.ejs @@ -0,0 +1,17 @@ +<%- include('logintop') %> + + +
+
+
Reset Password
+
+ + + + +
+
+ Dont have an account? Sign Up +
+
+ \ No newline at end of file diff --git a/consumerWebsite/views/index.ejs b/consumerWebsite/views/index.ejs index f1a31a7..978a726 100644 --- a/consumerWebsite/views/index.ejs +++ b/consumerWebsite/views/index.ejs @@ -56,7 +56,7 @@

70% - 75%

@@ -67,7 +67,7 @@

15 - 18 PSI

@@ -78,7 +78,7 @@

30° - 37°

diff --git a/consumerWebsite/views/learnmore.ejs b/consumerWebsite/views/learnmore.ejs new file mode 100644 index 0000000..70cfd55 --- /dev/null +++ b/consumerWebsite/views/learnmore.ejs @@ -0,0 +1,41 @@ +<%- include('top') %> + +
+
+ +
+ Singapore Map + + +
+

North

+

Air Quality Index: 15

+
+ +
+

South

+

Air Quality Index: 16

+
+ +
+

East

+

Air Quality Index: 16

+
+ +
+

West

+

Air Quality Index: 18

+
+ +
+

Central

+

Air Quality Index: 17

+
+ +
+
+ +
+
+ +<%- include('bot') %> \ No newline at end of file diff --git a/consumerWebsite/views/logintop.ejs b/consumerWebsite/views/logintop.ejs index 4d2adb9..e883dfb 100644 --- a/consumerWebsite/views/logintop.ejs +++ b/consumerWebsite/views/logintop.ejs @@ -62,7 +62,7 @@