Landing moved to be the index page, routes added and landing page image route fixed

This commit is contained in:
nicoagostini committed 2025-05-05 16:46:16 -07:00
1 parent 10541d2428
commit d0aa7a0fbd
4 files changed
+34 -9

No files matched your search

+31 -5
View File
@@ -25,6 +25,7 @@ app.set('view engine', 'ejs');
app.set('views',path.join(__dirname, 'src/views'));
app.use(express.urlencoded({ extended: true }));
app.use("/static", express.static("./src/public"));
app.use("/images", express.static("./src/public/images"));
/*** Database ***/
const { connectMongo, getCollection } = require("./src/database/connection");
@@ -52,11 +53,6 @@ initDatabase().then(() => {
app.get('/', (req, res) => {
if (!req.session.errMessage) req.session.errMessage = "";
res.render('index');
return res.status(status.Ok);
});
app.get('/landing', (req, res) => {
res.render('landing');
return res.status(status.Ok);
});
@@ -75,11 +71,41 @@ app.get('/login', (req, res) => {
return res.status(status.Ok);
});
app.get('/home', (req, res) => {
res.render('home');
return res.status(status.Ok);
});
app.get('/aboutUs', (req, res) => {
res.render('aboutUs');
return res.status(status.Ok);
});
app.get('/assets', (req, res) => {
res.render('assets');
return res.status(status.Ok);
});
app.get('/plans', (req, res) => {
res.render('plans');
return res.status(status.Ok);
});
app.get('/more', (req, res) => {
res.render('more');
return res.status(status.Ok);
});
app.get('/profile', (req, res) => {
res.render('profile');
return res.status(status.Ok);
});
app.get('/settings', (req, res) => {
res.render('settings');
return res.status(status.Ok);
});
app.get('/*splat', (req, res) => {
res.send('404 Not Found');
return res.status(status.NotFound);
+1 -1
View File
@@ -1,7 +1,7 @@
<header>
<nav class="bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="#" class="flex items-center space-x-3 rtl:space-x-reverse">
<a href="/home" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
</a>
+2 -2
View File
@@ -1,7 +1,7 @@
<header>
<nav class="bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="#" class="flex items-center space-x-3 rtl:space-x-reverse">
<a href="/" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png" class="h-8" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">RCalculator</span>
</a>
@@ -17,7 +17,7 @@
<div class="hidden w-full lg:block lg:w-auto" id="navbar-solid-bg">
<ul class="flex flex-col font-medium mt-4 rounded-lg bg-gray-50 lg:space-x-8 rtl:space-x-reverse lg:flex-row lg:mt-0 lg:border-0 lg:bg-transparent dark:bg-gray-800 lg:dark:bg-transparent dark:border-gray-700">
<li>
<a href="/landing" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Home</a>
<a href="/" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">Home</a>
</li>
<li>
<a href="/aboutUs" class="block py-2 px-3 lg:p-0 text-gray-900 rounded hover:bg-gray-100 lg:hover:bg-transparent lg:border-0 lg:hover:text-blue-700 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent">About Us</a>
-1
View File
@@ -6,7 +6,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup</title>
<link rel="stylesheet" href="/static/css/style.css" <link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="