A minimalistic live clock demo built with GitHub Pages. It dynamically displays the current time in hours, minutes, and seconds.(just for fun)
Check it out here: https://sameer4445.github.io/Digital_clock/
When opened, the page renders something like:
The time is now 00 Hours
00 Minutes
00 Seconds
yaml Copy Edit
(It updates in real-time to reflect your current local time.) :contentReference[oaicite:0]{index=0}
- The clock is implemented in plain HTML, CSS, and JavaScript.
- JavaScript periodically fetches the current time (
new Date()), parses hours, minutes, and seconds, then updates the elements on the page. - Likely uses
setInterval()to refresh every second.
- A modern web browser (e.g., Chrome, Firefox, Edge, Safari).
To run the project locally:
- Clone the repository:
git clone https://github.com/sameer4445/git.git
- Navigate into the project directory:
cd git- Open index.html in your browser—or use a local server:
live-server
The clock starts running immediately upon loading the page.
No interaction needed—time updates every second automatically.
Possible Enhancements Consider adding:
AM/PM toggle or 24-hour format switch
Handy date display (day, month, year)
Custom themes or time zones
Mobile-responsive styling
Ability to pause or reset the clock
Contributing Love this simple demo? Feel free to contribute! You can:
Tweak the styles or layout
Add new features like date-time toggles or timezone support
Improve accessibility or responsiveness
Just fork the repo, submit a pull request, and help make it shine brighter!
This project is released under the MIT License.
This project is a clean, straightforward example of a real-time clock using GitHub Pages. Its minimal code and function make it ideal for learning how JavaScript can interact with the DOM to deliver live updates. Let me know if you'd like an extended demo incorporating themes, toggles, or additional features—I’d be happy to help build it out!