Skip to content

Commit 8f48474

Browse files
authored
Merge pull request #10 from sadrasabouri/Page404
404 page added
2 parents ecc111f + 2c671b0 commit 8f48474

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ The game continues until a faction achieves its win condition; for the Residents
9090
| Resident | <img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_1.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_2.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_3.png"><img width="100" height="100" src="https://raw.githubusercontent.com/sadrasabouri/mafia/master/static/images/roles/Resident_4.png"> |
9191

9292
## References
93-
Icons made by <a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
93+
Icons made by <a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> and <a href="https://www.flaticon.com/authors/pixel-perfect" title="Pixel perfect">Pixel perfect</a> from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
9494

9595
+ [https://en.wikipedia.org/wiki/Mafia_(party_game)](https://en.wikipedia.org/wiki/Mafia_(party_game))

mafia.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def index():
4747
is_farsi=True)
4848

4949

50+
@app.errorhandler(404)
51+
def invalid_route(e):
52+
return render_template("404.html", is_farsi=True)
53+
54+
5055
def help_me():
5156
usage = "-" * 70 + "\n"
5257
usage += "mafia - Web Server Application For Mafia Game Playing On Local Network \n\n"

static/images/Warns/cross.png

16.5 KB
Loading

templates/404.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends 'base.html' %}
2+
3+
{% block title %}
4+
FekroBot::mafia::404
5+
{% endblock %}
6+
7+
{% block avatar %}
8+
<img class="avatar" src="static/images/Warns/cross.png">
9+
{% endblock %}
10+
11+
{% block role_title %}
12+
<h1>404</h1>
13+
<h2>Page Not Found!</h2>
14+
{% if is_farsi == True %}
15+
<h2 id="fa">صفحه مورد نظر یافت نشد</h2>
16+
{% endif %}
17+
{% endblock %}

0 commit comments

Comments
 (0)