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 @using BeauFindlay.Shared.Contracts
@inject HttpClient HttpClient @inject HttpClient HttpClient
@inject IJSRuntime JsRuntime @inject IJSRuntime JSRuntime
<div class="text-center"> <div class="text-center">
<h1 class="text-4xl">Contact</h1> <h1 class="text-4xl">Contact</h1>
@@ -12,7 +12,7 @@
</p> </p>
</div> </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"> <EditForm Model="contactInput" OnValidSubmit="HandleValidSubmit">
<DataAnnotationsValidator/> <DataAnnotationsValidator/>
@@ -39,7 +39,10 @@
</div> </div>
</div> </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"> <Button Type="submit" IsLoading="@isSubmitting">
<i class="fa-solid fa-paper-plane"></i> Send <i class="fa-solid fa-paper-plane"></i> Send
</Button> </Button>
@@ -66,10 +69,6 @@
</div> </div>
} }
<script src="https://www.google.com/recaptcha/api.js?render=6LcvxZIpAAAAAOIP5L6kGngwDZRpwkTdMezPn06x" async
defer></script>
<script src="js/recaptcha.js"></script>
@code { @code {
private readonly ContactInputModel contactInput = new(); private readonly ContactInputModel contactInput = new();
@@ -96,7 +95,7 @@
{ {
isSubmitting = true; isSubmitting = true;
var recaptchaResponse = await JsRuntime.InvokeAsync<string>("executeRecaptcha"); var recaptchaResponse = await JSRuntime.InvokeAsync<string>("executeRecaptcha");
if (string.IsNullOrWhiteSpace(recaptchaResponse)) if (string.IsNullOrWhiteSpace(recaptchaResponse))
{ {

View File

@@ -13,3 +13,4 @@
@using BeauFindlay.Client.Components.Typewriter @using BeauFindlay.Client.Components.Typewriter
@using BeauFindlay.Client.Components.Button @using BeauFindlay.Client.Components.Button
@using BeauFindlay.Client.Components.LoadingSpinner @using BeauFindlay.Client.Components.LoadingSpinner
@using BeauFindlay.Shared.Contracts

View File

@@ -21,3 +21,8 @@
from { opacity: 0; } from { opacity: 0; }
to { opacity: 1; } to { opacity: 1; }
} }
.grecaptcha-badge {
visibility: hidden !important;
}

View File

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

View File

@@ -26,6 +26,9 @@
</div> </div>
<script src="js/smoothScroll.js"></script> <script src="js/smoothScroll.js"></script>
<script src="_framework/blazor.webassembly.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> </body>
</html> </html>