From 3cf5aa70aa2438ed199c9147772cfb2c37f728a4 Mon Sep 17 00:00:00 2001 From: Luis Alvergue Date: Fri, 25 Apr 2025 15:34:06 +0000 Subject: [PATCH] feat: highlight the active district in the sidebar moved the sidebar nav to a separate template for modularity. Also note that when the sidebar is rendered from the IndexView, the template engine will silently treat current_district as None since it is not passed in the context. This is fine since the sidebar highlight will not be rendered in this case. --- pems/districts/templates/districts/index.html | 13 +++---------- pems/districts/templates/districts/navigation.html | 10 ++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 pems/districts/templates/districts/navigation.html diff --git a/pems/districts/templates/districts/index.html b/pems/districts/templates/districts/index.html index 72b4ecf..ce252cc 100644 --- a/pems/districts/templates/districts/index.html +++ b/pems/districts/templates/districts/index.html @@ -8,16 +8,9 @@
diff --git a/pems/districts/templates/districts/navigation.html b/pems/districts/templates/districts/navigation.html new file mode 100644 index 0000000..0e6aedb --- /dev/null +++ b/pems/districts/templates/districts/navigation.html @@ -0,0 +1,10 @@ + +