Skip to content

Commit

Permalink
new features :)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasurgraduate committed Oct 15, 2024
1 parent 3334cf1 commit fe9fb96
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 Not Found</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 50px;
background-color: #f0f0f0;
}

h1 {
font-size: 50px;
color: #ff0000;
}

p {
font-size: 20px;
}

a {
color: #007bff;
text-decoration: none;
font-weight: bold;
}

a:hover {
text-decoration: underline;
}
</style>
</head>

<body>
<h1>404 - Page Not Found</h1>
<p>Sorry, the page you are looking for does not exist.</p>
<p id="path-info"></p>
<p><a href="/">Go back to Home</a></p>

<script>
// Get the current path from the URL
var currentPath = window.location.pathname;

// Display the current path on the 404 page
var pathInfoElement = document.getElementById('path-info');
pathInfoElement.textContent = 'You tried to access: ' + currentPath;

// Optional: Keep options for other functionalities
var options = {
// Add any options you might need
reportError: true,
logPath: function () {
console.log('User attempted to access: ' + currentPath);
}
};

// Log the path if the option is set
if (options.reportError) {
options.logPath();
}
</script>
</body>

</html>
File renamed without changes.

0 comments on commit fe9fb96

Please sign in to comment.