A beautiful, single-page greeting web app that dynamically adapts its visuals, message, and animations based on the time of day and season β all in pure HTML, CSS, and vanilla JavaScript. No frameworks, no dependencies, no build step.
- Time-aware greetings β Automatically detects whether it's Morning, Forenoon, Afternoon, Evening, or Night and displays a matching greeting and color theme.
- Season-aware themes β Adapts to Summer, Monsoon, Autumn, Winter, or Spring with visual filters and bonus messages.
- Animated particle system β Unique canvas animations for each time and season:
- π Night β Twinkling stars & falling shooting stars
- π Morning β Sun rays & drifting clouds
- βοΈ Forenoon β Floating leaves & clouds
- π€οΈ Afternoon β Sun rays & clouds
- π Evening β Glowing fireflies
- βοΈ Winter β Falling snowflakes (layered on top)
- π§οΈ Monsoon β Falling rain (layered on top)
- Daily motivational messages β 10 unique heartfelt messages per time period, plus season-specific ones. Refresh for a new one.
- Live clock β Displays the current time in the corner, updated every second.
- Glassmorphism UI β Frosted-glass card with smooth fade-in animation.
- Fully responsive β Works on mobile and desktop.
| Morning | Evening | Night |
|---|---|---|
| Purple gradient + sun rays | Warm orange + fireflies | Deep navy + stars |
No installation or setup needed. Just open the file in any browser.
# Clone the repository
git clone https://github.com/your-username/have-a-good-day.git
# Navigate into the folder
cd have-a-good-day
# Open in your browser
open index.htmlOr simply download index.html and double-click it.
have-a-good-day/
βββ index.html # Everything lives here β HTML, CSS, and JS in one file
| Period | Hours | Theme |
|---|---|---|
| Morning | 5 AM β 9 AM | Purple β violet gradient |
| Forenoon | 10 AM β 11 AM | Teal β blue gradient |
| Afternoon | 12 PM β 4 PM | Gold β red gradient |
| Evening | 5 PM β 8 PM | Orange β golden gradient |
| Night | 9 PM β 4 AM | Deep navy gradient |
| Season | Months | Effect |
|---|---|---|
| Summer | Apr β Jun | Vibrant, high saturation |
| Monsoon | Jul β Sep | Rain particles, darker filter |
| Autumn | Oct β Nov | Warm tones |
| Winter | Dec β Feb | Snow particles, muted tones |
| Spring | Mar | Fresh, bright |
- Pure HTML5
- CSS3 β gradients, glassmorphism, keyframe animations
- Vanilla JavaScript β Canvas API for particle animations, Date API for time/season detection
- Google Fonts β Quicksand & Playfair Display
This project is open source and available under the MIT License.
"The sunrise doesn't care about yesterday's clouds. Neither should you. Fresh light, fresh start."