captcha: recaptcha respects dark mode

also removed the ugly border around it.
user-page
Harvey Tindall 1 year ago
parent 4014e93155
commit 07564bbde3
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -560,3 +560,16 @@ div.card:contains(section.banner.footer) {
input[type="checkbox" i], [class^="ri-"], [class*=" ri-"], .ri-refresh-line:before, .modal-close {
cursor: pointer;
}
.g-recaptcha {
overflow: hidden;
width: 296px;
height: 72px;
transform: scale(1.1);
transform-origin: top left;
}
.g-recaptcha iframe {
margin: -2px 0px 0px -4px;
}

@ -39,7 +39,8 @@
var reCAPTCHACallback = () => {
const el = document.getElementsByClassName("g-recaptcha")[0];
grecaptcha.render(el, {
"sitekey": window.reCAPTCHASiteKey
"sitekey": window.reCAPTCHASiteKey,
"theme": document.documentElement.classList.contains("dark") ? "dark" : "light"
});
}
</script>

@ -167,7 +167,7 @@
</label>
</form>
</div>
<div class="flex-1">
<div class="flex-initial">
<div class="card ~neutral @low mb-4">
<span class="label supra" for="inv-uses">{{ .strings.passwordRequirementsHeader }}</span>
<ul>
@ -180,7 +180,7 @@
</div>
{{ if .captcha }}
<div class="card ~neutral @low mb-4">
<span class="label supra mb-2">CAPTCHA {{ if not .reCAPTCHA }}<span id="captcha-regen" title="{{ .strings.refresh }}" class="badge lg @low ~info ml-2 float-right"><i class="ri-refresh-line"></i></span>{{ end }}<span id="captcha-success" class="badge lg @low ~critical ml-2 float-right"><i class="ri-close-line"></i></span></span>
<span class="label supra mb-2">CAPTCHA {{ if not .reCAPTCHA }}<span id="captcha-regen" title="{{ .strings.refresh }}" class="badge lg @low ~info ml-2 float-right"><i class="ri-refresh-line"></i></span><span id="captcha-success" class="badge lg @low ~critical ml-2 float-right"><i class="ri-close-line"></i></span>{{ end }}</span>
<div id="captcha-img" class="mt-2 mb-2 {{ if .reCAPTCHA }}g-recaptcha{{ end }}"></div>
{{ if not .reCAPTCHA }}
<input class="field ~neutral @low" id="captcha-input" class="mt-2" placeholder="CAPTCHA">

Loading…
Cancel
Save