diff --git a/modules/rcal/components/folk-calendar-view.ts b/modules/rcal/components/folk-calendar-view.ts
index 0f8e529..1c33d0a 100644
--- a/modules/rcal/components/folk-calendar-view.ts
+++ b/modules/rcal/components/folk-calendar-view.ts
@@ -261,6 +261,8 @@ class FolkCalendarView extends HTMLElement {
source_name: e.sourceName, source_color: e.sourceColor,
location_name: e.locationName,
location_lat: e.locationLat, location_lng: e.locationLng,
+ latitude: e.locationLat ?? null,
+ longitude: e.locationLng ?? null,
}));
// Only use doc events if REST hasn't loaded yet
if (this.events.length === 0 && docEvents.length > 0) {
@@ -692,7 +694,14 @@ class FolkCalendarView extends HTMLElement {
fetch(`${base}/api/lunar?start=${start}&end=${end}`),
fetch(`${schedBase}/api/reminders?upcoming=true`).catch(() => null),
]);
- if (eventsRes.ok) { const data = await eventsRes.json(); this.events = data.results || []; }
+ if (eventsRes.ok) {
+ const data = await eventsRes.json();
+ this.events = (data.results || []).map((e: any) => ({
+ ...e,
+ latitude: e.latitude ?? e.location_lat ?? null,
+ longitude: e.longitude ?? e.location_lng ?? null,
+ }));
+ }
if (sourcesRes.ok) { const data = await sourcesRes.json(); this.sources = data.results || []; }
if (lunarRes.ok) { this.lunarData = await lunarRes.json(); }
if (remindersRes?.ok) { const data = await remindersRes.json(); this.reminders = data.reminders || []; }
diff --git a/modules/rcal/mod.ts b/modules/rcal/mod.ts
index 2e5a22c..490a2ab 100644
--- a/modules/rcal/mod.ts
+++ b/modules/rcal/mod.ts
@@ -985,7 +985,7 @@ routes.get("/", (c) => {
modules: getModuleInfoList(),
theme: "dark",
body: ``,
- scripts: ``,
+ scripts: ``,
styles: `
`,
}));