A fully responsive, lightweight 12-hour digital clock with smart event countdown system, optimized for low-end hardware and fullscreen displays.
- 12-hour digital format with hours, minutes, and seconds (no AM/PM indicator)
- Minimal, modern design with extra-bold typography
- Dynamic font sizing that scales to fill the entire screen
- Current date display beneath the clock
- Fully responsive - works seamlessly on landscape and portrait orientations
- Zero scrolling - all content always fits within the viewport
- CSV-based event management - manually curate events to avoid unwanted calendar entries
- Real-time data fetching - no caching, always loads fresh event data
- Multiple events per day support - display all events happening on the same day
- Smart layout adjustment - clock automatically centers with dynamic spacing when events are present
- 8-day countdown - automatic countdown begins exactly 8 days before ProgressBar events
- Hour-accurate progress - progress bar updates every hour (not just daily)
- Multiple countdowns - display multiple ProgressBar events simultaneously
- Visual feedback with dynamic background colors:
- Default: Black background
- 4+ days before: Subtle dark purple gradient
- 1 day before: Maroon (#830300)
- Event day: Orange (#ed6d19)
- Progress bar display - only shows for ProgressBar-type events; regular events display without countdown
- Single-tap toggle - click or tap anywhere on the screen to enter/exit fullscreen
- Seamless transitions - maintains layout and functionality in both modes
- 1-second update interval instead of 60fps - minimal CPU and battery usage
- Lightweight codebase - pure HTML/CSS/JavaScript with no frameworks
- Efficient rendering - optimized for low-end hardware and embedded displays
- No-JavaScript fallback - displays "Javascript is not supported on this browser" message if JS fails
- Responsive text scaling - font sizes adapt using CSS clamp() for all screen sizes
clockadashi/
├── index.html # Main HTML document
├── styles.css # Responsive styling and layout
├── script.js # Clock logic and event system
├── events.csv # Event data (manually maintained)
└── README.md # This file
- Open
index.htmlin a modern web browser - Ensure
styles.cssandscript.jsare in the same directory - Place
events.csvin the same directory (critical for event loading)
Edit events.csv with your events. CSV format:
Date,Event,Type
2026-03-08,Event Name,ProgressBar
2026-03-15,Another Event,
2026-03-20,Third Event,ProgressBar
Columns:
- Date: Event date in
YYYY-MM-DDformat - Event: Event name/description (displayed on screen)
- Type: Event type classification
ProgressBar- Enables 8-day countdown with progress bar- Leave empty for regular events (displays on event day only)
Example:
Date,Event,Type
2026-03-03,Test Nirjala Ekadashi,ProgressBar
2026-03-05,Solar Eclipse,
2026-03-08,Nar Narayan Dev Jayanti,ProgressBar
2026-04-10,Mandir Event,
2026-04-05,Ekadashi,ProgressBar- Deploy to any web server (Apache, Nginx, etc.)
- No backend required - works as static files
- Works offline after initial load (except event CSV fetching)
- The clock auto-updates every second
- Date appears below the clock
- Font sizes scale automatically to fit your screen
- Today's events appear in the center above the clock
- ProgressBar countdowns display below the clock with:
- Countdown text: "X days until [Event Name] on [Weekday]"
- Hour-accurate progress bar beneath the text
- Multiple events display as separate lines without overlap
- Tap/click anywhere on the screen to toggle fullscreen mode
- Works on both desktop and mobile devices
- Layout adjusts seamlessly
- Edit
events.csvin any text editor - Changes are instantly reflected on reload (no server restart needed)
- CSV is fetched fresh every page load - no browser caching
- Add/remove/modify dates and event names as needed
- Modern browsers supporting ES6 JavaScript
- Chrome/Edge 60+
- Firefox 55+
- Safari 12+
- Mobile browsers (iOS Safari, Chrome Mobile, etc.)
- CPU usage: Minimal (1-second update cycle)
- Memory usage: <5MB
- Network: Single CSV fetch per page load
- Battery: Optimized for mobile devices with low polling rate
- CSS
clamp()function for fluid font scaling - Flexbox layout for automatic centering
- Viewport-relative units (vw, vh) for screen-aware sizing
- Zero horizontal scrolling guaranteed
- Events within 8 days set to "ProgressBar" type trigger countdown mode
- Events on the current day display in the event section
- Events are sorted by proximity (closest first)
- Background colors update based on the nearest upcoming event
Edit styles.css to change fonts:
font-family: 'Roboto', 'Google Sans', 'Inter', sans-serif;Modify background colors in styles.css:
body.progressbar-day { background-color: #ed6d19; }
body.progressbar-1day { background-color: #830300; }
body.progressbar-4days { background: linear-gradient(135deg, #000 0%, #2d0033 100%); }Adjust responsive font scales in styles.css using clamp():
font-size: clamp(min, preferred, max);Add new event type handling in script.js by extending the CSV parsing logic.
- Verify
events.csvis in the same directory asindex.html - Check CSV format is correct (three columns: Date, Event, Type)
- Ensure dates are in
YYYY-MM-DDformat - Open browser developer console (F12) to check for fetch errors
- Verify JavaScript is enabled in browser settings
- Check console for errors
- Ensure all three files (HTML, CSS, JS) are present and accessible
- Verify event
Typecolumn contains exactlyProgressBar(case-insensitive) - Confirm event date is within the next 8 days
- Adjust viewport zoom in browser
- Modify
clamp()values instyles.css - Check for CSS file loading errors in browser console
Free to use and modify for personal or commercial projects.
For issues or feature requests, review the code comments in script.js and styles.css for implementation details.