{% block content %} @@ -201,16 +51,8 @@ {% block scripts %} {% endblock %} - {% for script in get_registered_scripts() %} - {% if script.startswith('http') %} - - {% elif request.script_root %} - - {% else %} - - {% endif %} - {% endfor %} + {{ Plugins.scripts }} - {{ get_config('theme_footer', '') | safe }} + {{ Configs.theme_footer }} diff --git a/CTFd/themes/core/templates/challenges.html b/CTFd/themes/core/templates/challenges.html index 16a5eae5..59e33036 100644 --- a/CTFd/themes/core/templates/challenges.html +++ b/CTFd/themes/core/templates/challenges.html @@ -5,58 +5,29 @@ {% endblock %} {% block content %} -

Challenges

-{% if infos %} -
-
-
- {% for info in infos %} -

{{ info }}

- {% endfor %} -
-
-
-{% endif %} - -{% if errors %} -
-
-
-{% for error in errors %} -

{{ error }}

-{% endfor %} -
-
+ -{% endif %} -{% if admin or not errors %}
+ {% include "components/errors.html" %} +
- - - - -{% endif %} {% endblock %} {% block scripts %} {% endblock %} {% block entrypoint %} - {% if admin or not errors %} - - {% endif %} + {% endblock %} diff --git a/CTFd/themes/core/templates/components/errors.html b/CTFd/themes/core/templates/components/errors.html new file mode 100644 index 00000000..fd2aaa21 --- /dev/null +++ b/CTFd/themes/core/templates/components/errors.html @@ -0,0 +1,18 @@ +
+{% for info in infos %} + +{% endfor %} +{% for error in errors %} + +{% endfor %} +
\ No newline at end of file diff --git a/CTFd/themes/core/templates/components/navbar.html b/CTFd/themes/core/templates/components/navbar.html new file mode 100644 index 00000000..c41d9281 --- /dev/null +++ b/CTFd/themes/core/templates/components/navbar.html @@ -0,0 +1,141 @@ + \ No newline at end of file diff --git a/CTFd/themes/core/templates/confirm.html b/CTFd/themes/core/templates/confirm.html index 452ab59c..d2a18980 100644 --- a/CTFd/themes/core/templates/confirm.html +++ b/CTFd/themes/core/templates/confirm.html @@ -12,25 +12,10 @@
- {% for info in infos %} - - {% endfor %} - {% for error in errors %} - - {% endfor %} - {% if user %} + {% include "components/errors.html" %} +

- We've sent a confirmation email to {{ user.email }} + We've sent a confirmation email to your email address.


@@ -38,11 +23,9 @@

Please click the link in that email to confirm your account.

- {% endif %}
- {% if name %}

Need to resend the confirmation email? @@ -52,7 +35,6 @@

- {% endif %}
diff --git a/CTFd/themes/core/templates/errors/403.html b/CTFd/themes/core/templates/errors/403.html index c95193e5..f8b05b97 100644 --- a/CTFd/themes/core/templates/errors/403.html +++ b/CTFd/themes/core/templates/errors/403.html @@ -5,8 +5,11 @@
-

Forbidden

-

{{ error }}

+
+

Forbidden

+
+

{{ error }}

+
diff --git a/CTFd/themes/core/templates/errors/404.html b/CTFd/themes/core/templates/errors/404.html index 36f7361e..76df172d 100644 --- a/CTFd/themes/core/templates/errors/404.html +++ b/CTFd/themes/core/templates/errors/404.html @@ -5,9 +5,12 @@
-

404

-

Whoops, looks like we can't find that.

-

Sorry about that

+
+

404

+
+

File not found

+

Sorry about that

+
diff --git a/CTFd/themes/core/templates/errors/429.html b/CTFd/themes/core/templates/errors/429.html index dd1654dc..5da69d8d 100644 --- a/CTFd/themes/core/templates/errors/429.html +++ b/CTFd/themes/core/templates/errors/429.html @@ -5,9 +5,12 @@
-

429

-

Too many requests

-

Please slow down!

+
+

429

+
+

Too many requests

+

Please slow down!

+
diff --git a/CTFd/themes/core/templates/errors/500.html b/CTFd/themes/core/templates/errors/500.html index a9d648c9..223130d5 100644 --- a/CTFd/themes/core/templates/errors/500.html +++ b/CTFd/themes/core/templates/errors/500.html @@ -5,8 +5,11 @@
-

500

-

An Internal Server Error has occurred

+
+

500

+
+

An Internal Server Error has occurred

+
diff --git a/CTFd/themes/core/templates/errors/502.html b/CTFd/themes/core/templates/errors/502.html index abf8f9ad..acdaf4c5 100644 --- a/CTFd/themes/core/templates/errors/502.html +++ b/CTFd/themes/core/templates/errors/502.html @@ -5,8 +5,11 @@
-

502

-

Bad Gateway

+
+

502

+
+

Bad Gateway

+
diff --git a/CTFd/themes/core/templates/login.html b/CTFd/themes/core/templates/login.html index d427dd6c..38960c74 100644 --- a/CTFd/themes/core/templates/login.html +++ b/CTFd/themes/core/templates/login.html @@ -12,13 +12,7 @@
- {% for error in errors %} - - {% endfor %} + {% include "components/errors.html" %} {% if integrations.mlc() %} diff --git a/CTFd/themes/core/templates/register.html b/CTFd/themes/core/templates/register.html index 94cb3a6c..58e5b9bd 100644 --- a/CTFd/themes/core/templates/register.html +++ b/CTFd/themes/core/templates/register.html @@ -12,13 +12,7 @@
- {% for error in errors %} - - {% endfor %} + {% include "components/errors.html" %} {% if integrations.mlc() %} diff --git a/CTFd/themes/core/templates/reset_password.html b/CTFd/themes/core/templates/reset_password.html index 28027956..40f17d34 100644 --- a/CTFd/themes/core/templates/reset_password.html +++ b/CTFd/themes/core/templates/reset_password.html @@ -12,13 +12,8 @@
- {% for error in errors %} - - {% endfor %} + {% include "components/errors.html" %} + {% if can_send_mail() %}
diff --git a/CTFd/themes/core/templates/scoreboard.html b/CTFd/themes/core/templates/scoreboard.html index 0399661b..3439cd72 100644 --- a/CTFd/themes/core/templates/scoreboard.html +++ b/CTFd/themes/core/templates/scoreboard.html @@ -7,70 +7,52 @@
- {% if errors %} -
- {% endblock %} diff --git a/CTFd/themes/core/templates/settings.html b/CTFd/themes/core/templates/settings.html index d3e49ebb..95aace97 100644 --- a/CTFd/themes/core/templates/settings.html +++ b/CTFd/themes/core/templates/settings.html @@ -20,18 +20,8 @@
- {% if confirm_email %} - - {% endif %} + {% include "components/errors.html" %} +
diff --git a/CTFd/themes/core/templates/setup.html b/CTFd/themes/core/templates/setup.html index f9664a23..56bb07d7 100644 --- a/CTFd/themes/core/templates/setup.html +++ b/CTFd/themes/core/templates/setup.html @@ -11,16 +11,8 @@
- {% for error in errors %} -
- -
- {% endfor %} + {% include "components/errors.html" %} +