/** * rCal demo page — server-rendered HTML body. * * Static July 2026 calendar grid with Alpine Explorer trip events, * tab switching (Temporal/Spatial/Lunar/Context), zoom panel, * and feature cards. Entirely local state, no WebSocket. */ /* ─── Event Data ──────────────────────────────────────────── */ interface CalEvent { day: number; emoji: string; label: string; color: string; bg: string; } const TRIP_EVENTS: CalEvent[] = [ { day: 6, emoji: "\u2708\uFE0F", label: "Arrive Chamonix", color: "#2dd4bf", bg: "rgba(20,184,166,0.15)" }, { day: 7, emoji: "\u{1F97E}", label: "Lac Blanc Hike", color: "#34d399", bg: "rgba(16,185,129,0.15)" }, { day: 8, emoji: "\u{1F9D7}", label: "Aiguille du Midi", color: "#fbbf24", bg: "rgba(245,158,11,0.15)" }, { day: 9, emoji: "\u{1F97E}", label: "Mer de Glace", color: "#34d399", bg: "rgba(16,185,129,0.15)" }, { day: 10, emoji: "\u{1F682}", label: "Train to Zermatt", color: "#22d3ee", bg: "rgba(6,182,212,0.15)" }, { day: 11, emoji: "\u{1F97E}", label: "Five Lakes Walk", color: "#34d399", bg: "rgba(16,185,129,0.15)" }, { day: 12, emoji: "\u26F7", label: "Glacier Paradise", color: "#fbbf24", bg: "rgba(245,158,11,0.15)" }, { day: 13, emoji: "\u{1F3DB}", label: "Alpine Museum", color: "#a78bfa", bg: "rgba(139,92,246,0.15)" }, { day: 14, emoji: "\u{1F68C}", label: "Bus to Dolomites", color: "#22d3ee", bg: "rgba(6,182,212,0.15)" }, { day: 15, emoji: "\u{1F97E}", label: "Tre Cime Circuit", color: "#34d399", bg: "rgba(16,185,129,0.15)" }, { day: 16, emoji: "\u{1FA82}", label: "Paragliding", color: "#fbbf24", bg: "rgba(245,158,11,0.15)" }, { day: 17, emoji: "\u{1F6F6}", label: "Lago di Braies", color: "#fbbf24", bg: "rgba(245,158,11,0.15)" }, { day: 18, emoji: "\u{1F97E}", label: "Seceda Ridge", color: "#34d399", bg: "rgba(16,185,129,0.15)" }, { day: 19, emoji: "\u{1F4F8}", label: "Rest & Photos", color: "#94a3b8", bg: "rgba(100,116,139,0.15)" }, { day: 20, emoji: "\u2708\uFE0F", label: "Depart", color: "#2dd4bf", bg: "rgba(20,184,166,0.15)" }, ]; const TABS = ["Temporal", "Spatial", "Lunar", "Context"]; const ZOOM_LEVELS = [ "Era", "Century", "Decade", "Year", "Quarter", "Month", "Week", "Day", "Hour", "Minute", ]; const FEATURES = [ { icon: "\u{1F50D}", title: "Temporal Zoom", desc: "Navigate seamlessly from geological eras down to individual minutes. The calendar adapts its grid density and label fidelity at every level.", }, { icon: "\u{1F30D}", title: "Spatial Context", desc: "Events are location-aware. Zoom the map and the calendar filters to show only events within the visible region.", }, { icon: "\u{1F319}", title: "Lunar Cycles", desc: "Overlay moon phases, tidal patterns, and seasonal markers. Useful for agriculture, ceremony, and natural rhythm tracking.", }, { icon: "\u{1F4C5}", title: "Multi-Calendar", desc: "Layer Gregorian, Islamic, Hebrew, Chinese, and custom community calendars. Cross-reference events across time systems.", }, ]; const LEGEND = [ { color: "#2dd4bf", label: "Travel" }, { color: "#34d399", label: "Hike" }, { color: "#fbbf24", label: "Adventure" }, { color: "#22d3ee", label: "Transit" }, { color: "#a78bfa", label: "Culture" }, { color: "#94a3b8", label: "Rest" }, ]; /* ─── Helpers ─────────────────────────────────────────────── */ function eventForDay(day: number): CalEvent | undefined { return TRIP_EVENTS.find((e) => e.day === day); } function isTripDay(day: number): boolean { return day >= 6 && day <= 20; } /* ─── Render ──────────────────────────────────────────────── */ export function renderDemo(): string { // July 2026: starts on Wednesday (offset 2 for Mon-based grid), 31 days const firstDayOffset = 2; // Mon=0, Tue=1, Wed=2 const totalDays = 31; const dayNames = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; // Build calendar cells const calendarCells: string[] = []; // Empty offset cells for (let i = 0; i < firstDayOffset; i++) { calendarCells.push(`
`); } // Day cells for (let d = 1; d <= totalDays; d++) { const ev = eventForDay(d); const trip = isTripDay(d); const todayClass = d === 15 ? " rcal-cell--today" : ""; const tripClass = trip ? " rcal-cell--trip" : ""; let pill = ""; if (ev) { pill = `Multi-dimensional calendar with temporal zoom
Navigate across temporal granularities. The calendar grid adapts at each zoom level.
${f.desc}
rCal layers temporal zoom, spatial context, and lunar cycles into a single calendar. Plan events that respect natural rhythms and local conditions.
Create Your Space