From e039fdf555820ba23e1af38b911d4776c67c10db Mon Sep 17 00:00:00 2001 From: Matthias Meister Date: Thu, 7 May 2026 08:25:55 +0200 Subject: [PATCH] Remove deprecated components from the project - Delete unused components including About19, Contact21, CTA, Faq7, Feature284, Hero235, Landing, Pricing4, Stats11, and Accordion. - Clean up the codebase by removing unnecessary files to improve maintainability and reduce clutter. - Ensure that the removal of these components does not affect the existing functionality of the application. --- ... Add-webcam-less-fallback-to-the-toggle.md | 52 ++++ ...age-und-entferne-ungenutzte-Komponenten.md | 71 ++++++ src/components/about19.tsx | 60 ----- src/components/contact21.tsx | 219 ---------------- src/components/cta.tsx | 68 ----- src/components/faq7.tsx | 86 ------- src/components/feature284.tsx | 93 ------- src/components/hero235.tsx | 116 --------- src/components/landing-hero-section.tsx | 114 ++++++--- src/components/landing-page-sections.tsx | 17 ++ src/components/landing.tsx | 185 -------------- src/components/landing/contact-section.tsx | 46 ++++ .../landing/deliverables-section.tsx | 37 +++ src/components/landing/packages-section.tsx | 59 +++++ src/components/landing/services-section.tsx | 55 ++++ src/components/pricing4.tsx | 219 ---------------- src/components/stats11.tsx | 48 ---- src/components/ui/accordion.tsx | 79 ------ src/components/ui/badge.tsx | 49 ---- src/components/ui/button.tsx | 67 ----- src/components/ui/field.tsx | 236 ------------------ src/components/ui/glowing-effect.tsx | 190 -------------- src/components/ui/input.tsx | 19 -- src/components/ui/label.tsx | 22 -- src/components/ui/separator.tsx | 26 -- src/components/ui/tabs.tsx | 90 ------- src/components/ui/webcam-pixel-grid.tsx | 4 + src/pages/index.astro | 4 +- tests/landing-content.test.mjs | 5 +- 29 files changed, 426 insertions(+), 1910 deletions(-) create mode 100644 backlog/tasks/task-5 - Add-webcam-less-fallback-to-the-toggle.md create mode 100644 backlog/tasks/task-6 - Modularisiere-die-Landingpage-und-entferne-ungenutzte-Komponenten.md delete mode 100644 src/components/about19.tsx delete mode 100644 src/components/contact21.tsx delete mode 100644 src/components/cta.tsx delete mode 100644 src/components/faq7.tsx delete mode 100644 src/components/feature284.tsx delete mode 100644 src/components/hero235.tsx create mode 100644 src/components/landing-page-sections.tsx delete mode 100644 src/components/landing.tsx create mode 100644 src/components/landing/contact-section.tsx create mode 100644 src/components/landing/deliverables-section.tsx create mode 100644 src/components/landing/packages-section.tsx create mode 100644 src/components/landing/services-section.tsx delete mode 100644 src/components/pricing4.tsx delete mode 100644 src/components/stats11.tsx delete mode 100644 src/components/ui/accordion.tsx delete mode 100644 src/components/ui/badge.tsx delete mode 100644 src/components/ui/button.tsx delete mode 100644 src/components/ui/field.tsx delete mode 100644 src/components/ui/glowing-effect.tsx delete mode 100644 src/components/ui/input.tsx delete mode 100644 src/components/ui/label.tsx delete mode 100644 src/components/ui/separator.tsx delete mode 100644 src/components/ui/tabs.tsx diff --git a/backlog/tasks/task-5 - Add-webcam-less-fallback-to-the-toggle.md b/backlog/tasks/task-5 - Add-webcam-less-fallback-to-the-toggle.md new file mode 100644 index 0000000..b77658a --- /dev/null +++ b/backlog/tasks/task-5 - Add-webcam-less-fallback-to-the-toggle.md @@ -0,0 +1,52 @@ +--- +id: TASK-5 +title: Show the webcam toggle only when a webcam is available +status: In Progress +assignee: [] +created_date: '2026-05-06 20:11' +updated_date: '2026-05-07 05:58' +labels: + - frontend + - fallback +dependencies: [] +priority: medium +--- + +## Description + + +Detect whether the browser reports an available webcam and only render the hero live-raster switch for visitors who can actually use the camera effect. + + +## Acceptance Criteria + +- [x] #1 The hero checks browser media devices for at least one video input without prompting for camera permission. +- [x] #2 The webcam switch and helper copy are hidden when no video input is reported or media-device enumeration is unavailable. +- [x] #3 The switch still starts and stops the existing webcam pixel grid for visitors with an available webcam. + + +## Implementation Plan + + +1. Inspect current hero toggle and WebcamPixelGrid error behavior +2. Detect webcam availability with browser media-device enumeration +3. Hide the helper copy and switch when no video input is available +4. Preserve the existing webcam start/stop flow when a camera exists +5. Verify with build and update acceptance criteria + + +## Implementation Notes + + +Implemented a hero fallback raster that activates when WebcamPixelGrid reports unavailable or denied camera access. + +Added an explicit mediaDevices/getUserMedia availability check before requesting camera access. + +Verified with npm run build; Astro built 3 static pages successfully. Dev server is running at http://127.0.0.1:4322/ for manual testing. + +Changed direction after feedback: removed the visual fallback and now hide the switch unless enumerateDevices reports a videoinput. + +Added a devicechange listener so the switch can appear or disappear if camera hardware availability changes during the session. + +Verified the revised behavior compiles with npm run build. + diff --git a/backlog/tasks/task-6 - Modularisiere-die-Landingpage-und-entferne-ungenutzte-Komponenten.md b/backlog/tasks/task-6 - Modularisiere-die-Landingpage-und-entferne-ungenutzte-Komponenten.md new file mode 100644 index 0000000..588d2db --- /dev/null +++ b/backlog/tasks/task-6 - Modularisiere-die-Landingpage-und-entferne-ungenutzte-Komponenten.md @@ -0,0 +1,71 @@ +--- +id: TASK-6 +title: Modularisiere die Landingpage und entferne ungenutzte Komponenten +status: In Progress +assignee: [] +created_date: '2026-05-07 06:21' +updated_date: '2026-05-07 06:23' +labels: + - refactor + - frontend +dependencies: [] +modified_files: + - src/pages/index.astro + - tests/landing-content.test.mjs + - src/components/landing-page-sections.tsx + - src/components/landing/services-section.tsx + - src/components/landing/deliverables-section.tsx + - src/components/landing/packages-section.tsx + - src/components/landing/contact-section.tsx + - src/components/landing.tsx + - src/components/about19.tsx + - src/components/contact21.tsx + - src/components/cta.tsx + - src/components/faq7.tsx + - src/components/feature284.tsx + - src/components/hero235.tsx + - src/components/pricing4.tsx + - src/components/stats11.tsx + - src/components/ui/accordion.tsx + - src/components/ui/badge.tsx + - src/components/ui/button.tsx + - src/components/ui/field.tsx + - src/components/ui/glowing-effect.tsx + - src/components/ui/input.tsx + - src/components/ui/label.tsx + - src/components/ui/separator.tsx + - src/components/ui/tabs.tsx +priority: medium +--- + +## Description + + +Die bestehende Landingpage soll in klarere, kleinere Komponenten aufgeteilt werden. Nicht mehr referenzierte Komponenten sollen entfernt werden, ohne vorhandene Nutzer- oder laufende Änderungen zurückzudrehen. + + +## Acceptance Criteria + +- [x] #1 Die Hauptseite nutzt klar benannte modulare Komponenten statt einer monolithischen LandingRest-Komponente. +- [x] #2 Nicht benötigte Komponenten im Komponentenordner sind entfernt oder nicht mehr Teil der Codebasis. +- [x] #3 Build und vorhandene Tests laufen nach der Änderung ohne Fehler. + + +## Implementation Plan + + +1. Bestehende Landingpage-Struktur und Import-Verwendung prüfen. +2. LandingRest in klar benannte Sektionen extrahieren und Index-Import aktualisieren. +3. Nicht referenzierte Template- und UI-Komponenten entfernen. +4. Tests an neue Struktur anpassen und Build/Test ausführen. + + +## Implementation Notes + + +LandingRest wurde in ServicesSection, DeliverablesSection, PackagesSection und ContactSection extrahiert; index.astro nutzt nun LandingPageSections. + +Nicht referenzierte Template-Komponenten sowie deren ungenutzte UI-Hilfskomponenten wurden entfernt. Vorbestehende Änderungen an landing-hero-section.tsx und ui/webcam-pixel-grid.tsx blieben unangetastet. + +Verifikation: node --test tests/*.mjs und pnpm build laufen erfolgreich. + diff --git a/src/components/about19.tsx b/src/components/about19.tsx deleted file mode 100644 index 0ccff2b..0000000 --- a/src/components/about19.tsx +++ /dev/null @@ -1,60 +0,0 @@ - -import { cn } from "@/lib/utils"; - -interface About19Props { - className?: string; -} - -const About19 = ({ className }: About19Props) => { - return ( -
-
-
-
- Matthias Meister bei der Webentwicklung -
- -
-

