-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
88 lines (59 loc) · 2.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
<!DOCTYPE html>
<html ng-app="app">
<head lang="en">
<meta charset="UTF-8">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<title>Angular.js Spotify search</title>
</head>
<body>
<div class="wrapper" ng-controller="myCtrl">
<div class="header">
<h3>Simple Spotify search with Angular</h3>
<form class="form-inline">
<div class="form-group">
<input name="queryText" type="text" ng-model="query" class="form-control" placeholder="type something">
</div>
<button ng-click="search()" ng-disabled="searchForm.$invalid" class="btn btn-default">Search</button>
</form>
</div>
<!-- Divs for search results -->
<div class="col-md-4" id="div-1">
<h4>Artists</h4>
<div ng-repeat="i in myData.artists" class="clickable" data-toggle="tooltip" data-placement="top" title="Open in Spotify">
<a href="{{i.uri}}"></a>
<img src="{{getImage(i.images)}}" class="list">
<b>{{ i.name }}</b>
</div>
</div>
<div class="col-md-4" id="div-2">
<h4>Albums</h4>
<div ng-repeat="i in myData.albums" class="clickable" data-toggle="tooltip" data-placement="top" title="Open in Spotify">
<a href="{{i.uri}}"></a>
<img src="{{getImage(i.images)}}" class="list">
<b>{{ i.name }}</b>
</div>
</div>
<div class="col-md-4" id="div-3">
<h4>Tracks</h4>
<div ng-repeat="i in myData.tracks" class="clickable" data-toggle="tooltip" data-placement="top" title="Open in Spotify">
<a href="{{i.uri}}"></a>
<b>{{i.name}}</b>
<p ng-if="i.artists">
{{parseArtistsForTrack(i.artists)}}
</p>
</div>
</div>
<!-- Needed to keep the footer down (Ryan Fait's HTML5 CSS Sticky Footer) -->
<div class="push"></div>
</div>
<div class="footer">
<p>This site uses <a href="https://angularjs.org/">Angular.js</a>, <a href="http://getbootstrap.com/">Bootstrap</a> and
<a href="https://developer.spotify.com/web-api/">Spotify web API</a>.
<br> Made for practice by Mikko Riippi.
</p>
</div>
</body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</html>