diff --git a/src/App.tsx b/src/App.tsx
index 6394255..0a16a4c 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -38,7 +38,37 @@ export default function App() {
});
}, []);
- // Dynamisch den Dokumententitel (Browsertab-Titel) basierend auf Pfad und Autorendaten anpassen
+ // Ermittelt die aktive Suite basierend auf Pfad-Überschreibungen oder dem Domainnamen (Hostname)
+ const getActiveSuite = (): "erotica" | "clara" | "scifi" => {
+ const hostname = window.location.hostname.toLowerCase();
+
+ // 1. Pfad-basierte Routen (haben Vorrang, z.B. für die Vorschau oder Admin-Interaktionen)
+ if (currentPath === "/sensual-moments" || currentPath.startsWith("/sensual-moments/")) {
+ return "erotica";
+ }
+ if (currentPath === "/clara-finch" || currentPath.startsWith("/clara-finch/")) {
+ return "clara";
+ }
+ if (currentPath === "/sci-fi" || currentPath.startsWith("/sci-fi/")) {
+ return "scifi";
+ }
+
+ // 2. Domain-basierte Routen (für den Live-Betrieb hinter einem Reverse Proxy)
+ if (hostname.includes("annieslone.de")) {
+ return "erotica";
+ }
+ if (hostname.includes("clarafinch.de")) {
+ return "clara";
+ }
+ if (hostname.includes("hesse-sf.de")) {
+ return "scifi";
+ }
+
+ // Standard-Fallback (Daniel Hesse SciFi)
+ return "scifi";
+ };
+
+ // Dynamisch den Dokumententitel (Browsertab-Titel) basierend auf Suite und Autorendaten anpassen
useEffect(() => {
if (!authorData) {
document.title = "Lade Autoren-Portfolio...";
@@ -46,9 +76,13 @@ export default function App() {
}
if (currentPath === "/admin" || currentPath.startsWith("/admin/")) {
document.title = "Admin-Zentrale | Autor-Suiten";
- } else if (currentPath === "/sensual-moments" || currentPath.startsWith("/sensual-moments/")) {
+ return;
+ }
+
+ const activeSuite = getActiveSuite();
+ if (activeSuite === "erotica") {
document.title = authorData.erotica.name || "Marc Velvet";
- } else if (currentPath === "/clara-finch" || currentPath.startsWith("/clara-finch/")) {
+ } else if (activeSuite === "clara") {
document.title = authorData.clara.name || "Clara Finch";
} else {
document.title = authorData.scifi.name || "Daniel Hesse";
@@ -94,10 +128,11 @@ export default function App() {
// 4. SciFi Daniel Hesse Portfolio
const renderActivePortfolio = () => {
- if (currentPath === "/sensual-moments" || currentPath.startsWith("/sensual-moments/")) {
+ const activeSuite = getActiveSuite();
+ if (activeSuite === "erotica") {
return ;
}
- if (currentPath === "/clara-finch" || currentPath.startsWith("/clara-finch/")) {
+ if (activeSuite === "clara") {
return ;
}
return ;