tlyool-calendar
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v9View latest version
A stunning, responsive web application that displays calendar events in a beautiful list format with smooth animations and interactions. Built with a static-site approach using modern web technologies.
- π¨ Beautiful Design: Clean, modern interface with smooth animations and transitions
- π± Responsive: Works perfectly on desktop, tablet, and mobile devices
- β‘ Fast Loading: Events are pre-loaded and cached for instant display
- π Auto-Sync: Calendar data is automatically synced 3 times daily
- π Smooth Interactions: Expandable event details with beautiful animations
- π Smart Formatting: Intelligent date/time formatting for all-day and timed events
- π Offline-First: Initial data is embedded for instant loading
-
/calendar-sync.ts- Cron job that fetches and parses ICS calendar data- Runs 3 times daily to keep events up-to-date
- Parses Google Calendar ICS format
- Stores events in blob storage
- Filters out past events
-
/backend/index.ts- Hono-based API server- Serves the main HTML page with embedded event data
- Provides
/api/eventsendpoint for dynamic updates - Handles static file serving
-
/frontend/index.html- Main HTML template- Beautiful responsive design with Tailwind CSS
- Custom animations and transitions
- Loading, empty, and error states
-
/frontend/app.js- Frontend JavaScript application- Event rendering and interaction handling
- Smooth expand/collapse animations
- Smart date/time formatting
- Responsive design adaptations
- Sync Process: Cron job fetches ICS β Parses events β Stores in blob storage
- Page Load: Backend embeds latest events β Frontend renders immediately
- Interactions: JavaScript handles event expansion and animations
- Updates: API endpoint provides fresh data when needed
interface CalendarEvent {
id: string; // Unique event identifier
title: string; // Event title/summary
description: string; // Event description (supports multi-line)
startDate: string; // ISO date string
endDate: string; // ISO date string
location?: string; // Event location (optional)
url?: string; // Event URL (optional)
}
- Framework: Tailwind CSS via CDN
- Fonts: Inter font family for clean typography
- Animations: Custom CSS transitions and keyframes
- Effects: Glass morphism, gradient backgrounds, hover effects
- Responsive: Mobile-first design with breakpoint adaptations
The site automatically syncs with a Google Calendar via ICS feed:
- Format: Standard ICS (iCalendar) format
- Frequency: 3 times daily via cron job
- Parsing: Custom ICS parser handles various date formats
- Filtering: Only shows upcoming events (today onwards)
- Instant Loading: Events embedded in initial HTML
- Smooth Animations: Hardware-accelerated CSS transitions
- Efficient Rendering: Minimal DOM manipulation
- Caching: Events cached in blob storage
- Error Handling: Graceful fallbacks for network issues
- Modern browsers with ES6+ support
- CSS Grid and Flexbox support
- Fetch API support
- CSS custom properties support
The site is automatically deployed on Val Town with:
- HTTP trigger for the main backend
- Cron trigger for calendar synchronization
- Blob storage for event data persistence
To customize the calendar source, update the calendarUrl in /calendar-sync.ts. The site supports any standard ICS calendar feed.