Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
612bb262d1 | ||
|
|
6819b82723 | ||
|
|
5b1b36a553
|
||
|
|
1114789e57
|
||
|
|
bb6e2eba2c
|
||
|
|
d0aa7a0fbd | ||
|
|
10541d2428 | ||
|
|
7fa75457c9 | ||
|
|
fe7152b03b
|
||
|
|
87cad63425
|
||
|
|
d08fd30888
|
||
|
|
7ef6282ac0
|
||
|
|
02a8374a58 | ||
|
|
0e4d4d7daf
|
||
|
|
50dab82945 | ||
|
|
8832768838 | ||
|
|
44cee349e9 | ||
|
|
2a070d95c1 | ||
|
|
eaecb883e6 | ||
|
|
2bd4b1e16e | ||
|
|
7f9e594e9b | ||
|
|
1f9416e0bd | ||
|
|
e4a6c7ef36 | ||
|
|
3ef8129196 | ||
|
|
c1f3aa126b
|
||
|
|
f3ee6d091e
|
No files matched your search
@@ -1,2 +1,4 @@
|
|||||||
mongoURI='mongodb://localhost:27017/'
|
mongoURI='mongodb://localhost:27017/'
|
||||||
database='nameOfDatabase'
|
database='nameOfDatabase'
|
||||||
|
PORT=8000
|
||||||
|
secret='123456789'
|
||||||
@@ -24,11 +24,27 @@ Example:
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
***Please check back later.***
|
1. **Clone the repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/JoaquinPar/2800-202510-BBY14.git
|
||||||
|
cd 2800-202510-BBY14
|
||||||
|
```
|
||||||
|
|
||||||
1. ...
|
2. **Install dependencies:**
|
||||||
2. ...
|
```bash
|
||||||
3. ...
|
npm install
|
||||||
|
```
|
||||||
|
This will install Express, express-session, EJS, dotenv, and any other required packages listed in `package.json`.
|
||||||
|
|
||||||
|
3. **Create and configure the environment file:**
|
||||||
|
- Create a file named `.env` in the root directory of the project.
|
||||||
|
- Add the necessary environment variables to this file.
|
||||||
|
|
||||||
|
4. **Run the application:**
|
||||||
|
```bash
|
||||||
|
node app.js
|
||||||
|
```
|
||||||
|
The application should now be running, typically on `http://localhost:3000` (or the port specified in your `.env` file).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -37,14 +53,14 @@ Example:
|
|||||||
```
|
```
|
||||||
retirementCalculator/
|
retirementCalculator/
|
||||||
├── src/
|
├── src/
|
||||||
| ├── app.js
|
|
||||||
│ ├── views/
|
│ ├── views/
|
||||||
│ ├── public/
|
│ │ └── partials/
|
||||||
| | ├── css/
|
│ ├── css/
|
||||||
| | ├── icons/
|
│ ├── images/
|
||||||
| | ├── images/
|
│ ├── scripts/
|
||||||
| | └── scripts/
|
│ └── utils/
|
||||||
│ └── util/
|
│
|
||||||
|
├── app.js
|
||||||
├── .env.example
|
├── .env.example
|
||||||
├── .gitignore
|
├── .gitignore
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
Team Name: BBY-14
|
||||||
|
Team Members:
|
||||||
|
<ul>
|
||||||
|
<li> Joaquin Paredes </li>
|
||||||
|
<li> Nicolas Agostini </li>
|
||||||
|
<li> Mitchell Schaeffer </li>
|
||||||
|
<li> Braeden Sowinski </li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
const status = require("./src/util/statuses");
|
||||||
|
const MongoStore = require("connect-mongo");
|
||||||
|
const session = require("express-session");
|
||||||
|
const express = require('express');
|
||||||
|
const path = require('path');
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
const port = process.env.PORT || 3000;
|
||||||
|
|
||||||
|
const mongoURI = process.env.mongoURI || "mongodb://localhost:27017/";
|
||||||
|
const database = process.env.database || "knoldus"; // Database name
|
||||||
|
const secret = process.env.secret || "123-secret-xyz";
|
||||||
|
|
||||||
|
/*** Sessions ***/
|
||||||
|
app.use(session({
|
||||||
|
secret: secret,
|
||||||
|
store: MongoStore.create({ mongoUrl: `${mongoURI}${database}`, crypto: { secret: secret } }),
|
||||||
|
resave: true,
|
||||||
|
saveUninitialized: false,
|
||||||
|
cookie: { maxAge: 60000 },
|
||||||
|
}));
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
let users;
|
||||||
|
async function initDatabase() {
|
||||||
|
const db = await connectMongo(mongoURI, database);
|
||||||
|
|
||||||
|
// For any collection, init here
|
||||||
|
users = await getCollection(db, "users");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** ROUTINGS ***/
|
||||||
|
|
||||||
|
app.get('/', (req, res) => {
|
||||||
|
if (!req.session.errMessage) req.session.errMessage = "";
|
||||||
|
res.render('landing');
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/signup', (req, res) => {
|
||||||
|
res.render('signup', { errMessage: req.session.errMessage });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/login', (req, res) => {
|
||||||
|
if (req.session.authenticated) {
|
||||||
|
res.redirect("/home");
|
||||||
|
return res.status(status.Ok);
|
||||||
|
}
|
||||||
|
res.render('login', { errMessage: req.session.errMessage });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/home', (req, res) => {
|
||||||
|
res.render('home', { session: req.session });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/aboutUs', (req, res) => {
|
||||||
|
res.render('aboutUs');
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/logout', (req, res) => {
|
||||||
|
req.session.destroy();
|
||||||
|
return res.redirect('/login');
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/*splat', (req, res) => {
|
||||||
|
res.send('404 Not Found');
|
||||||
|
return res.status(status.NotFound);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize database and start app
|
||||||
|
initDatabase().then(() => {
|
||||||
|
console.log("Successfully connected to MongoDB");
|
||||||
|
|
||||||
|
// Import authentication handler
|
||||||
|
app.use(require("./src/auth/authentication")(users));
|
||||||
|
|
||||||
|
// Import middleware & apply to user routes
|
||||||
|
const middleware = require("./src/auth/middleware")(users);
|
||||||
|
app.use(require("./src/router/user")(middleware));
|
||||||
|
|
||||||
|
// 404 handler
|
||||||
|
app.get('/*splat', (req, res) => {
|
||||||
|
res.send('404 Not Found');
|
||||||
|
return res.status(status.NotFound);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Start app
|
||||||
|
app.listen(port, () => {
|
||||||
|
console.log(`Server listening on port ${port}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
Generated
+992
-6
File diff suppressed because it is too large.
Load diff
+11
-4
@@ -2,10 +2,10 @@
|
|||||||
"name": "retirementcalculator",
|
"name": "retirementcalculator",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Retirement Calculator",
|
"description": "Retirement Calculator",
|
||||||
"main": "./src/app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./src/app.js",
|
"start": "node app.js",
|
||||||
"dev": "nodemon ./src/app.js"
|
"dev": "nodemon app.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -18,7 +18,14 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/JoaquinPar/2800-202510-BBY14#readme",
|
"homepage": "https://github.com/JoaquinPar/2800-202510-BBY14#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^5.1.0"
|
"bcrypt": "^5.1.1",
|
||||||
|
"connect-mongo": "^5.1.0",
|
||||||
|
"dotenv": "^16.5.0",
|
||||||
|
"ejs": "^3.1.10",
|
||||||
|
"express": "^5.1.0",
|
||||||
|
"express-session": "^1.18.1",
|
||||||
|
"joi": "^17.13.3",
|
||||||
|
"mongodb": "^6.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nodemon": "^3.1.10"
|
"nodemon": "^3.1.10"
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
const express = require("express");
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
const app = express();
|
|
||||||
const port = 8000;
|
|
||||||
|
|
||||||
app.listen(port, () => {
|
|
||||||
console.log(`Server listening on port ${port}`);
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
const status = require("../util/statuses");
|
||||||
|
const bcrypt = require('bcrypt');
|
||||||
|
const joi = require("joi");
|
||||||
|
const salt = 12;
|
||||||
|
|
||||||
|
module.exports = (users) => {
|
||||||
|
const router = require("express").Router();
|
||||||
|
|
||||||
|
router.get("/logout", (req, res) => {
|
||||||
|
req.session.destroy();
|
||||||
|
// res.status(status.Unauthorized);
|
||||||
|
return res.redirect('/login');
|
||||||
|
});
|
||||||
|
|
||||||
|
router.post("/login", async (req, res) => {
|
||||||
|
const credentialSchema = joi.object({
|
||||||
|
email: joi.string().email().required(),
|
||||||
|
password: joi.string().max(20).required(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const valid = credentialSchema.validate(req.body);
|
||||||
|
|
||||||
|
if (valid.err) {
|
||||||
|
req.session.errMessage = "Invalid input";
|
||||||
|
res.status(status.BadRequest);
|
||||||
|
return res.redirect("/login");
|
||||||
|
}
|
||||||
|
|
||||||
|
users.findOne({ "email": req.body.email }).then((user) => {
|
||||||
|
if (!user) {
|
||||||
|
req.session.errMessage = "User not found";
|
||||||
|
res.status(status.NotFound);
|
||||||
|
return res.redirect("/login");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bcrypt.compareSync(req.body.password, user.password)) {
|
||||||
|
req.session.errMessage = "Incorrect password";
|
||||||
|
res.status(status.Unauthorized);
|
||||||
|
return res.redirect("/login");
|
||||||
|
}
|
||||||
|
|
||||||
|
req.session.authenticated = true;
|
||||||
|
req.session.email = req.body.email;
|
||||||
|
|
||||||
|
req.session.errMessage = "";
|
||||||
|
res.redirect("/home");
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
router.post("/signup", async (req, res) => {
|
||||||
|
const userSchema = joi.object({
|
||||||
|
email: joi.string().email().required(),
|
||||||
|
// name: joi.string().alphanum().max(20).required(),
|
||||||
|
password: joi.string().max(20).min(8).required(),
|
||||||
|
repassword: joi.string().max(20).min(8).required(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const valid = userSchema.validate(req.body);
|
||||||
|
|
||||||
|
if (valid.err) {
|
||||||
|
req.session.errMessage = "Invalid input",
|
||||||
|
res.status(status.BadRequest);
|
||||||
|
return res.redirect("/signup");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req.body.password != req.body.repassword) {
|
||||||
|
req.session.errMessage = "Passwords must match";
|
||||||
|
res.status(status.BadRequest);
|
||||||
|
return res.redirect("/signup");
|
||||||
|
}
|
||||||
|
|
||||||
|
let hashedPassword = await bcrypt.hashSync(req.body.password, salt);
|
||||||
|
|
||||||
|
users.insertOne({
|
||||||
|
email: req.body.email,
|
||||||
|
// name: req.body.name,
|
||||||
|
password: hashedPassword,
|
||||||
|
}).then((results, err) => {
|
||||||
|
if (err) {
|
||||||
|
res.status(status.InternalServerError);
|
||||||
|
console.error(err);
|
||||||
|
return res.send("Internal server error");
|
||||||
|
}
|
||||||
|
|
||||||
|
req.session.authenticated = true;
|
||||||
|
req.session.email = req.body.email;
|
||||||
|
|
||||||
|
req.session.errMessage = "";
|
||||||
|
res.status(status.Ok);
|
||||||
|
return res.redirect("/home");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return router;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
const status = require("../util/statuses");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* createMiddleware returns a middleware function for express.
|
||||||
|
* @param {MongoClient.collection} users
|
||||||
|
* @return {async function}
|
||||||
|
*/
|
||||||
|
const createMiddleware = (users) => {
|
||||||
|
return async (req, res, next) => {
|
||||||
|
if (!req.session.authenticated || !req.session.email) {
|
||||||
|
req.session.errMessage = "Please login to view that resource";
|
||||||
|
res.redirect("/login");
|
||||||
|
return res.status(status.Unauthorized);
|
||||||
|
}
|
||||||
|
|
||||||
|
let user = await users.findOne({ "email": req.session.email }).then((user) => user);
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
req.session.errMessage = "User not found";
|
||||||
|
res.redirect("/login");
|
||||||
|
return res.status(status.Unauthorized);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.user = user;
|
||||||
|
next();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = createMiddleware;
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
const MongoClient = require("mongodb").MongoClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* connectMongo returns a database connection to MongoDB
|
||||||
|
* @param {string} mongoURI
|
||||||
|
* @param {string} databaseName
|
||||||
|
* @return {MongoClient}
|
||||||
|
*/
|
||||||
|
const connectMongo = async (mongoURI, databaseName) => {
|
||||||
|
const database = await MongoClient.connect(mongoURI, { connectTimeoutMS: 1000 });
|
||||||
|
const dbo = database.db(databaseName);
|
||||||
|
return dbo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getCollection object to interact with MongoDB
|
||||||
|
* @param {MongoClient} dbo
|
||||||
|
* @param {string} collection
|
||||||
|
*/
|
||||||
|
const getCollection = async (dbo, collection) => {
|
||||||
|
return await dbo.collection(collection);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
connectMongo: connectMongo,
|
||||||
|
getCollection: getCollection,
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 16 MiB |
@@ -0,0 +1,42 @@
|
|||||||
|
const status = require("../util/statuses");
|
||||||
|
|
||||||
|
module.exports = (middleware) => {
|
||||||
|
const router = require("express").Router();
|
||||||
|
|
||||||
|
router.get('/home', middleware, async (req, res) => {
|
||||||
|
res.render('home', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/assets', middleware, (req, res) => {
|
||||||
|
res.render('assets', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/plans', middleware, (req, res) => {
|
||||||
|
res.render('plans', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/more', middleware, (req, res) => {
|
||||||
|
res.render('more', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/profile', middleware, (req, res) => {
|
||||||
|
res.render('profiles', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/settings', middleware, (req, res) => {
|
||||||
|
res.render('settings', { user: req.user });
|
||||||
|
return res.status(status.Ok);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/logout', middleware, (req, res) => {
|
||||||
|
req.session.destroy();
|
||||||
|
return res.redirect('/login');
|
||||||
|
});
|
||||||
|
|
||||||
|
return router;
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
Ok: 200,
|
||||||
|
BadRequest: 400,
|
||||||
|
Unauthorized: 401,
|
||||||
|
NotFound: 404,
|
||||||
|
InternalServerError: 500,
|
||||||
|
};
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>RCalculator</title>
|
||||||
|
<link rel="icon" href="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body class="bg-white dark:bg-gray-900">
|
||||||
|
<%- include("./partials/headerStart") %>
|
||||||
|
<main>
|
||||||
|
<section class="bg-white dark:bg-gray-900 py-12 md:py-20">
|
||||||
|
<div class="max-w-screen-lg mx-auto px-4 text-center">
|
||||||
|
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-5xl lg:text-6xl dark:text-white">About RCalculator</h1>
|
||||||
|
<p class="mb-12 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 dark:text-gray-400">Welcome to RCalculator, your partner in building a secure and fulfilling financial future.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="max-w-screen-md mx-auto px-4">
|
||||||
|
<h2 class="mb-4 text-3xl font-bold tracking-tight text-gray-900 dark:text-white text-center">Our Mission</h2>
|
||||||
|
<p class="mb-6 font-normal text-gray-600 dark:text-gray-400 text-lg text-center">
|
||||||
|
Our mission is to empower you with the tools and insights needed to take control of your long-term financial goals.
|
||||||
|
</p>
|
||||||
|
<div class="prose lg:prose-lg dark:prose-invert mx-auto text-gray-600 dark:text-gray-400">
|
||||||
|
<p class="mb-4">
|
||||||
|
We believe that planning for your desired future, especially retirement, shouldn't be daunting. It doesn't matter what your current age or career status is – starting now is what counts.
|
||||||
|
</p>
|
||||||
|
<p class="mb-4">
|
||||||
|
At RCalculator, we help you trace a personalized plan that suits your unique aspirations. We provide clear, actionable advice and projections to guide you on how to get there, whether you're just starting your career, mid-way through, or nearing retirement.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Let us help you navigate the path to financial independence and achieve the retirement lifestyle you envision.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
|
||||||
|
<a href="/login" class="inline-flex justify-center items-center mt-4 py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
|
||||||
|
Get started
|
||||||
|
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<!--fixed bottom-0 left-0 z-50 lg:hidden w-full h-16 bg-white border-t border-gray-200 dark:bg-gray-400-->
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%- include("./partials/header") %>
|
||||||
|
<main>
|
||||||
|
The Assets Page
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%- include("./partials/header") %>
|
||||||
|
<% if (session.authenticated) { console.log(session.email); } else { console.log("No user"); } %>
|
||||||
|
<main>
|
||||||
|
The Dashboard Page
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
The Index Page
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>RCalculator</title>
|
||||||
|
<link rel="icon" href="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/rekor.png">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body class="bg-white dark:bg-gray-900">
|
||||||
|
<%- include("./partials/headerStart") %>
|
||||||
|
<main>
|
||||||
|
<section class="bg-center bg-no-repeat bg-cover bg-[url('/images/bg1.jpg')] bg-gray-400 bg-blend-multiply">
|
||||||
|
<div class="px-4 mx-auto max-w-screen-xl text-center py-24 lg:py-56">
|
||||||
|
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-white md:text-5xl lg:text-6xl">Plan now, live better.</h1>
|
||||||
|
<p class="mb-8 text-lg font-normal text-gray-300 lg:text-xl sm:px-16 lg:px-48">Planning your retirement is a crucial step towards financial security and a happy future.</p>
|
||||||
|
<div class="flex flex-col space-y-4 sm:flex-row sm:justify-center sm:space-y-0">
|
||||||
|
<a href="/login" class="inline-flex justify-center items-center py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
|
||||||
|
Get started
|
||||||
|
<svg class="w-3.5 h-3.5 ms-2 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
<a href="/aboutUs" class="inline-flex justify-center hover:text-gray-900 items-center py-3 px-5 sm:ms-4 text-base font-medium text-center text-white rounded-lg border border-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-400">
|
||||||
|
Learn more
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Login Page</title>
|
||||||
|
<link rel="stylesheet" href="/static/css/style.css" <link rel="stylesheet" href="/static/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">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.2/dist/tailwind.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="flex justify-center items-center h-screen bg-gray-700">
|
||||||
|
<form action="/login" method="POST">
|
||||||
|
<div class="w-96 p-6 shadow-1g bg-white rounded-md">
|
||||||
|
<h1 class="text-3xl block text-center font-semibold"> Login </h1>
|
||||||
|
<hr class="mt-3">
|
||||||
|
<div class="mt-3">
|
||||||
|
<label for="email" class="block text-base mb-2">Email</label>
|
||||||
|
<input type="text" id="email" name="email"
|
||||||
|
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
|
||||||
|
placeholder="Enter Email" />
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<label for="password" class="block text-base mb-2">Password</label>
|
||||||
|
<input type="password" id="password" name="password"
|
||||||
|
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
|
||||||
|
placeholder="Enter Password" />
|
||||||
|
</div>
|
||||||
|
<div class="text-red-800 font-bold" id="forgor"> <%= errMessage %></div>
|
||||||
|
<div class="mt-3 flex justify-between items-center">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox">
|
||||||
|
<label>Remember me</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="#" class="text-indigo-600 font-semibold">Forgot Password? </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5">
|
||||||
|
<button type="submit"
|
||||||
|
class="border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Login</button>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 block justify-between items-center">
|
||||||
|
<label>Don't have an account?</label>
|
||||||
|
<a href="/signup" class="text-indigo-600 font-semibold">Register</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%- include("./partials/header") %>
|
||||||
|
<main>
|
||||||
|
The More Page
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<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="/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>
|
||||||
|
<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="/home" 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">Dashboard</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/assets" 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">Assets</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/plans" 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">Plans</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/more" 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">More</a>
|
||||||
|
</li>
|
||||||
|
<% if (session.authenticated) { %>
|
||||||
|
<li>
|
||||||
|
<a href="/logout" 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">Logout</a>
|
||||||
|
</li>
|
||||||
|
<% } else { %>
|
||||||
|
<li>
|
||||||
|
<a href="/login" 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">Login</a>
|
||||||
|
</li>
|
||||||
|
<% } %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<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">
|
||||||
|
<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>
|
||||||
|
<button data-collapse-toggle="navbar-solid-bg" type="button"
|
||||||
|
class="inline-flex items-center justify-center text-sm text-gray-500 rounded-lg lg:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
|
||||||
|
aria-controls="navbar-solid-bg" aria-expanded="false">
|
||||||
|
<span class="sr-only">Open main menu</span>
|
||||||
|
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="none" viewBox="0 0 17 14">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="M1 1h15M1 7h15M1 13h15" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<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="/" 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>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="mailto:rcalculator@gmail.com" 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">Contact us</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<div class="fixed bottom-0 left-0 z-50 lg:hidden w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="grid h-16 max-w-lg grid-cols-4 mx-auto font-medium">
|
||||||
|
<a href="/home" class="inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path fill-rule="evenodd" d="M11.293 3.293a1 1 0 0 1 1.414 0l6 6 2 2a1 1 0 0 1-1.414 1.414L19 12.414V19a2 2 0 0 1-2 2h-3a1 1 0 0 1-1-1v-3h-2v3a1 1 0 0 1-1 1H7a2 2 0 0 1-2-2v-6.586l-.293.293a1 1 0 0 1-1.414-1.414l2-2 6-6Z" clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-500 dark:text-gray-400 text-sm">Dashboard</span>
|
||||||
|
</a>
|
||||||
|
<a href="/assets" class="inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
||||||
|
<path d="M10.464 8.746c.227-.18.497-.311.786-.394v2.795a2.252 2.252 0 0 1-.786-.393c-.394-.313-.546-.681-.546-1.004 0-.323.152-.691.546-1.004ZM12.75 15.662v-2.824c.347.085.664.228.921.421.427.32.579.686.579.991 0 .305-.152.671-.579.991a2.534 2.534 0 0 1-.921.42Z" />
|
||||||
|
<path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v.816a3.836 3.836 0 0 0-1.72.756c-.712.566-1.112 1.35-1.112 2.178 0 .829.4 1.612 1.113 2.178.502.4 1.102.647 1.719.756v2.978a2.536 2.536 0 0 1-.921-.421l-.879-.66a.75.75 0 0 0-.9 1.2l.879.66c.533.4 1.169.645 1.821.75V18a.75.75 0 0 0 1.5 0v-.81a4.124 4.124 0 0 0 1.821-.749c.745-.559 1.179-1.344 1.179-2.191 0-.847-.434-1.632-1.179-2.191a4.122 4.122 0 0 0-1.821-.75V8.354c.29.082.559.213.786.393l.415.33a.75.75 0 0 0 .933-1.175l-.415-.33a3.836 3.836 0 0 0-1.719-.755V6Z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-500 dark:text-gray-400 text-sm">Assets</span>
|
||||||
|
</a>
|
||||||
|
<a href="/plans" class="inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M13.09 3.294c1.924.95 3.422 1.69 5.472.692a1 1 0 0 1 1.438.9v9.54a1 1 0 0 1-.562.9c-2.981 1.45-5.382.24-7.25-.701a38.739 38.739 0 0 0-.622-.31c-1.033-.497-1.887-.812-2.756-.77-.76.036-1.672.357-2.81 1.396V21a1 1 0 1 1-2 0V4.971a1 1 0 0 1 .297-.71c1.522-1.506 2.967-2.185 4.417-2.255 1.407-.068 2.653.453 3.72.967.225.108.443.216.655.32Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-500 dark:text-gray-400 text-sm">Plans</span>
|
||||||
|
</a>
|
||||||
|
<a href="/more" class="inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group">
|
||||||
|
<svg height="30" width="30" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 17 14">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"></path>
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-500 dark:text-gray-400 text-sm">More</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%- include("./partials/header") %>
|
||||||
|
<main>
|
||||||
|
The Plans Page
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<div class="fixed bottom-0 left-0 z-50 sm:hidden lg:block w-full h-16 bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-6 text-center text-gray-500 dark:text-gray-400 text-sm">
|
||||||
|
<div class="container mx-auto">
|
||||||
|
<p>© 2025 RCalculator. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%- include("./partials/navBar") %>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
|
||||||
|
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
|
||||||
|
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="flex justify-center items-center h-screen bg-gray-700">
|
||||||
|
<form action="/signup" method="POST">
|
||||||
|
<div class="w-96 p-6 shadow-1g bg-white rounded-md">
|
||||||
|
<h1 class="text-3xl block text-center font-semibold"> Signup </h1>
|
||||||
|
<hr class="mt-3">
|
||||||
|
<div class="mt-3">
|
||||||
|
<label for="email" class="block text-base mb-2">Email</label>
|
||||||
|
<input type="text" id="email" name="email"
|
||||||
|
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
|
||||||
|
placeholder="Enter Email" />
|
||||||
|
</div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<label for="password" class="block text-base mb-2">Password</label>
|
||||||
|
<input type="password" id="password" name="password"
|
||||||
|
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
|
||||||
|
placeholder="Enter Password" />
|
||||||
|
<label for="password" class="block text-base mb-2 mt-3">Re-type Password</label>
|
||||||
|
<input type="password" id="repassword" name="repassword"
|
||||||
|
class="border focus:border-gray-600 w-full text-base px-2 py-1 focus:outline-none focus:ring-0 "
|
||||||
|
placeholder="Enter Password" />
|
||||||
|
</div>
|
||||||
|
<div class="text-red-800 font-bold " id="forgor"> <%= errMessage %></div>
|
||||||
|
<div class="mt-5">
|
||||||
|
<button type="submit"
|
||||||
|
class="border-2 border-gray-600 bg-blue-600 text-white py-1 w-full rounded-md hover:bg-transparent hover:text-indigo-700 font-semibold">Signup</button>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 block justify-between items-center">
|
||||||
|
<label>Already have an account?</label>
|
||||||
|
<a href="/login" class="text-indigo-600 font-semibold">Login</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in new issue
Block a user