From e8833ce52b6dfda7d54fdc18815db0e2d676b4b5 Mon Sep 17 00:00:00 2001 From: becarta Date: Sat, 12 Jul 2025 00:28:44 +0200 Subject: [PATCH] Add spam review functionality to contact form and update translations - Introduced a new spamReview property in the Form interface to handle manual review requests for messages flagged as spam. - Updated the Form component to display a spam warning and a manual review form with dynamic labels and placeholders based on translations. - Enhanced the Tailwind CSS styles for responsive subtitles across various components. - Added corresponding translations for the spam review feature in English, Dutch, German, and French, ensuring consistency and clarity in messaging. - Updated various components to integrate the new spamReview functionality, improving user experience and interaction. --- src/assets/styles/tailwind.css | 5 ++ src/components/ui/Form.astro | 73 ++++++++++++++------- src/components/ui/Headline.astro | 2 +- src/components/widgets/CallToAction.astro | 2 +- src/components/widgets/Contact.astro | 2 + src/components/widgets/Content.astro | 2 +- src/components/widgets/Hero.astro | 2 +- src/components/widgets/Hero2.astro | 2 +- src/components/widgets/HeroText.astro | 2 +- src/components/widgets/WorkExperience.astro | 2 +- src/i18n/translations.homepage.ts | 60 +++++++++++++++++ src/pages/[lang]/index copy.astro | 1 + src/pages/[lang]/index.astro | 7 +- src/pages/index.astro | 1 + src/types.d.ts | 12 ++++ 15 files changed, 145 insertions(+), 30 deletions(-) diff --git a/src/assets/styles/tailwind.css b/src/assets/styles/tailwind.css index 6d5c5f5..74154fa 100644 --- a/src/assets/styles/tailwind.css +++ b/src/assets/styles/tailwind.css @@ -26,6 +26,11 @@ .text-muted { color: var(--aw-color-text-muted); } + + /* Responsive subtitle utility */ + .subtitle-responsive { + @apply text-base md:text-lg lg:text-xl; + } } @layer components { diff --git a/src/components/ui/Form.astro b/src/components/ui/Form.astro index 91d66fb..b8324d8 100644 --- a/src/components/ui/Form.astro +++ b/src/components/ui/Form.astro @@ -2,7 +2,7 @@ import type { Form as Props } from '~/types'; import Button from '~/components/ui/Button.astro'; -const { inputs, textarea, disclaimer, button = 'Contact us', description = '' } = Astro.props; +const { inputs, textarea, disclaimer, button = 'Contact us', description = '', spamReview } = Astro.props; --- -
+