GymHub Tracker is a web-based application designed to help you track your workouts over time. This project provides a visual representation of workout contributions with a heatmap, allowing you to easily see your workout patterns and streaks.
- Add Workout: Record a workout for the selected date, updating your contribution graph and streak count.
- Workout Streaks: Track how many consecutive days you've worked out.
- Visual Contribution Graph: See a color-coded heatmap showing workout frequency by day.
- Local Storage: All contributions are saved to your browser's local storage, so data persists between sessions.
View the app by opening index.html in a web browser. This app is designed to be lightweight and responsive, optimized for desktop usage.
- HTML & CSS: Defines the page structure and styles for dark mode aesthetics, using CSS custom properties for flexible theming.
- JavaScript (GymHub class): Core functionality, including:
- Workout tracking
- Streak calculation
- Dynamic heatmap rendering
- Local storage management for saving and loading workout data
-
Record Workouts:
- Click on the "Add Workout" button to add a workout for the currently selected date.
- The app will display a success alert when a workout is added.
-
View Contributions:
- The contribution graph shows daily workout levels, color-coded by frequency.
- Hover over a day to see the exact number of contributions for that date.
-
Track Your Streak:
- The "Current Streak" stat shows the number of consecutive days you've recorded workouts.
-
Select a Date:
- Click on any day in the contribution graph to select it. The selected date will be updated in the "Selected" stat.
The contribution heatmap colors represent the frequency of workouts for each day:
| Color | Frequency Level |
|---|---|
--contribution-0 (Dark Gray) |
No workouts |
--contribution-1 (Green) |
Low |
--contribution-2 (Teal) |
Medium |
--contribution-3 (Bright Green) |
High |
--contribution-4 (Brightest Green) |
Very High |
To develop locally:
- Clone or download this repository.
- Open
index.htmlin your web browser.
- Progress Statistics: Add more detailed analytics on workout frequency and patterns.
- Mobile Support: Optimize layout for smaller screens.
- Customizable Goals: Allow users to set and track workout goals.
This project is licensed under the MIT License.
