diff --git a/canon_law/__init__.py b/canon_law/__init__.py index ab935b9..64e50b8 100644 --- a/canon_law/__init__.py +++ b/canon_law/__init__.py @@ -18,6 +18,7 @@ import os import flask +import werkzeug from canon_law import central @@ -34,4 +35,6 @@ def create_app(): app.register_blueprint(api.bp) app.register_blueprint(frontend.bp) + app.register_error_handler(werkzeug.exceptions.HTTPException, frontend.error_page) + return app diff --git a/canon_law/frontend.py b/canon_law/frontend.py index a2c004b..63ba32e 100644 --- a/canon_law/frontend.py +++ b/canon_law/frontend.py @@ -17,6 +17,7 @@ """ import flask +import werkzeug import tinydb import random @@ -40,7 +41,7 @@ page_titles = { def index(): return flask.render_template("index.html") - +@bp.route("/c/") @bp.route("/c//") def read_council(council=None): if council in page_titles.keys(): @@ -75,3 +76,8 @@ def about(): @bp.route("/disclaimer/") def disclaimer(): return flask.render_template("disclaimer.html") + + +@bp.errorhandler(werkzeug.exceptions.HTTPException) +def error_page(error): + return flask.render_template("error.html", error=error), error.code \ No newline at end of file diff --git a/canon_law/static/phanurius.jpg b/canon_law/static/phanurius.jpg new file mode 100644 index 0000000..fee9c63 Binary files /dev/null and b/canon_law/static/phanurius.jpg differ diff --git a/canon_law/static/style.css b/canon_law/static/style.css index b45f964..9988be8 100644 --- a/canon_law/static/style.css +++ b/canon_law/static/style.css @@ -70,7 +70,7 @@ button:focus { color: white !important; } -input { padding: 10px; } +input { padding: 10px; border-radius: -1px; } header .dropdown-content { display: none; @@ -128,8 +128,7 @@ footer { } table { - display: block; - margin: 0 auto; + display: table-cell; } table, th, td { diff --git a/canon_law/templates/about.html b/canon_law/templates/about.html index 9d1a142..f2980a7 100644 --- a/canon_law/templates/about.html +++ b/canon_law/templates/about.html @@ -12,8 +12,21 @@

Personnel

-
(Title: Name, Jurisdiction - Email)
- Project Lead: Seraphim Pardee, OCA - vypr@oikonomia.xyz + + + + + + + + + + + + + + +
rolenamejurisdictionemail
project leadSeraphimOCA / Bulgarian Dioceseclick


diff --git a/canon_law/templates/error.html b/canon_law/templates/error.html new file mode 100644 index 0000000..1cfa9c4 --- /dev/null +++ b/canon_law/templates/error.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}error {{ error.code }}{% endblock %} + +{% block main %} +

{{ error.code }}

+

+ {% if error.code == 404 %} + +
+ You can pray to St. Phanourios to help you find what you are looking for. + {% else %} + {{ error.description }} + {% endif %} +

+{% endblock %} \ No newline at end of file diff --git a/canon_law/templates/unknown_council.html b/canon_law/templates/unknown_council.html index 33d1ab6..2b16190 100644 --- a/canon_law/templates/unknown_council.html +++ b/canon_law/templates/unknown_council.html @@ -10,6 +10,6 @@

- Wanna try a random council? + Wanna try a random council? {% endblock %} \ No newline at end of file