forked from sitepoint-editors/spotifyplayground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (105 loc) · 3.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sitepoint :|: I love spotify</title>
<link rel="stylesheet" type="text/css" href="styles/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styles/_isAwesome.css">
</head>
<body>
<div class="container">
<header>
<h1>Underscore Awesomeness</h1>
</header>
<main>
<div class="center-block">
<div class="filters col-sm-2 col-md-2">
</div>
<div class="col-md-10">
<p class="lead">Some artists</p>
<div class="artists"></div>
</div>
<div class="clearfix visible-xs-block"></div>
</div>
</main>
<footer>© 2015 - Sitepoint</footer>
</div>
</body>
<!-- Templates -->
<script type="underscore/template" id="list-tpl">
<ul class="list-unstyled">
<% _.each(items, function(item) { %>
<li>
<%= itemTpl({
item: item
}) %>
</li>
<% }) %>
</ul>
</script>
<script type="underscore/template" id="filter-list-tpl">
<% _.each(filters, function(filter) { %>
<p class="lead">Filter by <%= filter.label %></p>
<div class="center-block">
<%= filterValuesListTpl({
filter: filter,
filterTpl: filterTpl
}) %>
</div>
<% }) %>
</script>
<script type="underscore/template" id="artist-tpl">
<div class="row">
<div class="col-md-2">
<a href="<%= item.external_urls.spotify %>" target="blank" title="Go to <%=item.name%> profile.">
<img class="img-responsive" src="<%= item.images[1].url %>" alt="<%= item.name %>" />
</a>
</div>
<div class="col-md-6">
<ul class="list-unstyled">
<li>
<a href="<%= item.external_urls.spotify %>" target="blank" title="Go to <%=item.name%> profile.">
<span><%= item.name %></span>
</a>
</li>
<li>
<small><%= item.followers.total %> followers</small>
</li>
</ul>
</div>
<div class="col-md-6">
<span data-action="get-details" data-id="<%= item.id %>">
See details
</span>
</div>
</div>
</script>
<script type="underscore/template" id="filter-values-list">
<ul class="list-unstyled">
<% _.each(filter.values, function(value) { %>
<li>
<%= filterTpl({
filter: filter,
value: value
}) %>
</li>
<% }) %>
</ul>
</script>
<script type="underscore/template" id="filter-tpl">
<button class="btn btn-default sized" data-filter-field="<%= filter.field %>" data-filter-value="<%= value %>" data-action="filter"><%= value %></button>
</script>
<!-- Scripts -->
<script type="text/javascript" src="js/src/lib/underscore.min.js"></script>
<script type="text/javascript" src="js/src/lib/jquery.min.js"></script>
<script type="text/javascript" src="js/src/modules/_isAwesome.Config.js"></script>
<script type="text/javascript" src="js/src/modules/_isAwesome.Template.js"></script>
<script type="text/javascript" src="js/src/modules/_isAwesome.Filter.js"></script>
<script type="text/javascript" src="js/src/modules/_isAwesome.js"></script>
<script type="text/javascript">
(function() {
_isAwesome.init();
})();
</script>
</html>