- Über die Zusammenarbeit -

-

- Hallo, ich bin Matthias. Zurück in der Region und hier, um zu - bleiben. -

-
-

- Ich bin in der Region aufgewachsen, war durch die Bundeswehr - viele Jahre weg und bin jetzt zurück. -

-

- Seit über 15 Jahren beschäftige ich mich mit Webentwicklung und - Software. Einen Großteil davon intern für die Bundeswehr: - Projekte, die ich Ihnen leider nicht zeigen kann. Was ich Ihnen - zeigen kann: wie ich arbeite. Zuverlässig, präzise und ohne - unnötigen Schnickschnack. -

-

- Neben Websites für regionale Unternehmen entwickle ich eigene - Software und Apps. Wenn Ihre Anforderungen irgendwann über eine - einfache Website hinausgehen, bleibt der Ansprechpartner also - derselbe. -

-
-

- Mein Ziel: Unternehmen aus der Region mit einer Website - ausstatten, die funktioniert, gefunden wird und Ihnen keine - Kopfschmerzen macht. -

-
-
-
-
- ); -}; - -export { About19 }; diff --git a/src/components/contact21.tsx b/src/components/contact21.tsx deleted file mode 100644 index 913dd93..0000000 --- a/src/components/contact21.tsx +++ /dev/null @@ -1,219 +0,0 @@ -"use client"; - -import { zodResolver } from "@hookform/resolvers/zod"; -import { CornerDownRight, LoaderIcon } from "lucide-react"; -import { useState } from "react"; -import { Controller, useForm } from "react-hook-form"; -import { z } from "zod"; - -import { Button } from "@/components/ui/button"; -import { - Field, - FieldError, - FieldGroup, - FieldLabel, -} from "@/components/ui/field"; -import { Input } from "@/components/ui/input"; -import { cn } from "@/lib/utils"; - -const contactFormSchema = z.object({ - name: z.string().min(1, "Bitte geben Sie Ihren Namen ein"), - email: z - .string() - .min(1, "Bitte geben Sie Ihre E-Mail ein") - .email("Bitte geben Sie eine gültige E-Mail ein"), - message: z.string().min(1, "Bitte beschreiben Sie kurz Ihr Anliegen"), -}); - -type ContactFormData = z.infer; - -interface Contact21Props { - className?: string; - onSubmit?: (data: ContactFormData) => Promise; -} - -const Contact21 = ({ className, onSubmit }: Contact21Props) => { - const [isSubmitted, setIsSubmitted] = useState(false); - const [showSuccess, setShowSuccess] = useState(false); - - const form = useForm({ - resolver: zodResolver(contactFormSchema), - mode: "onSubmit", - reValidateMode: "onSubmit", - defaultValues: { - name: "", - email: "", - message: "", - }, - }); - - const handleFormSubmit = async (data: ContactFormData) => { - try { - if (onSubmit) { - await onSubmit(data); - } else { - console.log("Form submitted:", data); - await new Promise((resolve) => setTimeout(resolve, 1000)); - } - setIsSubmitted(true); - setShowSuccess(true); - form.reset(); - setTimeout(() => setShowSuccess(false), 4500); - setTimeout(() => setIsSubmitted(false), 5000); - } catch { - form.setError("root", { - message: "Beim Senden ist etwas schiefgelaufen. Bitte versuchen Sie es erneut.", - }); - } - }; - - return ( -
-
-
-
-
-

- Kontakt -

-

- Erzählen Sie kurz, worum es geht. -

-

- Ich melde mich innerhalb von 24 Stunden mit einer ersten - Einschätzung und dem passenden nächsten Schritt. -

-
-
-
- MM -
-
-

- Matthias Meister -

-

- Freelance Webdesigner -

-
-
-
-
- {isSubmitted && ( -
-

- Vielen Dank! Ich melde mich in Kürze bei Ihnen. -

-
- )} - -
- - ( - - - Name - - - {fieldState.invalid && ( - - )} - - )} - /> - - ( - - - E-Mail - - - {fieldState.invalid && ( - - )} - - )} - /> - - ( - - - Nachricht - -