From b7276c1b5eee01caf8a095348a12e0b886bac124 Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Sat, 19 Apr 2025 21:56:54 +0200 Subject: [PATCH] got rid of stray JavaScript in results-page, still need to remove commented out test scripts --- flask_soc_site/static/javascript.js | 12 +++ flask_soc_site/templates/layout.html | 7 +- .../templates/results-overview-new.html | 100 ++++++++++++++---- 3 files changed, 94 insertions(+), 25 deletions(-) diff --git a/flask_soc_site/static/javascript.js b/flask_soc_site/static/javascript.js index 73cdfca..e2849c8 100644 --- a/flask_soc_site/static/javascript.js +++ b/flask_soc_site/static/javascript.js @@ -10,3 +10,15 @@ $(function() { } }); }); + + +$.each($('td'), function () { + if ($(this).html().startsWith("Score: 0")) { + $(this).css({"background-color": "green", "color": "white"}); + } + else if ($(this).html().startsWith("Score: ")) { + $(this).css({"background-color": "red", "color": "white"}); + } +}); + +console.log("CAN I SEE THIS?"); diff --git a/flask_soc_site/templates/layout.html b/flask_soc_site/templates/layout.html index 7f7b35e..853c9c3 100644 --- a/flask_soc_site/templates/layout.html +++ b/flask_soc_site/templates/layout.html @@ -32,10 +32,13 @@ - + + + - {% block scripts %}{% endblock %} + + {% block scripts %} {% endblock %} diff --git a/flask_soc_site/templates/results-overview-new.html b/flask_soc_site/templates/results-overview-new.html index 8b73068..e0004b0 100644 --- a/flask_soc_site/templates/results-overview-new.html +++ b/flask_soc_site/templates/results-overview-new.html @@ -1,5 +1,7 @@ +
{% if error in errors %} @@ -70,29 +72,81 @@ {% block scripts %} + + + + + + + {% endblock %}