From 9942a21b8e02e98b977c63e5354917ab2a280d92 Mon Sep 17 00:00:00 2001 From: Till JS Date: Sun, 29 Mar 2026 14:46:03 +0200 Subject: [PATCH] refactor(citycorners): redirect old routes + update landing page - Replace old /map, /add, /locations/[id] routes with redirects to / (locations are now at /cities/[slug]/...) - Rewrite landing page for multi-city platform concept - Remove old Konstanz-specific landing components and data Co-Authored-By: Claude Opus 4.6 (1M context) --- .../apps/landing/src/components/Filter.astro | 73 -- .../landing/src/components/LocationCard.astro | 48 - .../apps/landing/src/data/locations.json | 261 ----- .../apps/landing/src/layouts/Layout.astro | 4 +- .../apps/landing/src/pages/index.astro | 181 +++- .../landing/src/pages/locations/[id].astro | 190 ---- .../web/src/routes/(app)/add/+page.svelte | 426 +------- .../routes/(app)/locations/[id]/+page.svelte | 958 +----------------- .../(app)/locations/[id]/edit/+page.svelte | 276 +---- .../web/src/routes/(app)/map/+page.svelte | 285 +----- 10 files changed, 153 insertions(+), 2549 deletions(-) delete mode 100644 apps/citycorners/apps/landing/src/components/Filter.astro delete mode 100644 apps/citycorners/apps/landing/src/components/LocationCard.astro delete mode 100644 apps/citycorners/apps/landing/src/data/locations.json delete mode 100644 apps/citycorners/apps/landing/src/pages/locations/[id].astro diff --git a/apps/citycorners/apps/landing/src/components/Filter.astro b/apps/citycorners/apps/landing/src/components/Filter.astro deleted file mode 100644 index f0af4e6b8..000000000 --- a/apps/citycorners/apps/landing/src/components/Filter.astro +++ /dev/null @@ -1,73 +0,0 @@ ---- -const categories = [ - { value: '', label: 'Alle' }, - { value: 'sehenswürdigkeit', label: 'Sehenswürdigkeiten' }, - { value: 'restaurant', label: 'Restaurants' }, - { value: 'laden', label: 'Läden' }, - { value: 'museum', label: 'Museen' }, - { value: 'café', label: 'Cafés' }, - { value: 'bar', label: 'Bars' }, - { value: 'park', label: 'Parks' }, - { value: 'strandbad', label: 'Strandbäder' }, - { value: 'hotel', label: 'Hotels' }, - { value: 'veranstaltungsort', label: 'Veranstaltungsorte' }, - { value: 'aussichtspunkt', label: 'Aussichtspunkte' }, -]; ---- - -
- { - categories.map((cat) => ( - - )) - } -
- - diff --git a/apps/citycorners/apps/landing/src/components/LocationCard.astro b/apps/citycorners/apps/landing/src/components/LocationCard.astro deleted file mode 100644 index 6aea041a2..000000000 --- a/apps/citycorners/apps/landing/src/components/LocationCard.astro +++ /dev/null @@ -1,48 +0,0 @@ ---- -interface Props { - location: { - id: number | string; - name: string; - category: string; - description: string; - image: string; - }; -} - -const { location } = Astro.props; - -const categoryColors: Record = { - Sehenswürdigkeit: 'bg-blue-100 text-blue-700', - Restaurant: 'bg-red-100 text-red-700', - Laden: 'bg-green-100 text-green-700', - Museum: 'bg-purple-100 text-purple-700', - Café: 'bg-amber-100 text-amber-700', - Bar: 'bg-orange-100 text-orange-700', - Park: 'bg-emerald-100 text-emerald-700', - Strandbad: 'bg-cyan-100 text-cyan-700', - Hotel: 'bg-indigo-100 text-indigo-700', - Veranstaltungsort: 'bg-pink-100 text-pink-700', - Aussichtspunkt: 'bg-sky-100 text-sky-700', -}; ---- - - - {location.name} -
- - {location.category} - -

