From 30beb7cdaac6a9b65f07764860ff1b8a94caabca Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Fri, 9 Jun 2023 14:05:33 +0200 Subject: [PATCH] Add an about page --- iwm_browser/main.py | 5 +++++ iwm_browser/static/homepage.css | 15 ++++++++++++++- iwm_browser/templates/about.html | 22 ++++++++++++++++++++++ iwm_browser/templates/home.html | 1 + 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 iwm_browser/templates/about.html diff --git a/iwm_browser/main.py b/iwm_browser/main.py index 3c6995d..3ebd547 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -72,6 +72,11 @@ async def combineCSSResources(resources: str, response: Response): async def root(): template = template_env.get_template("home.html") return template.render() +@app.get("/about", response_class=HTMLResponse) +async def root(): + template = template_env.get_template("about.html") + return template.render() + @app.get("/search", response_class=HTMLResponse) diff --git a/iwm_browser/static/homepage.css b/iwm_browser/static/homepage.css index 4c3d50d..40cda64 100644 --- a/iwm_browser/static/homepage.css +++ b/iwm_browser/static/homepage.css @@ -42,6 +42,19 @@ font-size: larger; } +footer { + display: flex; + justify-content: space-evenly; + padding: 0.5rem; + font-size: small; +} +footer > a { + margin: 0em 1em; +} - +.About { + display: flex; + justify-content: center; + text-align: center; +} diff --git a/iwm_browser/templates/about.html b/iwm_browser/templates/about.html new file mode 100644 index 0000000..c94afcd --- /dev/null +++ b/iwm_browser/templates/about.html @@ -0,0 +1,22 @@ + + + + IWM Browser + + + + + +
+
+

You're on IWM Browser,

+

a service for displaying I Wanna Maker online levels in your browser.

+

You can find the source code here.

+
+
+ + diff --git a/iwm_browser/templates/home.html b/iwm_browser/templates/home.html index 660a52f..7e62b98 100644 --- a/iwm_browser/templates/home.html +++ b/iwm_browser/templates/home.html @@ -58,6 +58,7 @@
Recent ❓
Search 🔍
+