diff --git a/src/app/(frontend)/abaixo-assinado/[id]/page.tsx b/src/app/(frontend)/abaixo-assinado/[id]/page.tsx index 3f06b70e..13210299 100644 --- a/src/app/(frontend)/abaixo-assinado/[id]/page.tsx +++ b/src/app/(frontend)/abaixo-assinado/[id]/page.tsx @@ -19,31 +19,39 @@ export default async function Page({ params }: { params: Promise<{ id: string }> return notFound() } + const consentHTML = + typeof petition.form.consent !== 'number' + ? convertLexicalToHTML({ data: petition.form.consent.text }) + : '' + return ( -
-
-
-
+
+
+
+
- + Abaixo-assinado -

+

{petition.title}

-

+

{petition.subtitle}

-
+
Assinar agora Ler detalhes @@ -54,18 +62,30 @@ export default async function Page({ params }: { params: Promise<{ id: string }>
-
-
-
- +
+
+
+ + Participe da mobilização + +

+ Sua assinatura fortalece a pressão pela jornada 5x2. +

+

+ Preencha o formulário para somar apoio público à proposta. Os dados serão usados + apenas para registrar sua participação nesta campanha. +

+
+
+
diff --git a/src/app/(frontend)/styles.css b/src/app/(frontend)/styles.css index 275851a7..18b10c3e 100644 --- a/src/app/(frontend)/styles.css +++ b/src/app/(frontend)/styles.css @@ -104,6 +104,51 @@ body, --sidebar-ring: oklch(0.9 0.14 143); --background: #ae1603; --foreground: oklch(0.98 0.004 197.1); + --field-background: #ffffff; + --field-foreground: #000000; + --field-placeholder: rgb(0 0 0 / 80%); + --field-border: rgb(255 255 255 / 80%); + --field-disabled-background: rgb(255 255 255 / 70%); + --field-disabled-foreground: rgb(0 0 0 / 70%); + --field-icon: rgb(0 0 0 / 60%); +} + +[data-theme="petition"] { + --background: #fff8f2; + --foreground: #2c2522; + --card: #ffffff; + --card-foreground: #2c2522; + --popover: #ffffff; + --popover-foreground: #2c2522; + --primary: #c51414; + --primary-foreground: #ffffff; + --secondary: #ffe8df; + --secondary-foreground: #5f1715; + --muted: #f4e7de; + --muted-foreground: #675c56; + --accent: #ffcf2e; + --accent-foreground: #332300; + --border: rgb(189 119 104 / 24%); + --input: rgb(189 119 104 / 32%); + --ring: #c51414; + --destructive: #b42318; + --petition-hero: #b6120f; + --petition-hero-foreground: #fffaf5; + --petition-hero-muted: #ffe2d6; + --petition-hero-chip: rgb(255 255 255 / 12%); + --petition-hero-chip-foreground: #fff7ed; + --petition-hero-glow: rgb(255 207 46 / 24%); + --petition-hero-depth: rgb(122 0 0 / 35%); + --petition-hero-cta: #ffcf2e; + --petition-hero-cta-foreground: #332300; + --petition-form-section: #f6ebe4; + --field-background: #ffffff; + --field-foreground: #2c2522; + --field-placeholder: rgb(44 37 34 / 58%); + --field-border: #ddc7bc; + --field-disabled-background: #ece0d9; + --field-disabled-foreground: rgb(44 37 34 / 55%); + --field-icon: rgb(44 37 34 / 58%); } .dark { diff --git a/src/components/PetitionForm.tsx b/src/components/PetitionForm.tsx index 6a4f9280..bba66b94 100644 --- a/src/components/PetitionForm.tsx +++ b/src/components/PetitionForm.tsx @@ -22,14 +22,14 @@ import { PhoneInput } from './PhoneInput' import { StateSelect } from './StateSelect' import { CitySelect } from './CitySelect' import { PostalCodeInput } from './PostalCodeInput' -import { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html' interface PetitionFormProps { id: string petition: Petition + consentHTML: string } -export const PetitionForm = ({ id, petition }: PetitionFormProps) => { +export const PetitionForm = ({ id, petition, consentHTML }: PetitionFormProps) => { const methods = useForm({ resolver: zodResolver(petitionFormSchema), defaultValues: { @@ -71,9 +71,7 @@ export const PetitionForm = ({ id, petition }: PetitionFormProps) => {
{petition.form.title ? {petition.form.title} : null} {petition.form.subtitle ? ( - - Assine esta petição e ajude a manter a orla de Salvador para todos nós! - + {petition.form.subtitle} ) : null} @@ -105,10 +103,11 @@ export const PetitionForm = ({ id, petition }: PetitionFormProps) => {