From 68a38b7df4e4fe2a833b85469ebfa4b9cd071b84 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 1 Sep 2024 15:51:54 -0400 Subject: [PATCH] main: Split about section into multiple pages --- acmsite/main/__init__.py | 14 +++- acmsite/templates/layout.html | 11 ++- acmsite/templates/main/about.html | 43 ++++++++++++ acmsite/templates/{ => main}/events.html | 0 acmsite/templates/main/how_we_help.html | 31 +++++++++ acmsite/templates/{ => main}/index.html | 0 .../{about.html => main/officers.html} | 67 +------------------ 7 files changed, 98 insertions(+), 68 deletions(-) create mode 100644 acmsite/templates/main/about.html rename acmsite/templates/{ => main}/events.html (100%) create mode 100644 acmsite/templates/main/how_we_help.html rename acmsite/templates/{ => main}/index.html (100%) rename acmsite/templates/{about.html => main/officers.html} (56%) diff --git a/acmsite/main/__init__.py b/acmsite/main/__init__.py index d866269..e334a2b 100644 --- a/acmsite/main/__init__.py +++ b/acmsite/main/__init__.py @@ -6,16 +6,24 @@ bp = Blueprint('main', __name__) @bp.route("/") def homepage(): - return render_template("index.html") + return render_template("main/index.html") @bp.route("/about") def about(): - return render_template("about.html") + return render_template("main/about.html") + +@bp.route("/officers") +def officers(): + return render_template("main/officers.html") + +@bp.route("/what-we-do") +def activities(): + return render_template("main/how_we_help.html") @bp.route("/events") def events(): events = Event.query.filter(Event.start_time > datetime.datetime.now()).all() - return render_template("events.html", events=events) + return render_template("main/events.html", events=events) @bp.route("/join") def join(): diff --git a/acmsite/templates/layout.html b/acmsite/templates/layout.html index 346621a..63fe041 100644 --- a/acmsite/templates/layout.html +++ b/acmsite/templates/layout.html @@ -28,7 +28,16 @@