- {location.name} -

-

- {location.description} -

-
-
diff --git a/apps/citycorners/apps/landing/src/data/locations.json b/apps/citycorners/apps/landing/src/data/locations.json deleted file mode 100644 index 79a439750..000000000 --- a/apps/citycorners/apps/landing/src/data/locations.json +++ /dev/null @@ -1,261 +0,0 @@ -[ - { - "id": 1, - "name": "Konstanzer Münster", - "category": "Sehenswürdigkeit", - "description": "Das Konstanzer Münster ist eine imposante Basilika, die über Jahrhunderte das Zentrum des Bistums Konstanz war. Besucher können den Turm besteigen und einen atemberaubenden Blick über die Stadt und den Bodensee genießen.", - "image": "/images/muenster.jpg", - "address": "Münsterplatz 1, 78462 Konstanz", - "coordinates": { - "lat": 47.663, - "lng": 9.175 - }, - "timeline": [ - { "year": "ca. 600", "description": "Gründung einer ersten Bischofskirche." }, - { "year": "1054-1089", "description": "Neubau der Basilika nach ottonischem Vorbild." }, - { - "year": "1414-1418", - "description": "Das Münster ist Schauplatz des Konzils von Konstanz." - }, - { - "year": "1844-1853", - "description": "Neugotische Umgestaltung des Turms durch Heinrich Hübsch." - } - ] - }, - { - "id": 2, - "name": "Imperia", - "category": "Sehenswürdigkeit", - "description": "Die Imperia ist eine satirische Statue im Hafen von Konstanz, die an das Konzil von Konstanz erinnert. Sie dreht sich langsam um ihre Achse und ist ein beliebtes Fotomotiv.", - "image": "/images/imperia.jpg", - "address": "Hafenstraße, 78462 Konstanz", - "coordinates": { - "lat": 47.66, - "lng": 9.18 - } - }, - { - "id": 3, - "name": "Restaurant Ophelia", - "category": "Restaurant", - "description": "Das mit zwei Michelin-Sternen ausgezeichnete Restaurant Ophelia bietet eine exquisite Küche in einem eleganten Ambiente. Es befindet sich im Hotel Riva am Ufer des Bodensees.", - "image": "/images/ophelia.jpg", - "address": "Seestraße 25, 78464 Konstanz", - "coordinates": { - "lat": 47.67, - "lng": 9.19 - } - }, - { - "id": 4, - "name": "LAGO Shopping-Center", - "category": "Laden", - "description": "Das LAGO ist das größte Einkaufszentrum am Bodensee und bietet eine Vielzahl von Geschäften, Restaurants und Cafés. Es ist ein beliebter Treffpunkt für Einheimische und Touristen.", - "image": "/images/lago.jpg", - "address": "Bodanstraße 1, 78462 Konstanz", - "coordinates": { - "lat": 47.658, - "lng": 9.176 - } - }, - { - "id": 5, - "name": "Rosgartenmuseum", - "category": "Museum", - "description": "Das Rosgartenmuseum ist das städtische Museum für Kunst, Kultur und Geschichte von Konstanz und der Bodenseeregion. Es wurde 1870 gegründet und befindet sich in einem ehemaligen Zunfthaus.", - "image": "/images/rosgartenmuseum.jpg", - "address": "Rosgartenstraße 3-5, 78462 Konstanz", - "coordinates": { - "lat": 47.661, - "lng": 9.174 - }, - "timeline": [ - { "year": "1454", "description": "Das Gebäude wird als Zunfthaus der Metzger errichtet." }, - { - "year": "1870", - "description": "Gründung des Museums durch den Apotheker und Stadtrat Ludwig Leiner." - } - ] - }, - { - "id": 6, - "name": "Archäologisches Landesmuseum Baden-Württemberg", - "category": "Museum", - "description": "Das Archäologische Landesmuseum (ALM) in Konstanz ist ein Zweigmuseum des ALM in Stuttgart und zeigt Funde aus der Archäologie, Geschichte und Kultur der Region.", - "image": "/images/alm.jpg", - "address": "Benediktinerplatz 5, 78467 Konstanz", - "coordinates": { - "lat": 47.665, - "lng": 9.171 - } - }, - { - "id": 7, - "name": "Café Zeitlos", - "category": "Café", - "description": "Gemütliches Café in der Konstanzer Altstadt mit hausgemachten Kuchen, Frühstück und einer großen Auswahl an Kaffeespezialitäten.", - "image": "/images/placeholder.jpg", - "address": "Hussenstraße 13, 78462 Konstanz", - "coordinates": { - "lat": 47.6609, - "lng": 9.1749 - } - }, - { - "id": 8, - "name": "Voglhaus Café", - "category": "Café", - "description": "Beliebtes Bio-Café mit vegetarischer und veganer Küche. Kreative Frühstücksgerichte und selbstgemachte Limonaden.", - "image": "/images/placeholder.jpg", - "address": "Wessenbergstraße 8, 78462 Konstanz", - "coordinates": { - "lat": 47.6619, - "lng": 9.1744 - } - }, - { - "id": 9, - "name": "Seekuh", - "category": "Bar", - "description": "Legendäre Konstanzer Bar und Kulturkneipe am Seerhein. Craft Beer, Cocktails und regelmäßig Konzerte auf kleiner Bühne.", - "image": "/images/placeholder.jpg", - "address": "Konradigasse 1, 78462 Konstanz", - "coordinates": { - "lat": 47.6632, - "lng": 9.1773 - } - }, - { - "id": 10, - "name": "Brauhaus Johann Albrecht", - "category": "Bar", - "description": "Brauhaus-Restaurant mit hauseigenem Bier direkt am Seerhein. Deftige Küche und frisch gebrautes Bier in historischem Ambiente.", - "image": "/images/placeholder.jpg", - "address": "Konradigasse 2, 78462 Konstanz", - "coordinates": { - "lat": 47.663, - "lng": 9.177 - } - }, - { - "id": 11, - "name": "Stadtgarten Konstanz", - "category": "Park", - "description": "Großer Park direkt am Bodenseeufer mit altem Baumbestand, Spielplätzen, Minigolf und Biergarten. Der beliebteste Erholungsort der Stadt.", - "image": "/images/placeholder.jpg", - "address": "Seestraße, 78464 Konstanz", - "coordinates": { - "lat": 47.6582, - "lng": 9.1812 - } - }, - { - "id": 12, - "name": "Lorettowald", - "category": "Park", - "description": "Bewaldeter Hügel im Süden von Konstanz mit Wanderwegen und Aussichtspunkten über den Bodensee. Beliebt bei Joggern und Spaziergängern.", - "image": "/images/placeholder.jpg", - "address": "Lorettostraße, 78464 Konstanz", - "coordinates": { - "lat": 47.6524, - "lng": 9.1768 - } - }, - { - "id": 13, - "name": "Strandbad Horn", - "category": "Strandbad", - "description": "Eines der größten Freibäder am Bodensee mit großer Liegewiese, Sandstrand, Sprungturm und Beachvolleyball. Traumhafter Seeblick.", - "image": "/images/placeholder.jpg", - "address": "Eichhornstraße 100, 78464 Konstanz", - "coordinates": { - "lat": 47.6527, - "lng": 9.201 - } - }, - { - "id": 14, - "name": "Schmugglerbucht", - "category": "Strandbad", - "description": "Kleine, versteckte Badestelle unterhalb der Seestraße. Bei Einheimischen beliebt als Geheimtipp zum Schwimmen im Bodensee.", - "image": "/images/placeholder.jpg", - "address": "Seestraße, 78464 Konstanz", - "coordinates": { - "lat": 47.6561, - "lng": 9.186 - } - }, - { - "id": 15, - "name": "Steigenberger Inselhotel", - "category": "Hotel", - "description": "Luxushotel in einem ehemaligen Dominikanerkloster auf einer Insel im Bodensee. Eines der historischsten Hotels Deutschlands.", - "image": "/images/placeholder.jpg", - "address": "Auf der Insel 1, 78462 Konstanz", - "coordinates": { - "lat": 47.6598, - "lng": 9.181 - } - }, - { - "id": 16, - "name": "Hotel Barbarossa", - "category": "Hotel", - "description": "Historisches Boutique-Hotel am Obermarkt mitten in der Altstadt. Individuell gestaltete Zimmer in einem Gebäude aus dem 15. Jahrhundert.", - "image": "/images/placeholder.jpg", - "address": "Obermarkt 8-12, 78462 Konstanz", - "coordinates": { - "lat": 47.6621, - "lng": 9.1746 - } - }, - { - "id": 17, - "name": "Konzil Konstanz", - "category": "Veranstaltungsort", - "description": "Historisches Konzilgebäude am Hafen, in dem 1417 das Konklave zur Papstwahl stattfand. Heute Veranstaltungshalle und Restaurant.", - "image": "/images/placeholder.jpg", - "address": "Hafenstraße 2, 78462 Konstanz", - "coordinates": { - "lat": 47.6596, - "lng": 9.178 - } - }, - { - "id": 18, - "name": "Stadttheater Konstanz", - "category": "Veranstaltungsort", - "description": "Das Theater Konstanz ist eines der ältesten aktiven Theater Deutschlands. Schauspiel, Musiktheater und Junges Theater auf mehreren Bühnen.", - "image": "/images/placeholder.jpg", - "address": "Konzilstraße 11, 78462 Konstanz", - "coordinates": { - "lat": 47.6593, - "lng": 9.177 - } - }, - { - "id": 19, - "name": "Münsterturm-Aussichtsplattform", - "category": "Aussichtspunkt", - "description": "Nach 193 Stufen erreicht man die Aussichtsplattform des Münsterturms mit 360°-Panorama über Konstanz, den Bodensee und bei klarer Sicht bis zu den Alpen.", - "image": "/images/placeholder.jpg", - "address": "Münsterplatz 1, 78462 Konstanz", - "coordinates": { - "lat": 47.6603, - "lng": 9.1757 - } - }, - { - "id": 20, - "name": "Hörnle-Spitze", - "category": "Aussichtspunkt", - "description": "Äußerste Spitze der Halbinsel Horn mit unverbautem 180°-Panorama über den Bodensee. Besonders beeindruckend bei Sonnenuntergang.", - "image": "/images/placeholder.jpg", - "address": "Hörnleweg, 78464 Konstanz", - "coordinates": { - "lat": 47.648, - "lng": 9.2085 - } - } -] diff --git a/apps/citycorners/apps/landing/src/layouts/Layout.astro b/apps/citycorners/apps/landing/src/layouts/Layout.astro index 37e1977c5..1748d91a9 100644 --- a/apps/citycorners/apps/landing/src/layouts/Layout.astro +++ b/apps/citycorners/apps/landing/src/layouts/Layout.astro @@ -3,7 +3,7 @@ interface Props { title?: string; } -const { title = 'CityCorners – Entdecke Konstanz' } = Astro.props; +const { title = 'CityCorners – Entdecke Städte weltweit' } = Astro.props; --- @@ -14,7 +14,7 @@ const { title = 'CityCorners – Entdecke Konstanz' } = Astro.props; {title} diff --git a/apps/citycorners/apps/landing/src/pages/index.astro b/apps/citycorners/apps/landing/src/pages/index.astro index 0ef57b25b..5da5737b3 100644 --- a/apps/citycorners/apps/landing/src/pages/index.astro +++ b/apps/citycorners/apps/landing/src/pages/index.astro @@ -1,69 +1,156 @@ --- import Layout from '../layouts/Layout.astro'; -import LocationCard from '../components/LocationCard.astro'; -import Filter from '../components/Filter.astro'; -import fallbackLocations from '../data/locations.json'; -const BACKEND_URL = import.meta.env.BACKEND_URL || 'http://localhost:3025'; +const APP_URL = 'https://citycorners.mana.how'; -let locations = fallbackLocations; - -try { - const res = await fetch(`${BACKEND_URL}/api/v1/locations?limit=100`); - if (res.ok) { - const data = await res.json(); - // Map API response to the shape expected by LocationCard - const categoryMap: Record = { - sight: 'Sehenswürdigkeit', - restaurant: 'Restaurant', - shop: 'Laden', - museum: 'Museum', - }; - locations = data.locations.map((loc: any, index: number) => ({ - id: loc.slug || loc.id, - name: loc.name, - category: categoryMap[loc.category] || loc.category, - description: loc.description, - image: loc.imageUrl || '/images/placeholder.jpg', - address: loc.address, - coordinates: - loc.latitude && loc.longitude ? { lat: loc.latitude, lng: loc.longitude } : undefined, - timeline: loc.timeline?.map((t: any) => ({ year: t.year, description: t.event })), - })); - } -} catch (e) { - // Fallback to hardcoded JSON if API is unreachable - console.warn('Could not fetch from API, using fallback data:', e); -} +const exampleCities = [ + { + name: 'Konstanz', + country: 'Deutschland', + description: 'Universitätsstadt am Bodensee mit mittelalterlicher Altstadt', + slug: 'konstanz', + }, + { + name: 'Zürich', + country: 'Schweiz', + description: 'Größte Stadt der Schweiz am Zürichsee', + slug: 'zuerich', + }, + { + name: 'Berlin', + country: 'Deutschland', + description: 'Hauptstadt mit vielfältiger Kultur und Geschichte', + slug: 'berlin', + }, +]; --- -
-
-

CityCorners

-

Entdecke Konstanz am Bodensee

-

Sehenswürdigkeiten · Restaurants · Museen · Läden

+
+
+

CityCorners

+

Entdecke Städte weltweit

+

+ Von der Community für die Community — teile deine Lieblingsorte +

+
- -
-
- + +
+

So funktioniert's

+
+
+
+ 🏙️ +
+

Stadt anlegen

+

+ Lege deine Stadt, dein Dorf oder deinen Lieblingsort an — egal wo auf der Welt. +

+
+
+
+ 📍 +
+

Orte hinzufügen

+

+ Teile Restaurants, Sehenswürdigkeiten, Cafés, Parks und mehr mit der Community. +

+
+
+
+ 🗺️ +
+

Entdecken

+

+ Erkunde Städte auf der Karte, filtere nach Kategorien und speichere Favoriten. +

+
+
-
- {locations.map((location) => )} + +
+
+

Beispielstädte

+
+ { + exampleCities.map((city) => ( + +

+ {city.name} +

+

{city.country}

+

{city.description}

+
+ )) + } +
-
+ + + +
+

Features

+
+
+

Offline verfügbar

+

+ Funktioniert auch ohne Internet — Daten werden lokal gespeichert und automatisch + synchronisiert. +

+
+
+

11 Kategorien

+

+ Restaurants, Cafés, Museen, Parks, Hotels, Bars, Sehenswürdigkeiten und mehr. +

+
+
+

Interaktive Karte

+

+ Farbcodierte Marker auf OpenStreetMap mit Standortbestimmung. +

+
+
+

Mehrsprachig

+

Deutsch und Englisch mit einfachem Sprachwechsel.

+
+
+
-

CityCorners – Ein Stadtführer für Konstanz

+

CityCorners – Die offene Plattform für Stadtführer

- Teil des Mana Ökosystems + Teil des Mana{' '} + Ökosystems

diff --git a/apps/citycorners/apps/landing/src/pages/locations/[id].astro b/apps/citycorners/apps/landing/src/pages/locations/[id].astro deleted file mode 100644 index afff698c2..000000000 --- a/apps/citycorners/apps/landing/src/pages/locations/[id].astro +++ /dev/null @@ -1,190 +0,0 @@ ---- -import Layout from '../../layouts/Layout.astro'; -import fallbackLocations from '../../data/locations.json'; - -const BACKEND_URL = import.meta.env.BACKEND_URL || 'http://localhost:3025'; - -const categoryMap: Record = { - sight: 'Sehenswürdigkeit', - restaurant: 'Restaurant', - shop: 'Laden', - museum: 'Museum', -}; - -const categoryColors: Record = { - Sehenswürdigkeit: 'bg-blue-100 text-blue-700', - Restaurant: 'bg-red-100 text-red-700', - Laden: 'bg-green-100 text-green-700', - Museum: 'bg-purple-100 text-purple-700', -}; - -function mapApiLocation(loc: any) { - return { - id: loc.slug || loc.id, - name: loc.name, - category: categoryMap[loc.category] || loc.category, - description: loc.description, - image: loc.imageUrl || '/images/placeholder.jpg', - address: loc.address, - coordinates: - loc.latitude && loc.longitude ? { lat: loc.latitude, lng: loc.longitude } : undefined, - timeline: loc.timeline?.map((t: any) => ({ year: t.year, description: t.event })), - }; -} - -let allLocations: any[] = []; - -try { - const res = await fetch(`${BACKEND_URL}/api/v1/locations?limit=100`); - if (res.ok) { - const data = await res.json(); - allLocations = data.locations.map(mapApiLocation); - } else { - allLocations = fallbackLocations; - } -} catch (e) { - console.warn('Could not fetch from API, using fallback data:', e); - allLocations = fallbackLocations; -} - -export async function getStaticPaths() { - let locations: any[] = []; - - try { - const backendUrl = import.meta.env.BACKEND_URL || 'http://localhost:3025'; - const res = await fetch(`${backendUrl}/api/v1/locations?limit=100`); - if (res.ok) { - const data = await res.json(); - locations = data.locations.map((loc: any) => ({ - id: loc.slug || loc.id, - })); - } - } catch (e) { - // Fallback - } - - if (locations.length === 0) { - const fallback = await import('../../data/locations.json'); - locations = fallback.default.map((loc) => ({ id: loc.id.toString() })); - } - - return locations.map((loc) => ({ - params: { id: loc.id.toString() }, - })); -} - -const { id } = Astro.params; -const location = allLocations.find((loc) => loc.id.toString() === id); - -if (!location) { - return Astro.redirect('/'); -} ---- - - -
- - - - - Zurück zur Übersicht - - - {location.name} - - - {location.category} - - -

{location.name}

- - { - location.address && ( -

- - - - - {location.address} -

- ) - } - -

{location.description}

- - { - location.timeline && location.timeline.length > 0 && ( -
-

Geschichte

-
- {location.timeline.map((event: { year: string; description: string }, i: number) => ( -
- {i < location.timeline!.length - 1 && ( -
- )} -
-
-
-
- {event.year} -

{event.description}

-
-
- ))} -
-
- ) - } - - { - location.coordinates && ( - - ) - } -
-
diff --git a/apps/citycorners/apps/web/src/routes/(app)/add/+page.svelte b/apps/citycorners/apps/web/src/routes/(app)/add/+page.svelte index 140c5bca4..6da139b09 100644 --- a/apps/citycorners/apps/web/src/routes/(app)/add/+page.svelte +++ b/apps/citycorners/apps/web/src/routes/(app)/add/+page.svelte @@ -1,425 +1,9 @@ - - - {$_('add.title')} - CityCorners - - -
-

{$_('add.title')}

-

{$_('add.subtitle')}

-
- -{#if !authStore.isAuthenticated} -
- 📍 -

{$_('add.loginRequired')}

- - {$_('settings.login')} - -
-{:else if !lookupDone} - -
-
-

{$_('add.searchTitle')}

-

{$_('add.searchSubtitle')}

- -
- e.key === 'Enter' && handleLookup()} - /> - -
-
- - -
-{:else} - - {#if sources.length > 0} -
-

{$_('add.foundSources')}

-
- {#each sources.slice(0, 3) as source} - - {source.title} - - {/each} -
-
- {/if} - -
{ - e.preventDefault(); - handleSubmit(); - }} - class="space-y-5" - > - {#if error} -
{error}
- {/if} - -
- - -
- -
- -
- {#each categories as cat} - - {/each} -
-
- -
- - -

{$_('add.minChars')}

-
- -
- - - {#if geocoding} -

{$_('add.geocoding')}

- {:else if latitude !== undefined && longitude !== undefined} -

{$_('add.coordinatesFound')}

- {/if} -
- - -
- - (imageError = false)} - placeholder={$_('add.imageUrlPlaceholder')} - class="w-full rounded-lg border border-border bg-background px-4 py-2.5 text-foreground placeholder:text-foreground-secondary/50 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary" - /> - {#if imageUrl.trim() && !imageError} -
- {$_('add.imagePreview')} (imageError = true)} - /> -
- {:else if imageError} -
-

{$_('add.imageLoadError')}

- -
- {/if} -
- - -
- - -
- - -
- - -
- -
- - -
-
-{/if} diff --git a/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/+page.svelte b/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/+page.svelte index 144921819..7f9f0b3d1 100644 --- a/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/+page.svelte +++ b/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/+page.svelte @@ -1,958 +1,10 @@ - - - {location?.name || 'Location'} - CityCorners - - - -{#if loading} -
-
-
-{:else if !location} -
- 🔍 -

{$_('detail.notFound')}

- {$_('detail.back')} -
-{:else} - {@const images = allImages()} - - -
- {#if images.length > 0} - {location.name} - {:else} -
- 📍 -
- {/if} - - - - - -
- - - {#if authStore.isAuthenticated} - - {/if} -
- - - {#if images.length > 1} -
- {selectedImageIndex + 1} / {images.length} -
- {/if} - - -
- - {$_(`category.${location.category}`)} - - {#if isOpenNow(location.openingHours) === true} - - {$_('detail.openNow')} - - {:else if isOpenNow(location.openingHours) === false} - - {$_('detail.closedNow')} - - {/if} -
-
- - - {#if images.length > 1} -
- {#each images as img, i} - - {/each} - {#if authStore.isAuthenticated} - - {/if} -
- {:else if authStore.isAuthenticated} -
- -
- {/if} - - - {#if showAddPhoto} -
-

{$_('gallery.addPhoto')}

- {#if photoError} -
{photoError}
- {/if} -
- e.key === 'Enter' && handleAddPhoto()} - /> - -
-
- {/if} - - -
-
-

{location.name}

- {#if location.address} -

- - - - - {location.address} -

- {/if} -
- -

{location.description}

- - - {#if location.website || location.phone} -
- {#if location.website} - - {/if} - {#if location.phone} -
- {$_('detail.phone')}: - - {location.phone} - -
- {/if} -
- {/if} - - - {#if location.openingHours && Object.keys(location.openingHours).length > 0} -
-

{$_('detail.openingHours')}

-
- - - {#each ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'] as day} - {#if location.openingHours[day]} - - - - - {/if} - {/each} - -
{$_(`days.${day}`)} - {location.openingHours[day] === 'closed' - ? $_('detail.closed') - : location.openingHours[day]} -
-
-
- {/if} - - -
-
-
-

{$_('reviews.title')}

- {#if location.reviewStats && location.reviewStats.totalReviews > 0} -
-
- {#each Array(5) as _, i} - - - - {/each} -
- - {location.reviewStats.averageRating.toFixed(1)} - - - ({location.reviewStats.totalReviews}) - -
- {/if} -
- {#if authStore.isAuthenticated && !userHasReviewed} - - {/if} -
- - - {#if showReviewForm} -
-

{$_('reviews.yourRating')}

- {#if reviewError} -
- {reviewError} -
- {/if} -
- {#each [1, 2, 3, 4, 5] as star} - - {/each} -
- - -
- {/if} - - - {#if reviews.length > 0} -
- {#each reviews as review} -
-
-
- {#each Array(5) as _, i} - - - - {/each} -
-
- - {new Date(review.createdAt).toLocaleDateString()} - - {#if authStore.isAuthenticated && review.userId === authStore.user?.id} - - {/if} -
-
- {#if review.comment} -

{review.comment}

- {/if} -
- {/each} -
- {:else if !showReviewForm} -

{$_('reviews.noReviews')}

- {/if} -
- - - {#if isOwner} -
- - - - - {$_('detail.edit')} - - -
- {/if} - - - {#if showDeleteConfirm} -
-

{$_('detail.deleteConfirm')}

-
- - -
-
- {/if} - - - {#if location.latitude && location.longitude} - - {/if} - - - {#if location.timeline && location.timeline.length > 0} -
-

{$_('detail.history')}

-
- {#each location.timeline as entry, i} -
- {#if i < location.timeline!.length - 1} -
- {/if} -
-
-
-
- {entry.year} -

{entry.event}

-
-
- {/each} -
-
- {/if} - - - {#if nearbyLocations.length > 0} - - {/if} -
-{/if} - - diff --git a/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/edit/+page.svelte b/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/edit/+page.svelte index 15b016988..1cd29eca8 100644 --- a/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/edit/+page.svelte +++ b/apps/citycorners/apps/web/src/routes/(app)/locations/[id]/edit/+page.svelte @@ -1,278 +1,8 @@ - - - {$_('edit.title')} - CityCorners - - -
-

{$_('edit.title')}

-

{$_('edit.subtitle')}

-
- -{#if loading} -
-
-
-{:else if forbidden} -
- 🔒 -

{$_('edit.forbidden')}

- - {$_('detail.back')} - -
-{:else} -
{ - e.preventDefault(); - handleSubmit(); - }} - class="space-y-5" - > - {#if error} -
{error}
- {/if} - -
- - -
- -
- -
- {#each categories as cat} - - {/each} -
-
- -
- - -

{$_('add.minChars')}

-
- -
- - -
- -
- - (imageError = false)} - placeholder={$_('add.imageUrlPlaceholder')} - class="w-full rounded-lg border border-border bg-background px-4 py-2.5 text-foreground placeholder:text-foreground-secondary/50 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary" - /> - {#if imageUrl.trim() && !imageError} -
- {$_('add.imagePreview')} (imageError = true)} - /> -
- {:else if imageError} -
-

{$_('add.imageLoadError')}

- -
- {/if} -
- - -
- - -
- - -
- - -
- -
- - {$_('edit.cancel')} - - -
-
-{/if} diff --git a/apps/citycorners/apps/web/src/routes/(app)/map/+page.svelte b/apps/citycorners/apps/web/src/routes/(app)/map/+page.svelte index 6a7a2f5c1..6da139b09 100644 --- a/apps/citycorners/apps/web/src/routes/(app)/map/+page.svelte +++ b/apps/citycorners/apps/web/src/routes/(app)/map/+page.svelte @@ -1,286 +1,9 @@ - - - {$_('map.title')} - CityCorners - - - - - -
-
-
-

{$_('map.title')}

-

{$_('map.subtitle')}

-
- -
- - {#if locationError} -
{locationError}
- {/if} - -
- - {#each categoryKeys as cat} - - {/each} -
- -
-
- -