A beautifully designed, fully interactive countdown timer for Sri Lankan **GCE Advanced Level (A/L) Examination ** β helping students track every second until exam day.
If this project helped you prepare for your A/L exams, please give it a β on GitHub!
You can also support the developer:
- β¨ Features
- π¨ Themes
- β° Timer Styles
- π Exam Timetable
- π οΈ Tech Stack
- π Project Structure
- π Installation
- π Deployment
- π SEO & Performance
- π§ Configuration & Customization
- π± Responsive Design
- π¨βπ» Developer
- Real-time countdown to A/L Exam date β August 10, 2026, 8:00 AM Sri Lanka time (IST/UTC+5:30)
- Server-synced clock with iOS Safari compatibility (handles
setIntervalthrottling, back-forward cache) - Displays days, hours, minutes, and seconds with smooth animations
- Server time sync via
/api/timeendpoint to prevent client clock drift visibilitychange+pageshowhandlers for tab-switch recovery
Switch between stunning themes β all saved to cookies forever and shared across pages:
| # | Theme | Description |
|---|---|---|
| 1 | π£ Original | Classic purple gradient (default) |
| 2 | β¬ Dark | Sleek GitHub-style dark mode |
| 3 | π Fancy | Animated rainbow gradient |
| 4 | π Hacker | Matrix terminal green-on-black |
| 5 | π Pink | Soft pink & magenta |
| 6 | π Ocean | Deep blue ocean waves |
| 7 | π Sunset | Warm orange & gold |
| 8 | β‘ Neon | Cyberpunk neon magenta & cyan |
| 9 | π² Forest | Natural green gradients |
| 10 | π Royal | Purple & gold regal |
| 11 | π Aurora | Northern lights effect |
| 12 | β¬ Mono | Clean black & white |
| 13 | π¬ Candy | Colorful confetti |
| 14 | π Midnight | Deep blue & indigo night |
| 15 | π₯ Ember | Fire-inspired red & orange |
| 16 | πͺ Universe | Deep purple galaxy |
| 17 | π³οΈ Blackhole | Dark void with cosmic glow |
Customize how the countdown looks β also saved to cookies:
| # | Style | Description |
|---|---|---|
| 1 | π¦ Classic | 3D floating cards with glow |
| 2 | π Flip Clock | Split-card flip clock display |
| 3 | β Circle | Circular progress rings |
| 4 | π» Digital LED | LED panel with colon separators |
| 5 | π«§ Bubble | Floating translucent bubbles |
| 6 | β‘ Neon | Neon outline with pulsing glow |
| 7 | πΊ Segmented | LCD segment display |
| 8 | π§ Cube | 3D perspective cubes |
| 9 | πͺ Glass | Frosted glass morphism |
| 10 | π¨ Gradient | Animated gradient fill |
| 11 | π Hologram 3D | Rainbow holographic sweep with scanlines |
| 12 | π³οΈ Blackhole Timer | Double orbital spinning rings |
| 13 | π Universe Timer | Twinkling starfield background |
| 14 | π» Cyberpunk | Neon grid with glitch effects & clip-path |
| 15 | βοΈ Hextech | Rotating conic gradient border |
Tip: That's 17 Γ 15 = 255 unique combinations!
A dedicated, fully searchable exam schedule page:
- π Complete exam schedule from August 10 β September 5, 2026
- π 7 stream filters: Physical Science, Biological Science, Commerce, Arts, Technology, Languages, Religion
- π Search by subject name in English or Sinhala
- π Sort by Date or Sort by Subject (alphabetical)
- π Bilingual display β English + Sinhala for every subject
- π Collapsible accordion UI with exam count per day
- π¨ Shares the same color theme as the main countdown page (cookie-synced)
Routes:
| Route | Page |
|---|---|
/ |
Main countdown page |
/timetable |
Exam timetable page |
- Pomodoro technique tips (25 min study, 5 min break)
- Active recall & mind mapping methods
- Past paper solving strategies
- Focus & distraction management advice
- Links to Pomodoro Timer app
Theme-aware floating particles β each of the 17 themes has unique particle behavior:
| Theme | Particle Style |
|---|---|
| Original | Soft floating orbs with blur |
| Hacker | π’ Matrix rain |
| Fancy | π Multi-color sparkles |
| Ember | π₯ Fire embers |
| Ocean | π Water bubbles |
| Royal | π Gold sparkles |
| Pink | π Soft floating circles |
| Sunset | π Warm embers |
| Neon | β‘ Neon sparkles |
| Forest | π² Leaf shapes |
| Aurora | π Multicolor glow |
| Mono | β¬ Subtle white dots |
| Candy | π¬ Colorful confetti |
| Midnight | π Soft blue orbs |
| Universe | πͺ Purple stars |
| Blackhole | π³οΈ Purple swirls |
- Hide everything except countdown + motivational quote
- Browser native Fullscreen API support
- Auto-hiding floating UI buttons β fade out after 3 seconds of inactivity, reappear on any user interaction (mouse, touch, scroll, keyboard)
- Smooth
0.5sCSS transition animations
- 35+ rotating motivational quotes
- Animated fade transitions every 10 seconds
- Mix of education-focused and general motivation
| Layer | Technology | Purpose |
|---|---|---|
| Backend | Python 3 / Flask | Server-side routing & templating |
| Templating | Jinja2 | Server-rendered HTML with dynamic values |
| Frontend | HTML5 / CSS3 | Structure & styling |
| Logic | Vanilla JavaScript | Client-side interactivity |
| Styling | CSS Custom Properties | Dynamic theme system |
| Persistence | Cookie API | Theme & timer style persistence (365 days) |
| Fullscreen | Fullscreen API | Immersive countdown mode |
| Minification | flask-minify | Auto-minify HTML, JS, CSS |
| Timezone | pytz | Accurate Sri Lanka timezone (Asia/Colombo) |
| Hosting | Vercel | Serverless deployment |
| Icons | Font Awesome 6 | UI icons |
| Animations | Animate.css | CSS animations library |
| Fonts | Google Fonts | Poppins + Fira Code |
Countdown-AL/
βββ api/
β βββ index.py # Flask routes & server logic
β βββ templates/
β βββ countdown.html # Main countdown page (Jinja2)
β βββ timetable.html # A/L exam timetable page
β βββ style.css # All styles (17 themes, 15 timers, responsive)
β βββ script.js # All JS (theme, timer, countdown, particles, fullscreen)
βββ README.md
βββ requirements.txt # Python dependencies
βββ package.json # Node.js engine config
βββ vercel.json # Vercel deployment config
| Route | Method | Description |
|---|---|---|
/ |
GET | Main countdown page |
/timetable |
GET | Exam timetable page |
/style.css |
GET | Shared stylesheet |
/script.js |
GET | Shared JavaScript |
/api/time |
GET | Server time & countdown JSON (for clock sync) |
- Python 3.7+
- pip
# 1. Clone repository
git clone https://github.com/Ishanoshada/Countdown-AL.git
# 2. Navigate to project
cd Countdown-AL
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run locally
python api/index.pyOpen http://localhost:5000 in your browser.
Flask
flask-minify
pytz
Werkzeug
Jinja2
MarkupSafe
itsdangerous
click
# Install Vercel CLI
npm i -g vercel
# Deploy to production
vercel --prod
# Or deploy preview
vercelThe project includes a vercel.json with:
- Serverless function configuration (30s max duration)
- URL rewrite rules for Flask routing
| Platform | Notes |
|---|---|
| Render | Free tier, auto-deploy from GitHub |
| Railway | One-click deploy, good for Flask |
| Heroku | Classic Flask deployment |
| PythonAnywhere | Free tier available |
| AWS Lambda | Via mangum adapter |
The app is a standard Flask application β deploy to any Python-compatible hosting.
- β Semantic HTML5 structure
- β
Optimized
<title>tags (both pages) - β
Comprehensive
<meta description>with keywords - β
Extensive
<meta keywords>(English + Sinhala) - β
Canonical URLs (
countdown-al.vercel.app) - β
robotsmeta withmax-snippet,max-image-preview - β
theme-colormeta for browser chrome - β Apple Touch Icon support
- β Open Graph meta tags (Facebook, LinkedIn) β title, description, image, locale
- β
Twitter Card meta tags β
summary_large_imagewith creator info - β
og:locale:alternatefor Sinhala (si_LK)
- β WebApplication schema (main page)
- β Event schema β full A/L exam period (Aug 10 β Sep 5)
- β BreadcrumbList schema (both pages)
- β WebPage schema (timetable page)
- β Flask-Minify auto-minifies HTML, JS, CSS
- β External CDN for Font Awesome & Animate.css
- β Google Fonts preconnect
- β Cookie-based state (no server-side sessions)
- β Client-side countdown (no per-second server requests)
- β Graceful error handling with try/catch throughout
- β Google AdSense integration
- β Buy Me a Coffee support link
Edit api/index.py:
TARGET_DATE = COLOMBO_TZ.localize(datetime.strptime('2026-08-10 08:00:00', '%Y-%m-%d %H:%M:%S'))Add to style.css:
[data-theme="your-theme"] {
--bg-gradient-start: #your-color;
--bg-gradient-end: #your-color;
--text-primary: #ffffff;
--accent-color: #your-accent;
/* ... all CSS variables ... */
}Add option in countdown.html and timetable.html theme dropdowns.
Add to style.css:
[data-timer="your-style"] .countdown-item {
/* your styles */
}Add option in countdown.html timer dropdown.
Edit the motivationalQuotes array in script.js.
Edit the DATA array in timetable.html β each entry:
{
date: '2026-08-10',
day: 'Monday',
time: '08:30-11:40',
en: 'Combined Mathematics I',
si: 'ΰ·ΰΆΰΆΊΰ·ΰΆΰ·ΰΆ ΰΆΰΆ«ΰ·ΰΆΰΆΊ I',
streams: ['physicalScience']
}| Breakpoint | Device | Adaptations |
|---|---|---|
| > 768px | Desktop | Full layout, large countdown values |
| β€ 768px | Tablet | Compact cards, smaller fonts, stacked buttons |
| β€ 480px | Mobile | Minimum sizes, reduced padding, touch-optimized |
- All themes, timer styles, and components are fully responsive
- Theme/timer dropdowns scroll with
max-height: 70vh - Fullscreen mode adapts to all screen sizes
- Touch interactions optimized for iOS & Android
| Browser | Status |
|---|---|
| Chrome 90+ | β Fully supported |
| Firefox 88+ | β Fully supported |
| Safari 14+ | β Fully supported (with iOS fixes) |
| Edge 90+ | β Fully supported |
| Mobile Chrome | β Fully supported |
| Mobile Safari | β Fully supported (with iOS timer fixes) |
- Custom ISO 8601 date parser (
parseISODate) for Safari compatibility visibilitychangeevent handler for tab-switch timer recoverypageshowevent handler for back-forward cache supportsetIntervalthrottle detection and forced update on return
Ishan Oshada