diff --git a/hifi-src/index.html b/hifi-src/index.html
index 534e126..615452d 100644
--- a/hifi-src/index.html
+++ b/hifi-src/index.html
@@ -15,9 +15,16 @@
-
+
+
+
+
+
+
-
diff --git a/hifi-src/public/og-image.jpg b/hifi-src/public/og-image.jpg
new file mode 100644
index 0000000..7e02bbc
Binary files /dev/null and b/hifi-src/public/og-image.jpg differ
diff --git a/hifi-src/src/App.jsx b/hifi-src/src/App.jsx
index a3cf939..912bd89 100644
--- a/hifi-src/src/App.jsx
+++ b/hifi-src/src/App.jsx
@@ -1,5 +1,6 @@
import { lazy, Suspense } from 'react';
import { Routes, Route, Navigate, useParams } from 'react-router-dom';
+import { MotionConfig } from 'framer-motion';
import ScrollToTop from './components/ScrollToTop.jsx';
import CustomCursor from './components/CustomCursor.jsx';
import SetupGate from './components/SetupGate.jsx';
@@ -12,17 +13,12 @@ import Home from './pages/public/Home.jsx';
import VehicleSelect from './pages/public/VehicleSelect.jsx';
import BrandPage from './pages/public/BrandPage.jsx';
import ModelPage from './pages/public/ModelPage.jsx';
-import GalleryOverview from './pages/public/GalleryOverview.jsx';
-import GalleryBrandPage from './pages/public/GalleryBrandPage.jsx';
-import GalleryProjectPage from './pages/public/GalleryProjectPage.jsx';
import Leistungen from './pages/public/Leistungen.jsx';
import ContactPage from './pages/public/ContactPage.jsx';
-import DownloadsPage from './pages/public/DownloadsPage.jsx';
-import Impressum from './pages/public/Impressum.jsx';
-import Datenschutz from './pages/public/Datenschutz.jsx';
-import AGB from './pages/public/AGB.jsx';
+import NotFound from './pages/public/NotFound.jsx';
-// Oeffentliche Seiten bleiben im Haupt-Bundle (sofort da beim Navigieren). Admin-Bereich,
+// Die Kernseiten des Kaufwegs bleiben im Haupt-Bundle (sofort da beim Navigieren). Galerie,
+// Downloads, Rechtstexte und die 404-Seite werden erst bei Aufruf nachgeladen. Admin-Bereich,
// Login und Einrichtungs-Assistent werden erst geladen, wenn man sie aufruft - vorher lud
// jeder Besucher den kompletten Admin-Code (Editor, Bildzuschnitt, QR-Codes, ...) mit.
//
@@ -56,6 +52,13 @@ const lazyPage = (load) =>
)
);
+const GalleryOverview = lazyPage(() => import('./pages/public/GalleryOverview.jsx'));
+const GalleryBrandPage = lazyPage(() => import('./pages/public/GalleryBrandPage.jsx'));
+const GalleryProjectPage = lazyPage(() => import('./pages/public/GalleryProjectPage.jsx'));
+const DownloadsPage = lazyPage(() => import('./pages/public/DownloadsPage.jsx'));
+const Impressum = lazyPage(() => import('./pages/public/Impressum.jsx'));
+const Datenschutz = lazyPage(() => import('./pages/public/Datenschutz.jsx'));
+const AGB = lazyPage(() => import('./pages/public/AGB.jsx'));
const SetupWizard = lazyPage(() => import('./pages/public/SetupWizard.jsx'));
const Login = lazyPage(() => import('./pages/admin/Login.jsx'));
const Dashboard = lazyPage(() => import('./pages/admin/Dashboard.jsx'));
@@ -95,7 +98,9 @@ function LegacyPackageRedirect() {
export default function App() {
return (
- <>
+ // reducedMotion="user": wer im Betriebssystem "Bewegung reduzieren" eingestellt hat,
+ // bekommt alle framer-motion-Animationen (Einblenden, Parallax, ...) ohne Bewegung.
+
JPG, PNG oder WebP. Große Fotos werden automatisch verkleinert.
{error &&{error}
} {cropSrc && ( diff --git a/hifi-src/src/components/Navbar.jsx b/hifi-src/src/components/Navbar.jsx index 8b1790b..60875df 100644 --- a/hifi-src/src/components/Navbar.jsx +++ b/hifi-src/src/components/Navbar.jsx @@ -1,17 +1,17 @@ import { useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; -import { Link, useLocation } from 'react-router-dom'; +import { Link, NavLink, useLocation } from 'react-router-dom'; import { LayoutDashboard, MessageCircle, Phone, ShoppingBag } from 'lucide-react'; import ThemeToggle from './ThemeToggle.jsx'; import { useAuth } from '../context/AuthContext.jsx'; import { useIsAreaHidden, useSiteSettings } from '../context/SiteSettingsContext.jsx'; import { useLanguage } from '../context/LanguageContext.jsx'; import logoDark from '../assets/logo-dark.png'; +import { telHref, waHref } from '../utils/contactLinks.js'; +import { trackEvent } from '../utils/analytics.js'; const SHOP_URL = 'https://www.audio4cars.de/'; -const digitsOnly = (value) => (value || '').replace(/[^\d+]/g, ''); - const ITEM_DELAY_MS = 70; const FLY_DURATION_MS = 500; @@ -152,6 +152,47 @@ export default function Navbar() { const transparent = isHome && !scrolled; + // Menue-Overlay als echter Dialog: Escape schliesst, Tab bleibt im Menue, die Seite + // dahinter scrollt nicht mit, und der Fokus springt beim Oeffnen auf "Schliessen". + const overlayRef = useRef(null); + const burgerRef = useRef(null); + useEffect(() => { + if (!open) return undefined; + const previousOverflow = document.body.style.overflow; + document.body.style.overflow = 'hidden'; + const focusTimer = setTimeout(() => overlayRef.current?.querySelector('button, a')?.focus(), 50); + const handleKeyDown = (e) => { + if (e.key === 'Escape') { + setOpen(false); + return; + } + if (e.key !== 'Tab' || !overlayRef.current) return; + const focusable = [...overlayRef.current.querySelectorAll('a[href], button')]; + if (!focusable.length) return; + const first = focusable[0]; + const last = focusable[focusable.length - 1]; + if (e.shiftKey && document.activeElement === first) { + e.preventDefault(); + last.focus(); + } else if (!e.shiftKey && document.activeElement === last) { + e.preventDefault(); + first.focus(); + } + }; + document.addEventListener('keydown', handleKeyDown); + return () => { + clearTimeout(focusTimer); + document.body.style.overflow = previousOverflow; + document.removeEventListener('keydown', handleKeyDown); + burgerRef.current?.focus({ preventScroll: true }); + }; + }, [open]); + + const desktopLinkClass = ({ isActive }) => + `rounded-md px-2.5 py-1.5 text-sm font-semibold transition ${ + isActive ? 'text-brand-400' : transparent ? 'text-white/90 hover:text-white' : 'text-neutral-300 hover:text-white' + }`; + useEffect(() => { if (open) { setMounted(true); @@ -215,8 +256,11 @@ export default function Navbar() {+ {compact + ? 'Verkleinert alle bereits hochgeladenen Fotos, damit die Seite schneller lädt. Neue Bilder werden automatisch verkleinert.' + : 'Neu hochgeladene Bilder werden automatisch verkleinert und komprimiert. Dieser Button holt das für alle bereits vorhandenen Bilder nach – nützlich, wenn die Seite durch zu hoch aufgelöste Fotos spürbar langsam lädt.'} +
+ {gdAvailable === false && ( ++ Diese Funktion braucht die PHP-Erweiterung "gd", die auf diesem Server aktuell nicht aktiv ist. Bei den + meisten Hostern (auch All-Inkl) ist sie Teil jeder PHP-Version – bitte beim Hoster-Support nachfragen bzw. + prüfen, ob in den Hosting-Einstellungen eine andere PHP-Version ausgewählt werden muss. +
+ )} + + {error &&{error}
} + {result && ( ++ {result.processed} Bild(er) verkleinert: {(result.before_bytes / 1024 / 1024).toFixed(1)} MB + {' → '} + {(result.after_bytes / 1024 / 1024).toFixed(1)} MB. +
+ )} ++ {dirty ? '● Ungespeicherte Änderungen' : savedAt ? `✓ Gespeichert um ${savedAt.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' })} Uhr` : 'Alles gespeichert'} +
+ ++ Deine Sitzung ist abgelaufen. Deine Eingaben auf dieser Seite bleiben erhalten – nach dem Anmelden einfach + noch einmal speichern. +
+ {step === 'credentials' ? ( + + ) : ( + + )} +Jeder Mitarbeiter bekommt ein eigenes Konto mit genau den Rechten, die er braucht.
-| {formatLastActive(u.last_active_at)} | -+ | {u.id !== currentUser?.id && !u.is_primary && ( @@ -161,7 +174,7 @@ export default function AdminUsers() { - |