-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
365 lines (276 loc) · 14 KB
/
index.html
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Animelist Timeline</title>
<link href="favicon.png" rel="shortcut icon" type="image/x-icon" id="favicon">
<link href="./res/root.css" rel="stylesheet" type="text/css">
<link href="./js/lib/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css">
<link href="./js/lib/jquery-ui/jquery-ui.theme.min.css" rel="stylesheet" type="text/css">
<!-- <link rel="stylesheet" type="text/css" href="./js/lib/jquery-ui/jquery-ui.structure.min.css"> -->
<link rel="stylesheet" href="./js/lib/awesomplete/awesomplete.css" />
</head>
<body>
<header>
<nav class="flex-start">
<!-- Filled in by navbar.ts -->
</nav>
<span>
This is a work in progress. About/Source/Support:
<a href="https://github.com/linkviii/js-animelist-timeline">
https://github.com/linkviii/js-animelist-timeline
</a>
</span>
</header>
<div id="top">
<div id="logo">
<img src="res/logo.svg">
</div>
<h2>Anilist Timeline</h2>
<!-- <br> -->
<p>Generate a timeline of when you watched anime from dates on your AniList.</p>
<!--
Submit to an invisible iframe to prevent page refresh on submit.
Submitting lets username autocomplete.
https://stackoverflow.com/a/29885896/1993919
-->
<iframe name="💾" src="about:blank" style="display:none"></iframe>
<label for="show-advanced">Show advanced options</label>
<input type="checkbox" name="show-advanced" id="show-advanced">
<form action="about:blank" id="form" target="💾">
<!--
Prevent implicit submission of the form when pressing enter.
https://stackoverflow.com/a/51507806/1993919
-->
<button type="submit" disabled style="display: none" aria-hidden="true"></button>
<div class="fieldContainer">
<fieldset class="mainGroup">
<legend>List</legend>
<label for="listName">Username</label>
<input id="listName" required="" spellcheck="false">
<label for="list-kind">Media</label>
<select id="list-kind">
<option value="ANIME">Anime</option>
<option value="MANGA">Manga</option>
</select>
</fieldset>
</div>
<!-- Only show the list for the current Media kind -->
<div class="fieldContainer advanced">
<fieldset id="anime-format">
<legend>Format</legend>
<div class="check-grid">
<!-- Copying descriptions from the api docs. Could tool tip them or something. -->
<div>
<!-- Anime broadcast on television -->
<label for="format-tv">TV</label>
<input checked="" id="format-tv" type="checkbox">
</div>
<div>
<!-- Anime which are under 15 minutes in length and broadcast on television -->
<label for="format-short">Short</label>
<input checked="" id="format-short" type="checkbox">
</div>
<div>
<!-- Anime movies with a theatrical release -->
<label for="format-movie">Movie</label>
<input checked="" id="format-movie" type="checkbox">
</div>
<div>
<!-- Special episodes that have been included in DVD/Blu-ray releases, picture dramas, pilots, etc -->
<label for="format-special">Special</label>
<input checked="" id="format-special" type="checkbox">
</div>
<div>
<!-- (Original Video Animation) Anime that have been released directly on DVD/Blu-ray without originally going through a theatrical release or television broadcast -->
<label for="format-ova">OVA</label>
<input checked="" id="format-ova" type="checkbox">
</div>
<div>
<!-- (Original Net Animation) Anime that have been originally released online or are only available through streaming services. -->
<label for="format-ona">ONA</label>
<input checked="" id="format-ona" type="checkbox">
</div>
<div>
<!-- Short anime released as a music video -->
<label for="format-music">Music</label>
<input checked="" id="format-music" type="checkbox">
</div>
</div>
</fieldset>
<fieldset id="manga-format" class="advanced">
<legend>Format</legend>
<div class="check-grid">
<div>
<!-- Professionally published manga with more than one chapter -->
<label for="format-manga">Manga</label>
<input checked="" id="format-manga" type="checkbox">
</div>
<div>
<!-- Written books released as a series of light novels -->
<label for="format-novel">Novel</label>
<input checked="" id="format-novel" type="checkbox">
</div>
<div>
<!-- Manga with just one chapter -->
<label for="format-one-shot">One Shot</label>
<input checked="" id="format-one-shot" type="checkbox">
</div>
</div>
</fieldset>
</fieldset>
</div>
<div class="fieldContainer">
<fieldset class="mainGroup">
<legend>Plot</legend>
<input type="radio" name="plot" id="timeline" checked>
<label for="timeline">Timeline</label>
<br>
<input type="radio" name="plot" id="watch-time">
<label for="watch-time">Watch time</label>
</fieldset>
</div>
<div class="fieldContainer">
<fieldset class="mainGroup">
<legend>Dates (optional)</legend>
<!-- I need help designing this -->
<div style="
display: inline-grid;
grid-template-columns: auto auto;
column-gap: 15px;
">
<div style="
display: inline-grid;
grid-template-columns: auto auto;
column-gap: 5px;
">
<label class="before" for="last-n">Show <em>n</em> most recent</label>
<span>
<input type="number" id="last-n" value="25" min="5" step="5" style="width: 3em;">
<input type="checkbox" id="enable-last-n" checked class="advanced">
</span>
<label class="before advanced" for="from">From</label>
<input id="from" type="date" class="advanced">
<label for="to" class="before">Up to</label>
<input id="to" type="date">
</div>
<div style="
display: inline-grid;
grid-template-columns: auto auto;
">
<label for="pad-focus" class="advanced before">Pad year focus</label>
<input id="pad-focus" type="checkbox" class="advanced">
<label class="before advanced" for="focus-year">Focus on year</label>
<!-- jquery ui spinner for negative step -->
<span class="advanced">
<input id="focus-year" placeholder="20xx" style="width: 4em; justify-self:end;">
</span>
</div>
</div>
<!-- <span class="advanced">•</span> -->
<div class="advanced">
<label for="heatmap-select">User's heatmap</label>
<select id="heatmap-select" disabled>
<option value="">Load a timeline first</option>
</select>
Click a cell to focus.
<div id="heatmap-container"></div>
</div>
</fieldset>
</div>
<div class="fieldContainer advanced">
<fieldset class="">
<legend>Events</legend>
<!-- Give some style like `flex`? The description shouldn't wrap under the select.
For now they're not long enough for me to worry about. -->
<div>
<!-- I meant to write radio buttons but I did this instead. As if I know what I want anyway. -->
<select id="event-kind">
<!-- See animelistTL.EventPreference -->
<option value="all">All</option>
<option value="prefer start">Prefer Start</option>
<option value="prefer finish">Prefer Finish</option>
<option value="start only">Start Only</option>
<option value="finish only">Finish Only</option>
<option value="binged only">Binged Only</option>
</select>
<!-- Fill with description of selected option -->
<span id="event-kind-description"></span>
</div>
</fieldset>
</div>
<div class="fieldContainer advanced">
<fieldset>
<legend>Title Filter</legend>
<span>
<select id="filter-kind">
<option value="include">Only Include</option>
<option value="exclude">Exclude</option>
</select>
These Titles:
</span>
<div>
<ul id="filter-list"> </ul>
</div>
<button id="clear-filter">Clear All Filters</button>
<div style="display: block-inline;">
<label for="title-filter">Title Search:</label>
<input id="title-filter" placeholder="Load a timeline first">
<label for="custom-list-filter">Add From Custom List:</label>
<input id="custom-list-filter" placeholder="Load a timeline first" class="dropdown-input">
</div>
</fieldset>
</div>
<div class="fieldContainer">
<fieldset class="mainGroup">
<label class="before" for="language">Language</label>
<select id="language">
<option value="english">English</option>
<option value="romaji">Romaji</option>
<option value="native">Native</option>
</select>
<label class="before" for="seasons">Seasons</label>
<input id="seasons" type="checkbox">
</fieldset>
</div>
<div class="fieldContainer">
<fieldse class="mainGroup" t>
<label class="before" for="font-size">Font Size</label>
<input id="font-size" required="" style="width: 3em;" type="number" value="10">
<label class="before" for="width">Width</label>
<!-- jquery ui spinner -->
<input id="width" max="9999" min="200" required="" value="1400" style="width: 4em;">
<input id="width-slider" style="display: block; width: 100%;" type="range">
<!-- <p id="width-disp">val</p> -->
</fieldset>
</div>
<button id="listFormSubmit" title="Submit" type="submit">New Timeline</button>
<!-- js calls form.reset() and then reinits other things. -->
<button id="clear-form" title="Clear form data">Clear Form</button>
</form>
<!-- Place for js to fill in messages to the user -->
<span id="feedback"> </span>
<br>
<!--debug out-->
<pre id="inputOut"></pre>
<p id="json"></p>
<button class="danger" disabled="" id="clearAllTimelines" title="Remove all generated timelines"
type="button">Remove all</button>
<br>
<br>
<!--Generate timeline here-->
<div id="tls"></div>
</div>
<!---->
<!---->
<script src="js/lib/strftime.js"></script>
<script src="js/lib/FileSaver.js"></script>
<script src="js/lib/svg.js"></script>
<script src="js/navbar.js"></script>
<script type="module">
import * as main from "./js/main.js";
window.main = main;
console.log("main module loaded", new Date().toLocaleTimeString());
</script>
</body>
</html>