From 95d5ec6cc6e5c15f7aa8fc4454c70ad5884088b0 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sun, 4 Aug 2024 00:47:12 +0200 Subject: [PATCH] captcha_script.html: refactor captcha script inclusion in a separate template --- templates/captcha_script.html | 3 +++ templates/index.html | 4 +--- templates/themes/catalog/catalog.html | 4 +--- templates/thread.html | 4 +--- 4 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 templates/captcha_script.html diff --git a/templates/captcha_script.html b/templates/captcha_script.html new file mode 100644 index 00000000..2573682b --- /dev/null +++ b/templates/captcha_script.html @@ -0,0 +1,3 @@ +{% if config.turnstile %} + +{% endif %} diff --git a/templates/index.html b/templates/index.html index f36ff88b..2fda9773 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,9 +13,7 @@ active_page = "ukko"; {% endif %} - {% if config.turnstile %} - - {% endif %} + {% include 'captcha_script.html' %} {% include 'header.html' %} {% set page_num %}{% for page in pages %}{% if page.selected %}{% if page.num != 1 %}{{ page.num }}{% endif %}{% endif %}{% endfor %}{% endset %} diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index 78015377..44204e48 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -9,9 +9,7 @@ , board_name = "{{ board.uri }}" , is_overboard = "{{ is_overboard }}"; - {% if config.turnstile %} - - {% endif %} + {% include 'captcha_script.html' %} {{ settings.title }} ( /{{ board.title|e }}/ ) {% include 'header.html' %} diff --git a/templates/thread.html b/templates/thread.html index 5c015ddd..6888f56f 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -8,9 +8,7 @@ , board_name = "{{ board.uri }}" , thread_id = "{{ thread.id }}"; - {% if config.turnstile %} - - {% endif %} + {% include 'captcha_script.html' %} {% include 'header.html' %}