-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from Samani-Humaira/ErrorPage
Added 404 error page
- Loading branch information
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<!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"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="css/admin_css.css"> | ||
<link rel="shortcut icon" href="img/logo.png" type="image/x-icon"> | ||
<title> Error </title> | ||
<style> | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
} | ||
.error-container h1 { | ||
font-size: 7rem; | ||
color: blue; | ||
margin-bottom: 20px; | ||
} | ||
.error-container p { | ||
font-size: 1.25rem; | ||
color: #6c757d; | ||
margin-bottom: 10px; | ||
} | ||
.error-container a { | ||
display: inline-block; | ||
margin-top: 20px; | ||
padding: 10px 10px; | ||
font-size: 1rem; | ||
color: #ffffff; | ||
background-color: blue; | ||
border: none; | ||
border-radius: 5px; | ||
text-decoration: none; | ||
} | ||
.error-container a:hover { | ||
background-color: #0056b3; | ||
} | ||
.container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 0; | ||
margin:0; | ||
} | ||
.container img { | ||
width: 230px; | ||
height:300px; | ||
margin: 10px; | ||
} | ||
.container div { | ||
text-align: center; | ||
margin: 10px; | ||
} | ||
@media (max-width: 768px) { | ||
.container { | ||
flex-direction: column; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- Dark Mode --> | ||
<button id="darkModeToggle" class="btn btn-dark"> | ||
<i id="darkModeIcon" class="fas fa-sun"></i> | ||
</button> | ||
|
||
<div class="container"> | ||
<div> | ||
|
||
<img src="img/Error.png" style="width: 250px;"> | ||
|
||
</div> | ||
|
||
<div > | ||
<div class="error-container"> | ||
<h1>404</h1> | ||
<p>OOPS! IT LOOKS LIKE YOU'RE LOST</p> | ||
<p>GO BACK TO <a href="/">Homepage</a></p> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function () { | ||
const darkModeToggle = document.getElementById('darkModeToggle'); | ||
const darkModeIcon = document.getElementById('darkModeIcon'); | ||
const body = document.body; | ||
const isDarkMode = localStorage.getItem('darkMode') === 'true'; | ||
// Function to toggle dark mode | ||
function toggleDarkMode() { | ||
const isDark = body.classList.toggle('dark-mode'); | ||
localStorage.setItem('darkMode', isDark); | ||
darkModeIcon.className = isDark ? 'fas fa-moon' : 'fas fa-sun'; // Change icon based on mode | ||
} | ||
// Set initial mode based on localStorage | ||
if (isDarkMode) { | ||
toggleDarkMode(); | ||
} | ||
// Event listener for dark mode toggle button | ||
darkModeToggle.addEventListener('click', toggleDarkMode); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |