Skip to content

Commit

Permalink
finalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyg37 committed Apr 25, 2024
1 parent c18088b commit 3da27c5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
function checkToken() {
const token = localStorage.getItem('jwtToken');
if (!token) {
window.location.href = './index.html';
window.location.href = '/404.html';
}
}

Expand All @@ -13,7 +13,7 @@ window.onload = function() {

function logout() {
localStorage.removeItem('jwtToken');
window.location.href = './index.html';
window.location.href = '../index.html';
}


Expand Down
40 changes: 40 additions & 0 deletions src/pages/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!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>404 Not Found</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f8f8f8;
flex-direction: column;
text-align: center;
}
h1 {
font-size: 48px;
margin-bottom: 20px;
}
p {
font-size: 18px;
margin-bottom: 20px;
}
a {
text-decoration: none;
color: #007bff;
}
</style>
</head>
<body>
<h1>404 - Page Not Found</h1>
<p>The page you are looking for might have been removed, had its name changed, temporarily unavailable or you're simply not authorized to access this Page</p>
<p>Please <a href="/index.html">go to the homepage</a> and log in.</p>
</body>
</html>

0 comments on commit 3da27c5

Please sign in to comment.