-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
239 lines (231 loc) · 17.4 KB
/
index.html
File metadata and controls
239 lines (231 loc) · 17.4 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>zwofactory.com - the web-based workout editor for Zwift</title>
<meta name="description" content="The web-based workout editor for Zwift. Create or edit .zwo files in your browser with no signups, logins, or ads." />
<link rel="stylesheet" href="/site.css" /><link rel="apple-touch-icon-precomposed" sizes="57x57" href="/img/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/img/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/img/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/img/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/img/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="/img/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="/img/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="/img/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="/img/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="/img/favicon-128.png" sizes="128x128" />
<link rel="icon" href="/img/favicon.ico?v=1" />
<meta name="application-name" content="zwofactory"/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="/img/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="/img/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="/img/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="/img/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="/img/mstile-310x310.png" />
</head>
<body>
<header>
<h1><a href="/">
<img src="/img/logo.svg" alt="zwofactory.com" width="500px" />
</a></h1>
</header>
<main>
<div id="divMessage"></div>
<div id="divWorkoutInfo">
<div class="grid">
<div class="u-1">
<label for="txtName">Name</label>
<input type="text" id="txtName" autofocus maxlength="300" />
</div>
</div>
<div class="grid">
<div class="u-1-2">
<label for="txtDescription">Description</label>
<textarea id="txtDescription" rows="4"></textarea>
</div>
<div class="u-1-2">
<label for="txtAuthor">Author</label>
<input type="text" id="txtAuthor" />
<label for="txtTags">Tags</label>
<input type="text" id="txtTags" />
</div>
</div>
</div>
<div class="grid" style="-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;">
<div class="u-1-2 u-sm-1" id="divSegmentButtons">
<svg data-t="s" data-p-1="50" data-d-1="300" width="30" height="30"><path class="z1" d="M1,1 L30,1 L30,30 L1,30 Z"></path></svg><!--
--><svg data-t="s" data-p-1="65" data-d-1="300" width="30" height="30"><path d="M1,1 L30,1 L30,30 L1,30 Z" class="z2"></path></svg><!--
--><svg data-t="s" data-p-1="80" data-d-1="300" width="30" height="30"><path d="M1,1 L30,1 L30,30 L1,30 Z" class="z3"></path></svg><!--
--><svg data-t="s" data-p-1="95" data-d-1="300" width="30" height="30"><path d="M1,1 L30,1 L30,30 L1,30 Z" class="z4"></path></svg><!--
--><svg data-t="s" data-p-1="110" data-d-1="300" width="30" height="30"><path d="M1,1 L30,1 L30,30 L1,30 Z" class="z5"></path></svg><!--
--><svg data-t="s" data-p-1="125" data-d-1="60" width="30" height="30"><path d="M1,1 L30,1 L30,30 L1,30 Z" class="z6"></path></svg><!--
--><svg data-t="r" data-p-1="25" data-d-1="600" data-p-2="75" width="30" height="30"><path d="M1,20 L30,1 L30,30 L1,30 Z" class="wu"></path></svg><!--
--><svg data-t="r" data-p-1="75" data-d-1="600" data-p-2="25" width="30" height="30"><path d="M1,1 L30,20 L30,30 L1,30 Z" class="cd"></path></svg><!--
--><svg data-t="f" data-d-1="600" width="30" height="30"><path class="fr" d="M 1 15 C 9 2, 20 18, 29 10 H 30 V 30 H 1 Z"></path></svg><!--
--><svg data-t="i" data-p-1="75" data-d-1="60" data-p-2="50" data-d-2="300" data-r="3" width="30" height="30"><path class="z2" d="M1,1 h5 v30 h-5 Z"></path><path class="z1" d="M5,10 h10 v20 h-10 Z"></path><path class="z2" d="M15,1 h5 v30 h-5 Z"></path><path class="z1" d="M20,10 h10 v20 h-10 Z"></path></svg><!--
--><span style="white-space:nowrap"><select id="selWorkout" hidden style="margin-left:4px; vertical-align:top; height:30px; width:120px; padding:0;"></select><!--
--><span id="btnInsertWorkout" style="cursor:pointer" hidden><svg width="30" height="30"><path class="z3" d="m2,8 h19 v14 h10 l-14,7 l-14,-7 h10 v-10 h-11 Z"></path></svg></span></span>
</div>
<div class="u-1-2 u-sm-1" style="text-align: right;">
<svg width="30" height="30" id="btnSelectPrevious">
<path d="M5,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,23 h8 v3 h-8 z"></path>
<path stroke="black" stroke-width="1" d="M9,30 v-10"></path>
<path stroke="black" stroke-width="1" d="M6,23 l3,-3"></path>
<path stroke="black" stroke-width="1" d="M9,20 l3,3"></path>
</svg>
<svg width="30" height="30" id="btnSelectNext">
<path d="M5,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,1 h8 v20 h-8 z" class="z0"></path>
<path d="M5,23 h8 v3 h-8 z"></path>
<path stroke="black" stroke-width="1" d="M19,30 v-10"></path>
<path stroke="black" stroke-width="1" d="M16,23 l3,-3"></path>
<path stroke="black" stroke-width="1" d="M19,20 l3,3"></path>
</svg>
<svg width="30" height="30" id="btnMoveLeft">
<path d="M5,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,23 h8 v3 h-8 z"></path>
<path stroke="black" stroke-width="1" d="M19,12 h-18"></path>
<path stroke="black" stroke-width="1" d="M1,12 l3,-3"></path>
<path stroke="black" stroke-width="1" d="M1,12 l3,3"></path>
</svg>
<svg width="30" height="30" id="btnMoveRight">
<path d="M5,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,1 h8 v20 h-8 z" class="z0"></path>
<path d="M5,23 h8 v3 h-8 z"></path>
<path stroke="black" stroke-width="1" d="M8,12 h18"></path>
<path stroke="black" stroke-width="1" d="M26,12 l-3,-3"></path>
<path stroke="black" stroke-width="1" d="M26,12 l-3,3"></path>
</svg>
<svg width="30" height="30" id="btnDuplicate">
<path d="M5,1 h8 v20 h-8 z" class="z0"></path>
<path d="M15,1 h8 v20 h-8 z" style="fill:white;stroke:#555;stroke-width:1px"></path>
<path d="M5,23 h8 v3 h-8 z"></path>
<circle cx="10" cy="12" r="4" style="fill:none;stroke:black;stroke-width:1px"></circle>
<line x1="8" y1="12" x2="12" y2="12" stroke="black" stroke-width="1px"></line>
<line x1="10" y1="10" x2="10" y2="14" stroke="black" stroke-width="1px"></line>
<line x1="15" y1="12" x2="21" y2="12" stroke="black" stroke-width="1px"></line>
<line x1="21" y1="12" x2="18" y2="10" stroke="black" stroke-width="1px"></line>
<line x1="21" y1="12" x2="18" y2="14" stroke="black" stroke-width="1px"></line>
</svg>
<svg width="30" height="30" id="btnDelete">
<path d="M10,1 h10 v20 h-10 z" class="z0"></path>
<path d="M10,23 h10 v3 h-10 z"></path>
<path stroke="red" stroke-width="1" d="M8,6 l14,10 M8,16 l14,-10"></path>
</svg>
</div>
</div>
<div id="divWorkoutDuration"><span id="spanWorkoutDuration"></span><span id="spanTss" class="tss"></span><span id="spanXp" class="xp"></span></div>
<a id="aSettings" title="Settings"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#284a6c"><path d="M24 13.616v-3.232c-1.651-.587-2.694-.752-3.219-2.019v-.001c-.527-1.271.1-2.134.847-3.707l-2.285-2.285c-1.561.742-2.433 1.375-3.707.847h-.001c-1.269-.526-1.435-1.576-2.019-3.219h-3.232c-.582 1.635-.749 2.692-2.019 3.219h-.001c-1.271.528-2.132-.098-3.707-.847l-2.285 2.285c.745 1.568 1.375 2.434.847 3.707-.527 1.271-1.584 1.438-3.219 2.02v3.232c1.632.58 2.692.749 3.219 2.019.53 1.282-.114 2.166-.847 3.707l2.285 2.286c1.562-.743 2.434-1.375 3.707-.847h.001c1.27.526 1.436 1.579 2.019 3.219h3.232c.582-1.636.75-2.69 2.027-3.222h.001c1.262-.524 2.12.101 3.698.851l2.285-2.286c-.744-1.563-1.375-2.433-.848-3.706.527-1.271 1.588-1.44 3.221-2.021zm-12 2.384c-2.209 0-4-1.791-4-4s1.791-4 4-4 4 1.791 4 4-1.791 4-4 4z"></path></svg></a>
<div id="divSegmentChart"></div>
<div id="divSegmentInputs" class="grid">
<div class="u-1-6 u-sm-1-5"><input disabled type="number" id="txtP1" min="5" step="5" data-target="p1" /><label for="txtP1">P<span class="sm-hidden">o</span>w<span class="sm-hidden">e</span>r<span class="sm-hidden"> </span>1<span class="sm-hidden"> (%FTP)</span> <span hidden id="divP1" class="calculated-info"></span></label></div>
<div class="u-1-6 u-sm-1-5"><input disabled type="number" id="txtD1" min="5" step="5" data-target="d1" /><label for="txtD1">Dur<span class="sm-hidden">ation </span>1<span class="sm-hidden"> (s)</span> <span hidden id="divD1" class="calculated-info"></span></label></div>
<div class="u-1-6 u-sm-1-5"><input disabled type="number" id="txtP2" min="5" step="5" data-target="p2" /><label for="txtP2">P<span class="sm-hidden">o</span>w<span class="sm-hidden">e</span>r<span class="sm-hidden"> </span>2<span class="sm-hidden"> (%FTP)</span> <span hidden id="divP2" class="calculated-info"></span></label></div>
<div class="u-1-6 u-sm-1-5"><input disabled type="number" id="txtD2" min="5" step="5" data-target="d2" /><label for="txtD2">Dur<span class="sm-hidden">ation </span>2<span class="sm-hidden"> (s)</span> <span hidden id="divD2" class="calculated-info"></span></label></div>
<div class="u-1-6 u-sm-1-5"><input disabled type="number" id="txtR" min="1" max="20" data-target="r" /><label for="txtR">R<span class="sm-hidden">e</span>p<span class="sm-hidden">ea</span>t</label></div>
<div class="u-1-18 u-sm-1-3"><button id="btnShowCadence"><svg height="12" width="16"><path style="fill:none;" stroke="black" stroke-width="1" d="M8,6 m-5,0 a 5,5 0 1,1 10,0 a 5,5 0 1,1 -10,0 M8,6 l-5.5,-5.5 M11.5,9.5 l1.75,1.75"></path></svg></button></div>
<div class="u-1-18 u-sm-1-3"><button id="btnShowTextEvents"><span style="font-family:'Times New Roman',Times,serif;font-weight:bold">T</span></button></div>
<div class="u-1-18 u-sm-1-3"><button id="btnShowOptions"><svg height="12" width="16"><path style="fill:none;" stroke="black" stroke-width="1" d="M4,12 l3,-9 l2,2 l4,-6 l-3,8.5 l-2,-1.5 z"></path></svg></button></div>
<div class="modal" id="divModalCadence">
<label for="chkCadence"><input type="checkbox" id="chkCadence" />Set cadence on selected segment</label>
<hr />
<div><input type="number" id="txtC1" min="10" max="200" data-target="c1" /><label for="txtC1">Cadence 1 (RPM)</label></div>
<div><input type="number" id="txtC2" min="10" max="200" data-target="c2" /><label for="txtC2">Cadence 2 (RPM)</label></div>
<hr />
<button id="btnDismissCadence">Close</button>
</div>
<div class="modal" id="divModalTextEvents">
<div class="modal-header">
<button id="btnAddTextEvent">+ Text Event</button>
<div class="grid">
<div class="u-3-5">Text</div>
<div class="u-2-5">Offset (s)</div>
</div>
</div>
<div class="modal-body">
<div id="divTextEventToClone" class="invisible grid"><div class="u-3-5">
<input type="text" value="Text" /></div><div class="u-1-5">
<input type="number" value="0" min="0" step="10" name="offset" /></div><div class="u-1-5">
<button>⌫</button></div>
</div>
<div id="divTextEvents">
</div>
<hr />
</div>
<div class="modal-footer">
<button id="btnDismissTextEvents">Close</button>
</div>
</div>
<div class="modal" id="divModalOptions">
<hr />
<label for="chkShowAvg"><input type="checkbox" id="chkShowAvg" />Show average power during the selected segment</label>
<hr />
<label for="chkDisableFlatRoad"><input type="checkbox" id="chkDisableFlatRoad" />Disable forced flat road during the selected segment</label>
<hr />
<button id="btnDismissOptions">Close</button>
</div>
<div class="modal" id="divModalCreateUrl">
<div>
The URL below can be used to share or save workouts. Right-click or tap/hold to copy the URL. Text events are not supported.
All other workout info is encoded into the URL itself, so they can get very long. A URL shortener service can be used
to create more manageable links.
</div>
<hr />
<div style="overflow-x:hidden;white-space:nowrap"><a href="" id="aUrl"></a></div>
<hr />
<button id="btnDismissUrl">Close</button>
</div>
<div class="modal" id="divModalSettings">
<div class="modal-header">Settings</div>
<div class="modal-body">
<div class="striped">
<div><label><input type="checkbox" data-key="displayTss">Display workout TSS<a class="infoCircle tooltip">?<div class="left">Check this box to display Training Stress Scores.</div></a></label></div>
<div><label><input type="checkbox" data-key="displayXp">Display workout XP<a class="infoCircle tooltip">?<div class="left">Check this box to display estimate XP value.</div></a></label></div>
<div><label><input type="checkbox" data-key="displayTimeInMinutes">Display duration in minutes<a class="infoCircle tooltip">?<div class="left">Check this box to display segment durations in a min:sec format.</div></a></label></div>
<div><label><input type="checkbox" data-key="displayAbsolutePower">Display absolute power<a class="infoCircle tooltip">?<div class="left">Check this box to display power in watts, calculated from %FTP and the "My FTP" setting (below).</div></a></label></div>
<div><label><input type="number" min="1" step="1" data-key="userFtp">My FTP (Watts)<a class="infoCircle tooltip">?<div class="left">Your FTP value in watts, for use in displaying absolute power and importing an erg file without an FTP value in the [COURSE HEADER]</div></a></label></div>
<div><label><input type="checkbox" data-key="enableWorkoutInsertion">Enable workout insertion<a class="infoCircle tooltip">?<div class="left">Check this box to enable insertion of entire saved workouts in the workout editor.</div></a></label></div>
<div><label><input type="checkbox" data-key="enableUrlCreation">Enable URL creation<a class="infoCircle tooltip">?<div class="left">Check this box to display a button to share and save your workouts via URL.</div></a></label></div>
<div><label><input type="checkbox" data-key="duplicateTextEvents">Duplicate text events<a class="infoCircle tooltip">?<div class="left">Uncheck this box to disable copying of text events onto duplicated segments.</div></a></label></div>
</div>
<hr />
</div>
<div class="modal-footer">
<button id="btnDismissSettings">Close</button>
</div>
</div>
</div>
<hr />
<div class="grid" id="divButtons">
<div class="u-1-2"><button class="save" id="btnSaveToMyWorkouts">Save to My Workouts</button><div class="saved" style="text-align: center">Saved!</div></div>
<div class="u-1-3 display-none"><button class="save" id="btnCreateUrl">Create Workout URL</button></div>
<div class="u-1-2"><button class="save" id="btnDownloadZwoFile">Download .zwo file</button></div>
</div>
<div class="grid">
<div class="u-1" id="divLinks"></div>
</div>
</main>
<footer>
<div class="grid">
<div class="u-1-5 u-sm-1"><a href="/">zwofactory.com</a></div>
<div class="u-1-5 u-sm-1"><a href="/myworkouts/">My Workouts</a></div>
<div class="u-1-5 u-sm-1"><a href="/info/">Info</a></div>
<div class="u-1-5 u-sm-1"><a href="/settings/">Settings</a></div>
<div class="u-1-5 u-sm-1"><a href="/templates/">Workout Templates</a></div>
</div>
<hr />
<div>© 2023 Matt McNeil<a href="mailto:zwofactory@gmail.com">Contact: zwofactory@gmail.com</a></div>
</footer>
<script src="/js/fileSaver.js"></script>
<script src="/js/settings.js"></script>
<script src="/js/zwofactory.js"></script>
<script src="/js/index.html.js"></script>
</body>
</html>