From 5be7d43446d4905d17f8fd13a0ca5df932ae9abd Mon Sep 17 00:00:00 2001 From: mouad bouras Date: Tue, 24 Mar 2026 21:08:57 -0400 Subject: [PATCH] 0.0.9 --- package-lock.json | 17 ++ package.json | 1 + public/admin/config.yml | 28 ++ src/components/Footer.astro | 86 ++++-- src/components/header.tsx | 62 ++-- src/components/submission-form.astro | 265 ---------------- src/components/submission.tsx | 420 ++++++++++++++++++++++++++ src/components/ui/contact.tsx | 165 ++++++++++ src/components/ui/hero.tsx | 8 +- src/components/ui/short-hero.tsx | 44 +++ src/components/ui/testimonials.tsx | 122 +++----- src/content.config.ts | 25 +- src/content/footer/fr/main.json | 21 ++ src/content/hero/fr/main.json | 5 +- src/content/settings/general.json | 9 +- src/content/soumission/fr/main.json | 8 +- src/content/testimonials/fr/main.json | 31 ++ src/pages/contact.astro | 178 ++--------- src/pages/index.astro | 12 +- src/pages/soumission.astro | 86 ++---- 20 files changed, 968 insertions(+), 625 deletions(-) delete mode 100644 src/components/submission-form.astro create mode 100644 src/components/submission.tsx create mode 100644 src/components/ui/contact.tsx create mode 100644 src/components/ui/short-hero.tsx create mode 100644 src/content/testimonials/fr/main.json diff --git a/package-lock.json b/package-lock.json index 0e86b74..d78ffd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "radix-ui": "^1.4.3", "react": "^19.2.4", "react-dom": "^19.2.4", + "react-hook-form": "^7.72.0", "shadcn": "^4.0.5", "tailwind-merge": "^3.5.0", "tailwindcss": "^4.2.1", @@ -10170,6 +10171,22 @@ "react": "^19.2.4" } }, + "node_modules/react-hook-form": { + "version": "7.72.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.72.0.tgz", + "integrity": "sha512-V4v6jubaf6JAurEaVnT9aUPKFbNtDgohj5CIgVGyPHvT9wRx5OZHVjz31GsxnPNI278XMu+ruFz+wGOscHaLKw==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18 || ^19" + } + }, "node_modules/react-refresh": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", diff --git a/package.json b/package.json index 061f3a9..a5fc5ee 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "radix-ui": "^1.4.3", "react": "^19.2.4", "react-dom": "^19.2.4", + "react-hook-form": "^7.72.0", "shadcn": "^4.0.5", "tailwind-merge": "^3.5.0", "tailwindcss": "^4.2.1", diff --git a/public/admin/config.yml b/public/admin/config.yml index 181544a..355d53b 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -258,6 +258,7 @@ collections: - { name: "navTitle", label: "Titre colonne navigation", widget: "string", i18n: true } - { name: "servicesTitle", label: "Titre colonne services", widget: "string", i18n: true } - { name: "contactTitle", label: "Titre colonne contact", widget: "string", i18n: true } + - { name: "serviceAreasTitle", label: "Titre colonne zones de service", widget: "string", i18n: true } - { name: "legal", label: "Mention légale (utiliser {year})", widget: "string", i18n: true } - { name: "rbq", label: "Ligne RBQ", widget: "string", i18n: true } - { name: "neq", label: "Ligne NEQ", widget: "string", i18n: true } @@ -269,6 +270,11 @@ collections: fields: - { name: "label", label: "Libellé", widget: "string" } - { name: "href", label: "URL", widget: "string" } + - name: "serviceAreas" + label: "Zones de service" + widget: "list" + i18n: true + field: { name: "item", label: "Ville / Secteur", widget: "string" } - name: "not_found" label: "Page 404" @@ -316,6 +322,27 @@ collections: - { name: "title", label: "Titre", widget: "string" } - { name: "description", label: "Description", widget: "text" } + - name: "testimonials" + label: "Témoignages" + label_singular: "Témoignage" + folder: "src/content/testimonials" + format: json + create: false + delete: false + i18n: true + slug: "{{slug}}" + fields: + - { name: "sectionLabel", label: "Libellé de section", widget: "string", i18n: true } + - { name: "title", label: "Titre de section", widget: "string", i18n: true } + - name: "items" + label: "Témoignages" + widget: "list" + i18n: true + fields: + - { name: "key", label: "Identifiant unique", widget: "string" } + - { name: "src", label: "URL du post Facebook (embed)", widget: "string" } + - { name: "height", label: "Hauteur de l'iframe (px)", widget: "number" } + - name: "settings" label: "Paramètres du site" files: @@ -333,6 +360,7 @@ collections: - { name: "serviceArea", label: "Zone de service", widget: "string" } - { name: "facebook", label: "Lien Facebook", widget: "string" } - { name: "instagram", label: "Lien Instagram", widget: "string", required: false } + - { name: "linkedin", label: "Lien LinkedIn (vide = masqué)", widget: "string", required: false } - { name: "rbq", label: "Numéro RBQ", widget: "string" } - { name: "neq", label: "Numéro NEQ (Registraire)", widget: "string" } diff --git a/src/components/Footer.astro b/src/components/Footer.astro index ad60162..fa78460 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -16,17 +16,17 @@ const legalNotice = footer.legal.replace('{year}', String(year));