-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (210 loc) · 9.52 KB
/
Copy pathindex.html
File metadata and controls
216 lines (210 loc) · 9.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Running Progress Tracker</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="styles.css" />
</head>
<body
class="bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 min-h-screen text-white"
>
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="text-center mb-10">
<h1
class="text-5xl font-bold mb-2 bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent"
>
Running Progress Tracker
</h1>
<p class="text-gray-300">
Log your runs and visualize your progress
</p>
</header>
<!-- Stats Cards -->
<div
class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-8"
>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">This Week</h3>
<p class="text-3xl font-bold" id="weekTotal">0</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">Week - Road</h3>
<p class="text-3xl font-bold text-blue-400" id="weekRoad">
0
</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">Week - Trail</h3>
<p class="text-3xl font-bold text-green-400" id="weekTrail">
0
</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">Road Total</h3>
<p class="text-3xl font-bold text-blue-400" id="roadTotal">
0
</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">Trail Total</h3>
<p
class="text-3xl font-bold text-green-400"
id="trailTotal"
>
0
</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20 hover:bg-white/15 transition-all"
>
<h3 class="text-gray-300 text-sm mb-2">Combined Total</h3>
<p
class="text-3xl font-bold text-purple-400"
id="combinedTotal"
>
0
</p>
<p class="text-gray-400 text-sm">miles</p>
</div>
</div>
<!-- Add Run Form -->
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 mb-8 border border-white/20"
>
<h2 class="text-2xl font-bold mb-4">Log New Run</h2>
<form
id="runForm"
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4"
>
<div>
<label class="block text-sm mb-2"
>Distance (miles)</label
>
<input
type="number"
step="0.1"
id="distance"
required
class="w-full px-4 py-2 rounded-lg bg-white/10 border border-white/20 focus:border-purple-400 focus:outline-none"
/>
</div>
<div>
<label class="block text-sm mb-2"
>Pace (min/mile)</label
>
<input
type="text"
id="pace"
placeholder="8:30"
required
class="w-full px-4 py-2 rounded-lg bg-white/10 border border-white/20 focus:border-purple-400 focus:outline-none"
/>
</div>
<div>
<label class="block text-sm mb-2">Run Type</label>
<select
id="runType"
required
class="w-full px-4 py-2 rounded-lg bg-white/10 border border-white/20 focus:border-purple-400 focus:outline-none"
>
<option value="easy">Easy</option>
<option value="tempo">Tempo</option>
<option value="long">Long</option>
</select>
</div>
<div>
<label class="block text-sm mb-2">Surface</label>
<select
id="surface"
required
class="w-full px-4 py-2 rounded-lg bg-white/10 border border-white/20 focus:border-purple-400 focus:outline-none"
>
<option value="road">Road</option>
<option value="trail">Trail</option>
</select>
</div>
<div class="flex items-end">
<button
type="submit"
class="w-full px-6 py-2 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg font-semibold hover:from-blue-600 hover:to-purple-600 transition-all transform hover:scale-105"
>
Add Run
</button>
</div>
</form>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20"
>
<h2 class="text-xl font-bold mb-4">Weekly Mileage Trend</h2>
<div class="chart-container">
<canvas id="weeklyChart"></canvas>
</div>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20"
>
<h2 class="text-xl font-bold mb-4">Surface Distribution</h2>
<div class="chart-container">
<canvas id="surfaceChart"></canvas>
</div>
</div>
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20"
>
<h2 class="text-xl font-bold mb-4">
Run Type Distribution
</h2>
<div class="chart-container">
<canvas id="runTypeChart"></canvas>
</div>
</div>
</div>
<!-- Recent Runs -->
<div
class="bg-white/10 backdrop-blur-md rounded-xl p-6 border border-white/20"
>
<h2 class="text-2xl font-bold mb-4">Recent Runs</h2>
<div class="overflow-x-auto">
<table class="w-full">
<thead>
<tr class="border-b border-white/20">
<th class="text-left py-2">Date</th>
<th class="text-left py-2">Distance</th>
<th class="text-left py-2">Pace</th>
<th class="text-left py-2">Type</th>
<th class="text-left py-2">Surface</th>
<th class="text-left py-2">Actions</th>
</tr>
</thead>
<tbody id="runsTable" class="divide-y divide-white/10">
<!-- Runs will be added here -->
</tbody>
</table>
</div>
</div>
</div>
<script defer src="script.js"></script>
</body>
</html>