From 559a02789d89c7394cad34b2a0e8a5d255d180f8 Mon Sep 17 00:00:00 2001 From: laike9m Date: Tue, 2 Jul 2024 11:52:39 -0700 Subject: [PATCH] Add Zeabur affliation button --- app.py | 2 +- templates/base.html | 56 ++++++++++++++++++++++++++++++-------------- templates/index.html | 41 +++++++++++++++++--------------- 3 files changed, 62 insertions(+), 37 deletions(-) diff --git a/app.py b/app.py index 39dddcf..2ecfcda 100644 --- a/app.py +++ b/app.py @@ -16,7 +16,7 @@ @app.errorhandler(404) -def page_not_found(e): +def page_not_found(err): return redirect("/") diff --git a/templates/base.html b/templates/base.html index b4ace22..92701b7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,43 +1,65 @@ - + - - {% set description = "Learn Python typing (type hints) with interactive online exercises!" %} - {% block head %}{% endblock %} - - + + {% set description = "Learn Python typing (type hints) with interactive online + exercises!" %} {% block head %}{% endblock %} + + - + - + - + - - + + {% block content %}{% endblock %} - diff --git a/templates/index.html b/templates/index.html index 4703f3d..f99396d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,13 +1,15 @@ -{% extends "base.html" %} - -{% set title = "Python Type Challenges - Learn & Master Type Hints" %} -{% block head %} - {{ super() }} +{% extends "base.html" %} {% set title = "Python Type Challenges - Learn & Master Type +Hints" %} {% block head %} {{ super() }} {{title}} - - - + + + -{% endblock %} - -{% block content %} +{% endblock %} {% block content %}
-

Welcome to Python Type Challenges!

+

Welcome to Python Type Challenges!

+ + Deployed on Zeabur +
- {% for level, challenge_names in challenges_groupby_level.items() %} - {% include 'components/challenge_card.html' with context %} - {% endfor%} + {% for level, challenge_names in challenges_groupby_level.items() %} {% include + 'components/challenge_card.html' with context %} {% endfor%} +
+ -
{% endblock %}