-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
144 lines (135 loc) · 5.15 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
<!DOCTYPE html>
<html>
<head>
<title>bc-scraper</title>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<link href='style.css' rel='stylesheet'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css' rel='stylesheet'>
<script data-main='app' src='https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js'></script>
</head>
<body>
<!-- ko with: canvas -->
<canvas id='canvas' data-bind='
event: {
touchstart: onTouchStart,
touchmove: onTouchMove,
touchend: onTouchEnd,
mousedown: onMouseDown,
mouseup: onMouseUp,
mousemove: onMouseMove,
click: $root.onCanvasClick,
}
'>
</canvas>
<!-- /ko -->
<div id='panel'>
<div id='top'>
<h1>bc-scraper</h1>
<form style='display: flex'>
<input
style='flex-grow: 1'
data-bind='value: search'
placeholder='Paste bandcamp url'
type='text'>
<button data-bind='click: doSearch' type='submit'>Load</button>
</form>
<form>
<span style='display: block' data-bind='text: savedDescription'></span>
<button data-bind='click: save'>Save current state</button>
<button data-bind='click: load'>Load saved state</button>
</form>
<!-- ko with: settings -->
<form>
<h2 style='display: flex'>
<span style='flex-grow: 1'>Settings</span>
<button data-bind='click: save'><i class='fa fa-save'></i></button>
<button data-bind='click: reset'><i class='fa fa-spinner'></i></button>
</h2>
<dl>
<dt>
<label for='attraction'>Attraction</label>
</dt>
<dd>
<input data-bind='value: attraction' id='attraction' type='number' step='0.01'>
</dd>
<dt>
<label for='repulsion'>Repulsion</label>
</dt>
<dd>
<input data-bind='value: repulsion' id='repulsion' type='number'>
</dd>
<dt>
<label for='damping'>Damping</label>
</dt>
<dd>
<input data-bind='value: damping' id='damping' type='number' step='0.1'>
</dd>
</dl>
<input data-bind='checked: updateLayout' id='update-layout' type='checkbox'>
<label for='update-layout'>Update Layout</label>
<input data-bind='checked: runSimulation' id='run-simulation' type='checkbox'>
<label for='run-simulation'>Run Simulation</label>
</form>
<!-- /ko -->
<h2>Statistics</h2>
<dl>
<dt>Processed</dt>
<dd data-bind='text: stats.processedLastFrame'></dd>
<dt>Remaining</dt>
<dd data-bind='text: stats.remainingItems'></dd>
<dt>Entities</dt>
<dd data-bind='text: stats.entities'></dd>
<dt>Layout Time (avg)</dt>
<dd data-bind='text: stats.layoutTime'></dd>
<dt>Simulation Time (avg)</dt>
<dd data-bind='text: stats.simulationTime'></dd>
</dl>
</div>
<div id='selection' data-bind="template: { name: 'details', data: selection, if: selection }"></div>
</div>
<script id='icon' type='text/html'>
</script>
<script id='details' type='text/html'>
<h2>
<span class='fa' data-bind='css: iconClass'></span>
<span data-bind='text: header'></span>
</h2>
<!-- ko if: errored -->
<p data-bind='text: error'></p>
<a data-bind='click: load' href='#'>
Click to try again
</a>
<!-- /ko -->
<!-- ko if: loaded -->
<a data-bind='attr: { href: uri }' target='_blank'>
<i class='fa fa-external-link'></i>
Open on bandcamp
</a>
<p data-bind='if: !expanding() && relatedUndisplayed().length > 0'>
<a data-bind='click: expand' data-dismiss='popover' href='#'>
<i class='fa' data-bind='css: relatedClass'></i>
Expand
<span data-bind='text: relatedUndisplayed().length'></span>
<span data-bind='text: relatedTypePluralized()'></span>
</a>
</p>
<p data-bind='if: relatedUndisplayedOfRelatedDisplayed().length > 0'>
<a data-bind='click: expandRelated' data-dismiss='popover' href='#'>
<i class='fa' data-bind='css: relatedRelatedClass'></i>
Expand
<span data-bind='text: relatedUndisplayedOfRelatedDisplayed().length'></span>
<span data-bind='text: relatedRelatedTypePluralized()'></span>
of my
<span data-bind='text: relatedType + "s"'></span>
</a>
</p>
<!-- /ko -->
</script>
<div style="display: none">
<img id="user-image" src="images/user.svg" alt="user">
<img id="album-image" src="images/headphones.svg" alt="album">
<img id="loading-image" class="spin" src="images/spinner.svg" alt="loading">
<img id="error-image" src="images/exclamation-triangle.svg" alt="error">
</div>
</body>
</html>