From ebf128e6d52cfd574e7a055804aa1abc54949699 Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Mon, 1 Mar 2021 17:10:09 +0100 Subject: Add 404 page This does not include the styling required for the page to display properly --- pydis_site/templates/404.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pydis_site/templates/404.html diff --git a/pydis_site/templates/404.html b/pydis_site/templates/404.html new file mode 100644 index 00000000..909e0a3d --- /dev/null +++ b/pydis_site/templates/404.html @@ -0,0 +1,34 @@ +{% load static %} + + + + + + Python Discord | 404 + + + + + + + + + +
+
+ Python Discord banner +
+
+

404 — not found

+

We couldn't find the page you're looking for. Here are a few things to try out:

+ +
+
+ + + -- cgit v1.2.3 From 3020e2e1e9a44356da9031e8cd278dfe6bf6bba1 Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Mon, 1 Mar 2021 17:11:08 +0100 Subject: Add error page styling This css sheet applies to the 404 and 500 pages --- pydis_site/static/css/error_pages.css | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pydis_site/static/css/error_pages.css diff --git a/pydis_site/static/css/error_pages.css b/pydis_site/static/css/error_pages.css new file mode 100644 index 00000000..77bb7e2b --- /dev/null +++ b/pydis_site/static/css/error_pages.css @@ -0,0 +1,66 @@ +html { + height: 100%; +} + +body { + background-color: #7289DA; + background-image: url("https://raw.githubusercontent.com/python-discord/branding/master/logos/banner_pattern/banner_pattern.svg"); + background-size: 128px; + font-family: "Hind", "Helvetica", "Arial", sans-serif; + display: flex; + align-items: center; + justify-content: center; + height: 100%; +} + +h1, +p { + color: black; + padding: 0; + margin: 0; + margin-bottom: 10px; +} + +h1 { + margin-bottom: 15px; + font-size: 26px; +} + +p, +li { + line-height: 125%; +} + +a { + color: #7289DA; +} + +ul { + margin-bottom: 0; +} + +li { + margin-top: 10px; +} + +.error-box { + display: flex; + flex-direction: column; + max-width: 512px; + background-color: white; + border-radius: 20px; + overflow: hidden; + box-shadow: 5px 7px 40px rgba(0, 0, 0, 0.432); +} + +.logo-box { + display: flex; + justify-content: center; + height: 80px; + padding: 15px; + background-color: #758ad4; +} + +.content-box { + padding: 25px; +} -- cgit v1.2.3 From df9f5907248792c701139e5e05dc59af69cb88a1 Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Mon, 1 Mar 2021 17:13:35 +0100 Subject: Add 500 page --- pydis_site/templates/500.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pydis_site/templates/500.html diff --git a/pydis_site/templates/500.html b/pydis_site/templates/500.html new file mode 100644 index 00000000..831ed285 --- /dev/null +++ b/pydis_site/templates/500.html @@ -0,0 +1,29 @@ +{% load static %} + + + + + + Python Discord | 500 + + + + + + + + + +
+
+ Python Discord banner +
+
+

500 — internal server error

+

Sorry, but something went wrong on our side of things.

+
+
+ + + -- cgit v1.2.3 From 1ed129fd0a2fec924e0d6057ac3b18a86be007a5 Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Mon, 1 Mar 2021 20:28:57 +0100 Subject: Capitalise error codes in 404 and 500 pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leon Sandøy --- pydis_site/templates/404.html | 2 +- pydis_site/templates/500.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pydis_site/templates/404.html b/pydis_site/templates/404.html index 909e0a3d..42e317d2 100644 --- a/pydis_site/templates/404.html +++ b/pydis_site/templates/404.html @@ -20,7 +20,7 @@ alt="Python Discord banner" />
-

404 — not found

+

404 — Not Found

We couldn't find the page you're looking for. Here are a few things to try out:

-

500 — internal server error

+

500 — Internal Server Error

Sorry, but something went wrong on our side of things.

-- cgit v1.2.3 From 9243fef24b953d6ac83f80d7ccc91948adac9a60 Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Mon, 1 Mar 2021 20:34:55 +0100 Subject: Update error message for 500 page Now includes a link to our Discord server and concrete actions for the user, if the problem persists --- pydis_site/templates/500.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydis_site/templates/500.html b/pydis_site/templates/500.html index 46373654..869892ec 100644 --- a/pydis_site/templates/500.html +++ b/pydis_site/templates/500.html @@ -21,7 +21,7 @@

500 — Internal Server Error

-

Sorry, but something went wrong on our side of things.

+

Something went wrong at our end. Please try again shortly, or if the problem persists, please let us know on Discord.

-- cgit v1.2.3