Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 71 additions & 2 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,77 @@
header {
position: fixed;
top: 0;
left: 0;
padding: 30px;
width: 100%;
background-color: white;
}

.header__logo-img {
width: 100px;
padding-top: 0px;
margin-top: 0px;
margin-left: 180px;
float: left;
}

body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
position: relative;
display: flex;
flex-direction: column;
text-align: center;
font: 14px "Galano Grotesque", "Poppins", sans-serif;
min-height: 100vh;
margin: 0;
padding: 0;
}

.page-title {
padding-top: 8em;
}

main {
padding-left: 5em;
padding-right: 5em;
padding-top: 5em;
}

table {
margin: auto;
}

nav {
padding-top: 0.5em;
}

h1, .h1-article, h2, h3, h4, h5 {
letter-spacing: 0;
}

a {
color: #00B7FF;
}

.footer-banner {
margin-top: auto;
background-color: #263057;
color: white;
font-weight: 300;
padding-top: 8em;
padding-left: 0;
padding-right: 0;
margin-left: 0;
margin-right: 0;
font: 14px "Galano Grotesque", "Poppins", sans-serif;
}

footer {
display: flex;
min-width: 100%;
justify-content: flex-end;
margin-top: auto;
}

address {
display: inline;
}
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
res.render('index', { title: 'Kainos Employee Management' });
});

module.exports = router;
17 changes: 15 additions & 2 deletions views/addUser.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add New User</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>Add New User</h1>
</div>

<main>
<form action="/users/add" method="post">
<label for="name">Name:</label><br>
<input type="name" id="name" name="name"><br>
Expand All @@ -21,6 +27,13 @@
<input type="role" id="role" name="role"><br>

<input type="submit" value="Submit">
</form>
</form>
</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
17 changes: 15 additions & 2 deletions views/deleteUser.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,30 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete User</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>Delete User</h1>
</div>

<main>
<form action="/users/delete/<%= user.id %>" method="post">
<h3>
Are you sure you want to delete <%= user.name %>?
</h3>

<input type="submit" value="Submit">
</form>
</form>
</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
16 changes: 14 additions & 2 deletions views/employee.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Information</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1> Employee Information</h1>
</div>

<main>
<% if (employee) { %>
<table>
<thead>
Expand All @@ -35,6 +41,12 @@
<p>No Employee found.</p>
<% } %>

</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
16 changes: 14 additions & 2 deletions views/employees.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>employee List</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>Employees List</h1>
</div>

<main>
<% if (employees && employees.length > 0) { %>
<table>
<thead>
Expand Down Expand Up @@ -40,6 +46,12 @@
<p>No employees found.</p>
<% } %>

</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
40 changes: 32 additions & 8 deletions views/index.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<h1><%= title %></h1>

<head>
<title>
<%= title %>
</title>
<link rel='stylesheet' href='/stylesheets/style.css' />
<link rel="icon" type="image/x-icon" href="https://companieslogo.com/img/orig/KNOS.L-8a0d29cc.png?t=1720244492">
</head>

<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>
<%= title %>
</h1>
</div>

<main>
<p>Welcome to <%= title %></p>
</body>
</html>
<nav>
<p><a href="http://localhost:3000/employees">View employees</a></p>
</nav>
</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
18 changes: 16 additions & 2 deletions views/updateUser.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update User</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>


<div class="page-title">
<h1>Update User</h1>
</div>

<main>
<form action="/users/update/<%= user.id %>" method="post">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" value="<%= user.name %>"><br>
Expand All @@ -21,6 +28,13 @@
<input type="text" id="role" name="role" value="<%= user.role %>"><br>

<input type="submit" value="Submit">
</form>
</form>
</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
16 changes: 14 additions & 2 deletions views/user.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Information</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>User Information</h1>
</div>

<main>
<% if (user) { %>
<table>
<thead>
Expand All @@ -31,6 +37,12 @@
<p>No user found.</p>
<% } %>

</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>
15 changes: 14 additions & 1 deletion views/users.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User List</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header><img alt="logo" src="https://www.kainos.com/globalassets/images/5_logos/kainos_logo.png?mode=crop&width=400"
class="header__logo-img"></header>

<div class="page-title">
<h1>User List</h1>
</div>

<main>
<% if (users && users.length > 0) { %>
<table>
<thead>
Expand Down Expand Up @@ -42,5 +48,12 @@
<form action="/users/add" method="get">
<input type="submit" value="Create New User">
</form>
</main>
</body>

<div class="footer-banner">
<footer>Copyright © 2024 Kainos. Contact:
<address>support@kainospeoplesupport.com</address>
</footer>
</div>
</html>