-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
98 lines (71 loc) · 2.81 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
<html>
<head>
<title>Simple Cuesheet</title>
<script src="./functions.js"></script>
<script src="./album.js"></script>
<script src="./track.js"></script>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="./themes.css">
</head>
<body>
<script>
let myAlbum;
</script>
<main>
<div id="modeswitcher">
<span id="sw_dark" onclick="setDarkMode()">☾ Dark Mode</span>
<span id="sw_light" onclick="setLightMode()">☀ Light Mode</span>
</div>
<section class="titlebox">
<h1>Simple Cuesheet</h1>
<span>Note: Use "save" to save your current state of work in your browser and "load" to load it again to continue your work.</span><br>
<button onclick="persist()" title="Save to Browser (Local Storage)">Save</button> <button onclick="loadFromLocal()" title="Load from Browser (Local Storage)">Load</button>
</section>
<hr>
<section class="toolbox">
<h2>Album Data</h2>
<fieldset>
<span>Enter Artist, Title and total duration of the album</span><br>
<input type="text" id="artist" placeholder="Artist"/>
<input type="text" id="albumTitle" placeholder="Album Title" />
<input type="text" id="duration" placeholder="00:00:00" pattern="[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" oninput="this.reportValidity()" /><br />
<button class="button" onclick="setAlbum()">Make Album</button>
</fieldset>
<fieldset>
<span>Add tracks by title and cue point respective to the total duration</span><br>
<input type="text" id="trackTitle" placeholder="Track Title" />
<input type="text" id="cuePoint" placeholder="00:00:00" pattern="[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" oninput="this.reportValidity()" /><br />
<button type="submit" class="button" onclick="addTrack()">Add Track</button>
</fieldset>
<button class="button" style="float: right" onclick="clearTracks()">Clear tracks</button>
<h2>Text & JSON Input</h2>
<span>Load in data from text or json (see output on the right).</span><br>
<span>Text input must separate track name and cue point with a dash: 00:00 - Track title (order will be detected).<br>An album must already be set up.</span>
<textarea id="textIn"></textarea>
<button onclick="loadFromTextInput()">Load from Text</button>
<button onclick="loadFromJSONInput()">Load JSON</button>
</section>
<section class="toolbox">
<h2>Cuesheet Output</h2>
<span>Copy this information into a file with a .cue ending</span>
<pre id="outputBox"></pre>
<button onclick="downloadData('cue')">Save</button>
<h2>JSON Output</h2>
<span>To make your data more portable</span>
<pre id="jsonout"></pre>
<button onclick="downloadData('json')">Save</button>
</section>
<section class="toolbox">
<h2>Nicer Preview</h2>
<span>Album overview with number, track name and duration</span>
<table id="trackTable">
<tbody>
</tbody>
</table>
</section>
</main>
<script>
checkDesign();
</script>
</body>
</html>