-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
131 lines (127 loc) · 8.73 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
<!DOCTYPE html>
<html lang="en-us" ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="hoangps, hoang, phan,hoangphan, music library,music,soundcloud">
<meta name="description" content="A handful music player application for web. Provide library functionality.">
<meta name="author" content="Hoang Phan">
<meta property="og:image" content="http://music.hoangps.com/favicon.png" />
<title>Music Library | HoangPS</title>
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous" />
<link rel="stylesheet" href="styles.css" />
<script src="angular.min.js"></script>
</head>
<body ng-controller="mainController"></body>
<div class="header">
<div class="container">
<h1>Music Library</h1>
</div>
</div>
<div id="content" class="container main-content">
<div>
<div class="alert-wrapper">
<div uib-alert ng-repeat="alert in alerts" ng-class="'alert-' + (alert.type || 'warning')" dismiss-on-timeout="5000" close="closeAlert($index)">{{alert.msg}}</div>
</div>
<search></search>
<div class="actions">
<a href="#" class="btn btn-default" ng-click="displayLibrary()" ng-hide="showLibrary">My music library</a>
<a href="#" class="btn btn-default" ng-click="hideLibrary()" ng-show="showLibrary && profileSelected">
Back to <strong>{{ !userProfile.full_name ? userProfile.username : userProfile.full_name }}</strong>
</a>
</div>
<div class="user-library" ng-show="showLibrary">
<div class="col-md-6">
<h2>Your Music Library</h2>
<span>You have <strong>{{library.playlists[0].originalTrackList.length || 0}}</strong> tracks in your library</span>
</div>
<div id="user-track-list" class="track-list col-md-6" ng-show="library.playlists[0].tracks.length > 0">
<h2>Your tracks</h2>
<ul>
<li ng-repeat="track in library.playlists[0].tracks">
<span class="btn-delete" ng-click="removeFromPlaylist(library.playlists[0].pageIndex*10 + $index)" title="Remove from playlist"></span>
<span class="btn-play" ng-click="player.play(library.playlists[0].originalTrackList, track)" ng-hide="track.id == player.track.id && player.isPlaying"></span>
<span class="btn-pause" ng-click="player.pause()" ng-show="track.id == player.track.id && player.isPlaying"></span>
<span><img ng-src="{{track.artwork_url}}" alt="{{track.title}}" class="artwork"/></span>
<span class="track-title">{{library.playlists[0].pageIndex*10 + $index + 1}}. <a href="javascript:void(0);" ng-click="selectProfile(track.user)">{{ !track.user.full_name ? track.user.username : track.user.full_name }}</a> - {{track.title}} - {{getTrackDuration(track.duration)}}</span>
</li>
</ul>
<library-pagination></library-pagination>
</div>
</div>
<div class="user-information row" ng-show="!showLibrary && profileSelected">
<div class="user-profile col-md-6">
<h2>User Profile</h2>
<div class="form-group">
<img ng-src="{{userProfile.avatar_url}}" />
<input type=hidden value="{{userProfile.id}}" />
<label class="profile-name">
<h3>{{ !userProfile.full_name ? userProfile.username : userProfile.full_name }}</h3>
<h4 ng-show="userProfile.full_name">({{ userProfile.username }})</h4>
<a href="{{userProfile.permalink_url}}" target="_blank">View profile</a>
</label>
</div>
<div class="form-group">
<input type="button" class="btn btn-default" value="View details" ng-click="showList('tracks', 'Tracks')"></input>
<label class="profile-stats"><strong>Tracks: </strong>{{ userProfile.track_count }}</label>
</div>
<div class="form-group">
<input type="button" class="btn btn-default" value="View details" ng-click="showList('playlists', 'Playlists')"></input>
<label class="profile-stats"><strong>Playlists: </strong>{{ userProfile.playlist_count }}</label>
</div>
<div class="form-group">
<input type="button" class="btn btn-default" value="View details" ng-click="showList('favorites', 'Likes')"></input>
<label class="profile-stats"><strong>Favorites: </strong>{{ userProfile.public_favorites_count }}</label>
</div>
<div class="user-playlists track-list" ng-show="selectedListType == 'playlists'">
<h3>Playlists</h3>
<ul>
<li ng-repeat="playlist in playlists">
<span class="btn-play" ng-click="selectPlaylist(playlist)" ng-hide="playlist.id == selectedPlaylistId && player.isPlaying"></span>
<span class="btn-pause" ng-click="player.pause()" ng-show="playlist.id == selectedPlaylistId && player.isPlaying"></span>
<span><img ng-src="{{playlist.artwork_url}}" alt="{{playlist.title}}" class="artwork"/></span>
<span class="track-title">{{$index + 1}}. <strong>{{playlist.title}}</strong> - {{playlist.tracks.length}} tracks - {{getTrackDuration(playlist.duration)}}</span>
</li>
</ul>
</div>
</div>
<div id="track-list" class="track-list col-md-6" ng-show="trackList.tracks.length > 0">
<h3>{{trackList.listName}}</h3>
<ul>
<li ng-repeat="track in trackList.tracks">
<span class="btn-add" ng-click="addToPlaylist(track)" title="Add to playlist"></span>
<span class="btn-play" ng-click="player.play(trackList.originalTrackList, track)" ng-hide="track.id == player.track.id && player.isPlaying"></span>
<span class="btn-pause" ng-click="player.pause()" ng-show="track.id == player.track.id && player.isPlaying"></span>
<!--<span class="track-index">{{trackList.pageIndex*10 + $index + 1}}</span>-->
<span><img ng-src="{{track.artwork_url}}" alt="{{track.title}}" class="artwork"/></span>
<span class="track-title">{{trackList.pageIndex*10 + $index + 1}}. <a href="javascript:void(0);" ng-click="selectProfile(track.user)">{{ !track.user.full_name ? track.user.username : track.user.full_name }}</a> - {{track.title}} - {{getTrackDuration(track.duration)}}</span>
</li>
</ul>
<pagination></pagination>
</div>
</div>
</div>
</div>
<div class="stats">
<div class="left">
<a title="web stats" href="http://statcounter.com/" target="_blank"><img src="//c.statcounter.com/11203517/0/57cc8636/0/" alt="web stats" style="border:none;"></a>
</div>
<div class="right">
<span class="credits">Developed by <a href="https://facebook.com/pshoang" target="_blank">HoangPS</a></span>
</div>
</div>
<footer-music-player></footer-music-player>
<script src="https://connect.soundcloud.com/sdk/sdk-3.1.2.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.11/ngStorage.min.js"></script>
<script src="app.js"></script>
<script src="services/stringCutFilter.js"></script>
<script src="services/anchorSmoothScrollService.js"></script>
<script src="services/angularMusicPlayer.js"></script>
<script src="ui-bootstrap-tpls-2.4.0.min.js"></script>
</body>
</html>