Hide recaptcha badge

This commit is contained in:
2024-03-12 21:50:22 +00:00
parent 2c70ba45d4
commit 8743849fee
5 changed files with 26 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
@using BeauFindlay.Shared.Contracts
@inject HttpClient HttpClient
@inject IJSRuntime JsRuntime
@inject IJSRuntime JSRuntime
<div class="text-center">
<h1 class="text-4xl">Contact</h1>
@@ -12,7 +12,7 @@
</p>
</div>
<div class="mx-auto max-w-xl pt-10 pb-4">
<div class="mx-auto max-w-xl pt-8 pb-4">
<EditForm Model="contactInput" OnValidSubmit="HandleValidSubmit">
<DataAnnotationsValidator/>
@@ -39,7 +39,10 @@
</div>
</div>
</div>
<div class="mt-8 flex items-center justify-center">
<div class="mt-4">
<small>This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy" class="underline underline-offset-2">Privacy Policy</a> and <a href="https://policies.google.com/terms" class="underline underline-offset-2">Terms of Service</a> apply.</small>
</div>
<div class="mt-4 flex items-center justify-center">
<Button Type="submit" IsLoading="@isSubmitting">
<i class="fa-solid fa-paper-plane"></i> Send
</Button>
@@ -66,10 +69,6 @@
</div>
}
<script src="https://www.google.com/recaptcha/api.js?render=6LcvxZIpAAAAAOIP5L6kGngwDZRpwkTdMezPn06x" async
defer></script>
<script src="js/recaptcha.js"></script>
@code {
private readonly ContactInputModel contactInput = new();
@@ -96,7 +95,7 @@
{
isSubmitting = true;
var recaptchaResponse = await JsRuntime.InvokeAsync<string>("executeRecaptcha");
var recaptchaResponse = await JSRuntime.InvokeAsync<string>("executeRecaptcha");
if (string.IsNullOrWhiteSpace(recaptchaResponse))
{

View File

@@ -12,4 +12,5 @@
@using BeauFindlay.Client.Components.Alert
@using BeauFindlay.Client.Components.Typewriter
@using BeauFindlay.Client.Components.Button
@using BeauFindlay.Client.Components.LoadingSpinner
@using BeauFindlay.Client.Components.LoadingSpinner
@using BeauFindlay.Shared.Contracts

View File

@@ -20,4 +20,9 @@
@keyframes fadeInAnimation {
from { opacity: 0; }
to { opacity: 1; }
}
}
.grecaptcha-badge {
visibility: hidden !important;
}

View File

@@ -809,8 +809,8 @@ video {
padding-bottom: 1rem;
}
.pt-10 {
padding-top: 2.5rem;
.pt-8 {
padding-top: 2rem;
}
.text-center {
@@ -980,6 +980,10 @@ video {
}
}
.grecaptcha-badge {
visibility: hidden !important;
}
.placeholder\:text-gray-400::-moz-placeholder {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
@@ -1090,4 +1094,5 @@ video {
--tw-text-opacity: 1;
color: rgb(75 85 99 / var(--tw-text-opacity));
}
}
}

View File

@@ -26,6 +26,9 @@
</div>
<script src="js/smoothScroll.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="https://www.google.com/recaptcha/api.js?render=6LcvxZIpAAAAAOIP5L6kGngwDZRpwkTdMezPn06x" async
defer></script>
<script src="js/recaptcha.js"></script>
</body>
</html>