diff --git a/client/src/components/Journey/JourneyMap.tsx b/client/src/components/Journey/JourneyMap.tsx index 2dd1c711..f11dd8ea 100644 --- a/client/src/components/Journey/JourneyMap.tsx +++ b/client/src/components/Journey/JourneyMap.tsx @@ -9,6 +9,8 @@ export interface MapMarkerItem { label: string mood?: string | null time: string + dayColor: string + dayLabel: number } export interface JourneyMapHandle { @@ -24,6 +26,8 @@ interface MapEntry { title?: string | null mood?: string | null entry_date: string + dayColor?: string + dayLabel?: number } interface Props { @@ -49,6 +53,8 @@ function buildMarkerItems(entries: MapEntry[]): MapMarkerItem[] { label: e.title || 'Entry', mood: e.mood, time: e.entry_date, + dayColor: e.dayColor || '#52525B', + dayLabel: e.dayLabel ?? 1, }) } } @@ -59,30 +65,19 @@ function buildMarkerItems(entries: MapEntry[]): MapMarkerItem[] { const MARKER_W = 28 const MARKER_H = 36 -function markerSvg(index: number, highlighted: boolean, dark: boolean): string { - // Highlighted: inverted colors for contrast (black on light, white on dark) - const fill = dark - ? (highlighted ? '#FAFAFA' : '#A1A1AA') - : (highlighted ? '#18181B' : '#52525B') - const textColor = dark - ? (highlighted ? '#18181B' : '#18181B') - : (highlighted ? '#fff' : '#fff') - const stroke = highlighted - ? (dark ? '#fff' : '#18181B') - : (dark ? '#3F3F46' : '#fff') +function markerSvg(dayColor: string, dayLabel: number, highlighted: boolean): string { + const stroke = highlighted ? '#fff' : 'rgba(255,255,255,0.5)' const shadow = highlighted - ? (dark - ? 'filter:drop-shadow(0 0 10px rgba(255,255,255,0.35)) drop-shadow(0 2px 6px rgba(0,0,0,0.4))' - : 'filter:drop-shadow(0 0 10px rgba(0,0,0,0.3)) drop-shadow(0 2px 6px rgba(0,0,0,0.3))') + ? 'filter:drop-shadow(0 0 10px rgba(0,0,0,0.4)) drop-shadow(0 2px 6px rgba(0,0,0,0.4))' : 'filter:drop-shadow(0 2px 4px rgba(0,0,0,0.25))' - const label = String(index + 1) + const label = String(dayLabel) const scale = highlighted ? 1.2 : 1 return `