-
Notifications
You must be signed in to change notification settings - Fork 0
/
weplay.html
101 lines (86 loc) · 2.11 KB
/
weplay.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
<head>
<script>
</script>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lily+Script+One' rel='stylesheet' type='text/css'>
<script src="//connect.soundcloud.com/sdk.js"></script>
<script src="https://w.soundcloud.com/player/api.js"></script>
<title>Playlist Hero</title>
</head>
<body>
<div id='fblogin'>
{{loginButtons}}
</div>
<div id='nowPlaying'>
</div>
{{> container}}
</body>
<template name="container">
{{#if curr_playlist }}
{{> playlist}}
{{else}}
{{> home}}
{{/if}}
</template>
<template name="home">
<header>
<h1 class="logo">Playlist Hero</h1>
</header>
<form id="create_playlist_form">
<input type="text" placeholder="Find or create a playlist"
id="playlist_name">
<input type="submit" value=" " id="playlist_submit"/>
</form>
<!--
<div class="playlists_holder">
Recent playlists
<ul class="playlists">
{{#each playlists}}
<li>
<a href="/{{this.name}}">{{this.name}}</a>
</li>
{{/each}}
</ul>
</div>
-->
</template>
<template name="playlist">
<header>
<a href="/">
<h1 class="logo">Playlist Hero</h1>
</a>
<span class="playlist_name">listening to {{ playlist.name }}</a>
</header>
<div class='querywrapper'>
<input type="text" placeholder="Search by song or artist" id="query">
</div>
<ul class="search-results">
{{#each results}}
<li><input type="button" value="+" class="add_track" data-id="{{this.id}}">
{{this.title}}
</li>
{{/each}}
</ul>
<div class="next_tracks">
{{#if tracks}}
Next up...
{{/if}}
<br>
<ul class="tracks">
{{#each tracks}}
<li>
<div class='voteblock'>
<span class="voted">{{ this.votes }}</span>
</div>
<div class='title'>
{{this.title}}
</div>
{{#if this.did_vote}}
{{else}}
<input type="button" value="Vote" class="vote" data-id="{{this.id}}">
{{/if}}
</li>
{{/each}}
</ul>
</div>
</template>