Skip to content

Commit

Permalink
chore: put subscribe in a parent function
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Jan 6, 2025
1 parent 2a67543 commit ba4216a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/static/subscribe.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

#subscribe-button-ea4577c9:hover {
transform: scale(1.1);
background-color: var(--md-accent-fg-color);
border-color: var(--md-accent-fg-color);
color: var(--md-accent-bg-color);
}

/* Paper Airplane Icon */
Expand Down
13 changes: 8 additions & 5 deletions overrides/partials/subscription-header.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<script type="text/javascript">
console.log("Subscription form loaded");

document$.subscribe(function initializeHcaptcha() {
console.log("initializeHcaptcha");
hcaptcha.render("0de6fb2e-eb24-454a-8dfe-4f6c9670ab7e", {
theme: "dark",
function initializeHcaptcha() {
document$.subscribe(function handler() {
console.log("initializeHcaptcha");
hcaptcha.render("h-captcha-0de6fb2e-eb24-454a-8dfe-4f6c9670ab7e", {
theme: "dark",
sitekey: "0de6fb2e-eb24-454a-8dfe-4f6c9670ab7e",
});
});
});
}
</script>
<script
src="https://js.hcaptcha.com/1/api.js?render=explicit&onload=initializeHcaptcha"
Expand Down

0 comments on commit ba4216a

Please sign in to comment.