templates: inject turnslide js

This commit is contained in:
Zankaria 2024-07-27 19:58:58 +02:00
parent f3c45073cb
commit 4f61026842
3 changed files with 13 additions and 6 deletions

View file

@ -13,6 +13,9 @@
active_page = "ukko"; active_page = "ukko";
{% endif %} {% endif %}
</script> </script>
{% if config.turnstile %}
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
{% endif %}
{% include 'header.html' %} {% include 'header.html' %}
{% set page_num %}{% for page in pages %}{% if page.selected %}{% if page.num != 1 %}{{ page.num }}{% endif %}{% endif %}{% endfor %}{% endset %} {% set page_num %}{% for page in pages %}{% if page.selected %}{% if page.num != 1 %}{{ page.num }}{% endif %}{% endif %}{% endfor %}{% endset %}
@ -58,7 +61,7 @@
{{ config.ad.top }} {{ config.ad.top }}
{% if not no_post_form %} {% if not no_post_form %}
{% include('post_form.html', {form_action_type: 'post-thread'}) %} {{ include('post_form.html', {form_action_type: 'post-thread'}) }}
{% else %} {% else %}
{% include 'boardlist.html' %} {% include 'boardlist.html' %}
{% endif %} {% endif %}

View file

@ -3,12 +3,15 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<script type='text/javascript'> <script type='text/javascript'>
var active_page = "catalog" var active_page = "catalog"
, board_name = "{{ board.uri }}" , board_name = "{{ board.uri }}"
, is_overboard = "{{ is_overboard }}"; , is_overboard = "{{ is_overboard }}";
</script> </script>
{% if config.turnstile %}
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
{% endif %}
<title>{{ settings.title }} ( /{{ board.title|e }}/ )</title> <title>{{ settings.title }} ( /{{ board.title|e }}/ )</title>
{% include 'header.html' %} {% include 'header.html' %}
</head> </head>
@ -28,7 +31,7 @@
<center>[ {% trans 'Create new thread' %} ]</center> <center>[ {% trans 'Create new thread' %} ]</center>
</summary> </summary>
<div style="margin: 1em 0;"> <div style="margin: 1em 0;">
{% include('post_form.html', {form_action_type: 'post-thread'}) %} {{ include('post_form.html', {form_action_type: 'post-thread'}) }}
</div> </div>
</details> </details>
{% endif %} {% endif %}

View file

@ -3,13 +3,14 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript"> <script type="text/javascript">
var active_page = "thread" var active_page = "thread"
, board_name = "{{ board.uri }}" , board_name = "{{ board.uri }}"
, thread_id = "{{ thread.id }}"; , thread_id = "{{ thread.id }}";
</script> </script>
{% if config.turnstile %}
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
{% endif %}
{% include 'header.html' %} {% include 'header.html' %}
@ -55,7 +56,7 @@
{{ config.ad.top }} {{ config.ad.top }}
{% include('post_form.html', {form_action_type: 'post-reply'}) %} {{ include('post_form.html', {form_action_type: 'post-reply'}) }}
{% if config.global_message %}<hr /><div class="blotter">{{ config.global_message }}</div>{% endif %} {% if config.global_message %}<hr /><div class="blotter">{{ config.global_message }}</div>{% endif %}
<hr /> <hr />