From c602d5b8f856a20b434ae525c62c731d0828ac81 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Wed, 2 Oct 2024 03:32:27 -0400 Subject: [PATCH] add AI page --- app.js | 10 ++ public/js/chat.js | 207 +++++++++++++++++++++++ views/chat.ejs | 416 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 633 insertions(+) create mode 100644 public/js/chat.js create mode 100644 views/chat.ejs diff --git a/app.js b/app.js index a34f7b8..ea4b837 100644 --- a/app.js +++ b/app.js @@ -175,6 +175,16 @@ app.get('/contact', (req, res) => { }); }); +// Contact Route (Render the contact form) +app.get('/chat', (req, res) => { + res.render('chat', { + title: `Chat ${process.env.OWNER_NAME}`, + msg: undefined, + menuItems // Pass the menu items to the view + }); +}); + + // Blog Post Route app.get('/blog/:slug', (req, res) => { const slug = req.params.slug; diff --git a/public/js/chat.js b/public/js/chat.js new file mode 100644 index 0000000..8e09e8e --- /dev/null +++ b/public/js/chat.js @@ -0,0 +1,207 @@ + + + + + + + + + + Chat with AI - <%= process.env.OWNER_NAME %> + + + + + + + + + + + + + + + + + + + + + + +
+
+

Chat with <%= process.env.OWNER_NAME %>'s AI

+

Ask any question, and the AI will respond to you!

+ + +
+
+ + + + + + +
+ + + + + +
+
+ + + + + + + + + + + + + + + + + diff --git a/views/chat.ejs b/views/chat.ejs new file mode 100644 index 0000000..f757688 --- /dev/null +++ b/views/chat.ejs @@ -0,0 +1,416 @@ + + + + + + + + + + Chat with AI - <%= process.env.OWNER_NAME %> + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+
+ + +
+ + + +
+ + +
+
+ + + + + +
+ + +
+

© 2024 <%= process.env.OWNER_NAME %>. All rights reserved.

+
+
+ + + + + + + + + + + + + + \ No newline at end of file