From ec35b78afd528ac5c40ac79af8aca621f8e2f380 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Thu, 17 Aug 2023 20:38:22 +1000 Subject: [PATCH] Switch to using hyperscript to initialise tailwind elements(select) and graphs(Plotly), this removes script tags and ids --- app.py | 5 +++++ templates/calendar.html | 9 ++++---- templates/dashboard.html | 30 +++++++++++++-------------- templates/partials/topset.html | 11 +++++----- templates/partials/workout_modal.html | 12 +++++------ templates/partials/workout_tags.html | 12 +++++------ templates/person.html | 30 +++++++++++++-------------- 7 files changed, 56 insertions(+), 53 deletions(-) diff --git a/app.py b/app.py index 44db8dd..783aabc 100644 --- a/app.py +++ b/app.py @@ -439,6 +439,11 @@ def get_first_element_from_list_with_matching_attribute(list, attribute, value): return None +@app.template_filter('replace_double_quote_strings_with_single_quote') +def replace_double_quote_strings_with_single_quote(str): + return str.replace('"', "'") + + @ app.context_processor def my_utility_processor(): diff --git a/templates/calendar.html b/templates/calendar.html index 76d3b26..5680068 100644 --- a/templates/calendar.html +++ b/templates/calendar.html @@ -41,16 +41,15 @@
- -
diff --git a/templates/dashboard.html b/templates/dashboard.html index 92494d4..0d826b1 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -13,7 +13,9 @@ -
@@ -34,7 +35,9 @@
-