-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
169 lines (146 loc) · 5.63 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-49967934-1', 'jcheng31.github.io');
ga('send', 'pageview');
</script>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/knockout/knockout-3.1.0.js"></script>
<script type="text/javascript" src="./js/countries.js"></script>
<script type="text/javascript" src="./js/app.js"></script>
<link href='//fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./css/main.css">
<link rel="icon" type="image/png" href="./favicon.png">
<title>Is it on Spotify?</title>
</head>
<body>
<div class="container">
<div class="col-md-10 col-md-offset-1">
<div data-bind="ifnot: searchCompleted">
<div class="row center-text home">
<form data-bind="submit: search">
<!-- TODO: more responsiveness. -->
<h1>
There's
<select data-bind="value: queryType, valueUpdate: 'input'">
<option value="track">a track</option>
<option value="album">an album</option>
</select>
called
<input placeholder="name" autofocus data-bind="value: givenName, valueUpdate: 'input'" />
.
</h1>
<input type="submit" class="search-button btn btn-default" value="Is it on Spotify?" />
</form>
</div>
</div>
<div class="track-details-pane row center-text" data-bind="if: searchCompleted">
<div class="animate-in">
<div data-bind="ifnot: itemOnSpotify">
<h1>
Nope,
<span class="highlight" data-bind="text: submittedName"></span>
doesn't seem to be available.
</h1>
</div>
<div data-bind="if: itemOnSpotify">
<h1>
Yep!
</h1>
<div data-bind="with: selectedItem">
<div data-bind="if: $parent.isTrack">
<h1>
<span class="highlight" data-bind="text: title, css: { 'track-detail': $parent.retrievedItems().length > 1 }, click: $parent.toggleAlternatives"></span>
by
<span class="highlight" data-bind="text: artist"></span>
is available in
<span class="highlight track-detail" data-bind="text: album.numberOfRegions, click: $parent.toggleRegions"></span>
regions.
</h1>
<h1>
It's from
<span class="highlight" data-bind="text: album.name"></span>.
</h1>
</div>
<div data-bind="ifnot: $parent.isTrack">
<h1>
<span class="highlight" data-bind="text: name, css: { 'track-detail' : $parent.retrievedItems().length > 1 }, click: $parent.toggleAlternatives"></span>
is available in
<span class="highlight track-detail" data-bind="text: numberOfRegions, click: $parent.toggleRegions"></span>
regions.
</h1>
</div>
<div>
<a target="_blank" class="play-link" data-bind="attr: { href: uri }">▶ Spotify</a>
<a target="_blank" class="play-link" data-bind="attr: { href: href }">▶ Spotify Web Player</a>
</div>
<div id="alternatives" style="display: none;">
<h2>
Not what you're looking for? Here are some other
<span data-bind="text: $parent.queryType"></span>s
we found.
</h2>
<div class="short-scroll" data-bind="foreach: $root.retrievedItems">
<div class="row alternate-option" data-bind="click: $root.selectAlternative">
<div class="col-md-8 col-md-offset-2">
<div data-bind="if: $root.isTrack">
<h4>
<span class="highlight" data-bind="text: title"></span>
</h4>
<div class="detail-second-row">
<span data-bind="text: artist"></span>
<span class="album-name" data-bind="text: album.name"></span>
</div>
</div>
<div data-bind="ifnot: $root.isTrack">
<div class="col-md-2">
<img data-bind="attr: {src: image}" />
</div>
<h4 class="col-md-10">
<span class="highlight" data-bind="text: name"></span>
</h4>
</div>
</div>
</div>
</div>
</div>
<div id="region-list" style="display: none;">
<h2>Here're all the places it's available in.</h2>
<div class="short-scroll">
<div data-bind="if: $parent.isTrack">
<div data-bind="foreach: album.regions">
<h4 data-bind="text: $data"></h4>
</div>
</div>
<div data-bind="ifnot: $parent.isTrack">
<div data-bind="foreach: regions">
<h4 data-bind="text: $data"></h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="search-button btn btn-default" data-bind="click: reset">
Find something else.
</div>
</div>
</div>
</div>
</div>
<footer class="center-text">
<p>
This website is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.
<a href="https://github.com/jcheng31/isitonspotify">Source on GitHub.</a>
</p>
</footer>
</body>
</html>