This commit is contained in:
pacnpal
2024-10-29 20:36:49 -04:00
parent a6c33cf50f
commit 4e970400ef
9 changed files with 822 additions and 335 deletions

View File

@@ -1,4 +1,22 @@
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script
src="https://challenges.cloudflare.com/turnstile/v0/api.js"
async
defer
></script>
<div class="turnstile">
<div class="cf-turnstile" data-sitekey="{{ site_key }}" data-theme="light"></div>
<div
id="turnstile-widget"
class="cf-turnstile"
data-sitekey="{{ site_key }}"
></div>
</div>
<script>
// Apply theme to the Turnstile widget based on the retrieved theme
document.addEventListener("DOMContentLoaded", function () {
const turnstileWidget = document.getElementById("turnstile-widget");
if (turnstileWidget) {
turnstileWidget.setAttribute("data-theme", theme);
}
});
</script>