Skip to content

Commit

Permalink
Merge pull request #121 from SatyamSingh8306/main
Browse files Browse the repository at this point in the history
Handling 404 error page (fixing Issue no: 116)
  • Loading branch information
Akshat111111 authored Nov 10, 2024
2 parents 64c475f + fc3f06c commit 0ac752f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ def buy_stock():
stock_name = request.form['name']
# Add logic to interact with smart contract
return jsonify({'status': 'Stock purchased successfully'})
@app.errorhandler(404)
def error(e):
return render_template("error_404.html")
62 changes: 62 additions & 0 deletions templates/error_404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - Page Not Found</title>

<style>
body {
font-family: Arial, sans-serif;
color: #00dffc;
text-align: center;
background-color: #0a0a0a;
padding: 50px;
background-image: url('path/to/network-background.png');
background-size: cover;
background-attachment: fixed;
}
.container {
max-width: 600px;
margin: auto;
}
h1 {
font-size: 3.5em;
color: #00dffc;
text-shadow: 0 0 8px #00dffc, 0 0 15px #ff007a;
animation: glitch 1.5s infinite;
}
p {
font-size: 1.2em;
color: #ddd;
}
.button {
display: inline-block;
margin-top: 20px;
padding: 10px 20px;
font-size: 1em;
color: #fff;
background: linear-gradient(45deg, #00dffc, #ff007a);
text-decoration: none;
border-radius: 5px;
transition: background 0.3s;
}
.button:hover {
background: linear-gradient(45deg, #ff007a, #00dffc);
}
@keyframes glitch {
0% { text-shadow: 2px 2px #ff007a; }
50% { text-shadow: -2px -2px #00dffc; }
100% { text-shadow: 2px 2px #ff007a; }
}
</style>
</head>
<body>
<div class="container">
<h1>404: Lost in the Network</h1>
<p>The page you're looking for seems to have drifted into cyberspace.</p>
<p><a href="/" class="button">Back to Home</a></p>
<p><a href="/" class="button">Explore NexTrade Website</a></p>
</div>
</body>
</html>

0 comments on commit 0ac752f

Please sign in to comment.