From 28dba79cdf8dd77ceb563a617af33fb5b03ca244 Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Mon, 27 Jan 2025 22:49:34 +0300 Subject: [PATCH] refactor: Templatise tasks --- templates/_task.html | 17 +++++++++++++++++ templates/decode.html | 17 +---------------- templates/found.html | 12 +----------- templates/sql-injection.html | 30 ++++++++---------------------- 4 files changed, 27 insertions(+), 49 deletions(-) create mode 100644 templates/_task.html diff --git a/templates/_task.html b/templates/_task.html new file mode 100644 index 0000000..50b6041 --- /dev/null +++ b/templates/_task.html @@ -0,0 +1,17 @@ + + + +{% block head %} + {% include '_head.html' %} +{% endblock %} + + + {% include '_header.html' %} + + {% block content %}{% endblock %} + + {% include '_sidenav.html' %} + + + + diff --git a/templates/decode.html b/templates/decode.html index b963120..e7a638b 100644 --- a/templates/decode.html +++ b/templates/decode.html @@ -1,16 +1 @@ - - - {% include '_head.html' %} - - - {% include '_header.html' %} - - {% include '_sidenav.html' %} - - - - +{% extends '_task.html' %} diff --git a/templates/found.html b/templates/found.html index 3aa76e2..e7a638b 100644 --- a/templates/found.html +++ b/templates/found.html @@ -1,11 +1 @@ - - - {% include '_head.html' %} - - - {% include '_header.html' %} - - {% include '_sidenav.html' %} - - - +{% extends '_task.html' %} diff --git a/templates/sql-injection.html b/templates/sql-injection.html index 35e222e..3410a70 100644 --- a/templates/sql-injection.html +++ b/templates/sql-injection.html @@ -1,11 +1,6 @@ - - - {% include '_head.html' %} - - - {% include '_header.html' %} - +{% extends '_task.html' %} +{% block content%}
- {% include '_sidenav.html' %} -{% if error %} -
-

{{ error }}

-
-{% endif %} + {% if error %} +

{{ error }}

+ {% elif success %} +

{{ success }}

+ {% endif %} -{% if success %} -
-

{{ success }}

-
-{% endif %} - - - - +{% endblock %}