From edf796b94b6e9c194f6ea1b69fb2ef89e7ca7e31 Mon Sep 17 00:00:00 2001 From: ssorin Date: Thu, 19 Dec 2024 15:10:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(dashboard)=20improve=20djlint=20ex?= =?UTF-8?q?ecution=20speed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Embed svgs as images (with ) in templates rather than directly in code (with ). Removed unused consent form JavaScript for toggling checkboxes, as it is no longer required. --- .../apps/consent/static/consent/js/app.js | 8 --- .../dashboard/static/dashboard/img/error.svg | 38 ++++++++++++ .../static/dashboard/img/information.svg | 49 +++++++++++++++ .../static/dashboard/img/technical-error.svg | 61 +++++++++++++++++++ .../static/dashboard/img/warning.svg | 33 ++++++++++ src/dashboard/templates/403.html | 15 +---- src/dashboard/templates/404.html | 15 +---- src/dashboard/templates/500.html | 15 +---- 8 files changed, 184 insertions(+), 50 deletions(-) delete mode 100644 src/dashboard/apps/consent/static/consent/js/app.js create mode 100644 src/dashboard/dashboard/static/dashboard/img/error.svg create mode 100644 src/dashboard/dashboard/static/dashboard/img/information.svg create mode 100644 src/dashboard/dashboard/static/dashboard/img/technical-error.svg create mode 100644 src/dashboard/dashboard/static/dashboard/img/warning.svg diff --git a/src/dashboard/apps/consent/static/consent/js/app.js b/src/dashboard/apps/consent/static/consent/js/app.js deleted file mode 100644 index 938eb111..00000000 --- a/src/dashboard/apps/consent/static/consent/js/app.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * check/uncheck all checkbox in consent form - */ -document.getElementById("toggle-all") - .addEventListener("change", function() { - const checkboxes = document.getElementsByName("status"); - checkboxes.forEach(checkbox => checkbox.checked = this.checked); -}); diff --git a/src/dashboard/dashboard/static/dashboard/img/error.svg b/src/dashboard/dashboard/static/dashboard/img/error.svg new file mode 100644 index 00000000..8f0d846d --- /dev/null +++ b/src/dashboard/dashboard/static/dashboard/img/error.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + diff --git a/src/dashboard/dashboard/static/dashboard/img/information.svg b/src/dashboard/dashboard/static/dashboard/img/information.svg new file mode 100644 index 00000000..5ad090d2 --- /dev/null +++ b/src/dashboard/dashboard/static/dashboard/img/information.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + diff --git a/src/dashboard/dashboard/static/dashboard/img/technical-error.svg b/src/dashboard/dashboard/static/dashboard/img/technical-error.svg new file mode 100644 index 00000000..62d02b2a --- /dev/null +++ b/src/dashboard/dashboard/static/dashboard/img/technical-error.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + diff --git a/src/dashboard/dashboard/static/dashboard/img/warning.svg b/src/dashboard/dashboard/static/dashboard/img/warning.svg new file mode 100644 index 00000000..b75aba4c --- /dev/null +++ b/src/dashboard/dashboard/static/dashboard/img/warning.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/src/dashboard/templates/403.html b/src/dashboard/templates/403.html index 5798972a..c45c24a4 100644 --- a/src/dashboard/templates/403.html +++ b/src/dashboard/templates/403.html @@ -44,20 +44,7 @@

- - - - - - - - - - - - +
diff --git a/src/dashboard/templates/404.html b/src/dashboard/templates/404.html index 555ca6d6..88c1628f 100644 --- a/src/dashboard/templates/404.html +++ b/src/dashboard/templates/404.html @@ -45,20 +45,7 @@

- - - - - - - - - - - - +
diff --git a/src/dashboard/templates/500.html b/src/dashboard/templates/500.html index 2ed0ee5c..78c900de 100644 --- a/src/dashboard/templates/500.html +++ b/src/dashboard/templates/500.html @@ -36,20 +36,7 @@

{% endcomment %}
- - - - - - - - - - - - +