f
This commit is contained in:
parent
234906ada5
commit
e538a5fb6e
@ -1,35 +0,0 @@
|
||||
// models/User.js
|
||||
|
||||
const { Sequelize, DataTypes } = require('sequelize');
|
||||
const sequelize = new Sequelize(process.env.database, process.env.user, process.env.password, {
|
||||
host: process.env.host,
|
||||
dialect: 'mysql',
|
||||
timezone: 'Z', // Set the timezone to UTC
|
||||
});
|
||||
|
||||
const User = sequelize.define('User', {
|
||||
name: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
username: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
email: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
password: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
jobTitle: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = User;
|
@ -14,84 +14,41 @@
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
#navbar {
|
||||
background-color: #333;
|
||||
padding-top: 60px;
|
||||
transition: 0.5s;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sidebar img {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
#navbar h1 {
|
||||
color: white;
|
||||
padding: 14px 16px;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
padding: 10px 15px;
|
||||
#navbar a {
|
||||
display: inline-block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
display: block;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
#navbar a:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 250px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#sidebar {
|
||||
width: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebarCollapse {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#sidebarCollapse span {
|
||||
display: block;
|
||||
background: white;
|
||||
height: 5px;
|
||||
width: 30px;
|
||||
margin: 6px auto;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(1) {
|
||||
transform: rotate(-45deg) translate(-5px, 6px);
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(3) {
|
||||
transform: rotate(45deg) translate(-5px, -6px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 80%;
|
||||
margin: 20px 0;
|
||||
margin: 20px auto;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@ -117,13 +74,8 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div id="sidebar">
|
||||
<img src="LOGO.PNG" alt="Custom Image">
|
||||
<div id="sidebarCollapse">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<div id="navbar">
|
||||
<h1>Eco Saver</h1>
|
||||
<a href="/inusers">In-House Users</a>
|
||||
<a href="#">Users</a>
|
||||
<a href="#">Data Analysis</a>
|
||||
@ -149,12 +101,6 @@
|
||||
<% }); %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
document.getElementById('sidebarCollapse').addEventListener('click', function () {
|
||||
document.getElementById('sidebar').style.width = (document.getElementById('sidebar').style.width === '250px') ? '0' : '250px';
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@ -17,13 +17,8 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div id="sidebar">
|
||||
<img src="LOGO.PNG" alt="Custom Image">
|
||||
<div id="sidebarCollapse">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<div id="navbar">
|
||||
<h1>Eco Saver</h1>
|
||||
<a href="#" id="userDataLink">User Data</a>
|
||||
<a href="#" id="addUserLink">Add User</a>
|
||||
<a href="#" id="deleteUserLink">Delete User</a>
|
||||
|
10
Sean/views/setup-mfa.ejs
Normal file
10
Sean/views/setup-mfa.ejs
Normal file
@ -0,0 +1,10 @@
|
||||
<!-- setup-mfa.ejs (or your template engine's file) -->
|
||||
<h2>Setup Multi-Factor Authentication</h2>
|
||||
<p>Scan the QR code below with your authenticator app:</p>
|
||||
<img src="<%= qrCodeDataUri %>" alt="QR Code">
|
||||
|
||||
<form action="/setup-mfa" method="post">
|
||||
<label for="mfaCode">Enter MFA Code:</label>
|
||||
<input type="text" id="mfaCode" name="mfaCode" required>
|
||||
<button type="submit">Verify and Save</button>
|
||||
</form>
|
@ -1,98 +1,49 @@
|
||||
/* style.css */
|
||||
|
||||
/* Sidebar Styles */
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
#navbar {
|
||||
background-color: #333;
|
||||
padding-top: 60px;
|
||||
transition: 0.5s;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sidebar img {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
#navbar h1 {
|
||||
color: white;
|
||||
padding: 14px 16px;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
padding: 10px 15px;
|
||||
#navbar a {
|
||||
display: inline-block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
display: block;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
#navbar a:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 250px;
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#sidebar {
|
||||
width: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebarCollapse {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#sidebarCollapse span {
|
||||
display: block;
|
||||
background: white;
|
||||
height: 5px;
|
||||
width: 30px;
|
||||
margin: 6px auto;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(1) {
|
||||
transform: rotate(-45deg) translate(-5px, 6px);
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover span:nth-child(3) {
|
||||
transform: rotate(45deg) translate(-5px, -6px);
|
||||
}
|
||||
|
||||
#userDataContainer {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Table Styles */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
width: 80%;
|
||||
margin: 20px auto;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
th, td {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: left;
|
||||
padding: 12px;
|
||||
@ -110,40 +61,6 @@ body {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Dropdown Styles */
|
||||
.dropdown {
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
color: white;
|
||||
background-color: #333;
|
||||
border: 1px solid #555;
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dropdown-toggle:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dropdown-item:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
/* Additional styles for Bootstrap form */
|
||||
form {
|
||||
max-width: 400px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user