/
index.html
175 lines (154 loc) · 5.96 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
170
171
172
173
174
175
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>ngMusicPlayer</title>
<!-- Styling -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="assets/style.css" />
</head>
<body ng-controller="appCtrl">
<!-- Initalize SoundManager -->
<sound-manager></sound-manager>
<!-- Background -->
<img id="bg" ng-src="{{currentPlaying.albumart}}" />
<!-- Navbar (Top) -->
<div class="navbar-fixed">
<nav id="nav-top">
<div class="nav-wrapper black">
<a href="#!" class="brand-logo"><i class="material-icons">library_music</i>Logo</a>
<form id="search-bar">
<div class="input-field">
<input id="search" type="search" ng-model="search" required>
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
</form>
<div></div>
</div>
</nav>
</div>
<!-- Music Player (Bottom) -->
<div class="navbar-fixed" id="nav-bottom">
<nav id="music-player">
<div class="nav-wrapper black row">
<img class="col s1" ng-src="{{ currentPlaying.albumart }}" />
<div class="col s2" id="nav-metadata">
{{ currentPlaying.title }} <br/> {{ currentPlaying.artist }}
</div>
<div class="col s5">
<div class="progress player-seek grey darken-2" seek-track>
<div class="determinate white" ng-style="{width : ( progress + '%' ) }"></div>
</div>
</div>
<div class="col s2 player-ctrl row">
<i class="material-icons col" prev-track>skip_previous</i>
<i ng-show="!isPlaying" class="material-icons col large-icons" play-music>play_arrow</i>
<i ng-show="isPlaying" class="material-icons col large-icons" pause-music>pause</i>
<i class="material-icons col" next-track>skip_next</i>
</div>
<div class="col s2 player-ctrl row">
<i class="material-icons col" repeat-music>repeat</i>
<i ng-show="!mute" class="material-icons col" mute-music>volume_up</i>
<i ng-show="mute" class="material-icons col" mute-music>volume_off</i>
</div>
</div>
</nav>
</div>
<!-- Song Cards -->
<div class="container row">
<div class="col s8">
<div class="card horizontal" ng-mouseover="songHover = true" ng-mouseleave="songHover = false" ng-repeat="song in songs | filter: search">
<div class="card-image">
<img src="{{ song.albumart }}">
</div>
<div class="card-stacked black text-white">
<div class="card-content">
<h5>{{ song.title }}</h5><br/>
<i>
{{ song.artist }}<br/>{{ song.album }}<br/>
</i>
<div class="right" ng-show="songHover">
<i class="material-icons" music-player add-song="song">playlist_add</i>
<i class="material-icons" music-player="play" add-song="song">play_arrow</i>
</div>
</div>
</div>
</div>
</div>
<!-- [WIP] Playlist Feature
<div class="col s4">
<ul class="collection with-header">
<li class="collection-header">
<h5>First Names</h5>
</li>
<li class="collection-item">
<div>Alvin<a href="#!" class="secondary-content"><i class="material-icons">send</i></a></div>
</li>
<li class="collection-item">
<div>Alvin<a href="#!" class="secondary-content"><i class="material-icons">send</i></a></div>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h5>Songs</h5>
<ul>
<li ng-repeat="song in songs | filter: search">
<button music-player="play" add-song="song">{{ song.title }}</button>
<button music-player add-song="song">+</button>
</li>
</ul>
<button play-all="songs">Play all</button>
<button play-all="songs" data-play="false">Add all</button>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-12">
<p>
Currently Playing: {{ currentPlaying.title }} by {{ currentPlaying.artist }} ({{ currentPostion }} / {{ currentDuration }})
</p>
<div class="seekBase progress" seek-track>
<div class="seekLoad progress-bar" ng-style="{width : ( progress + '%' ) }"></div>
</div>
<br />
<button play-music>Play</button> -
<button pause-music>Pause</button> -
<button stop-music>Stop</button> -
<button repeat-music>Repeat ({{ repeat }})</button> -
<button play-pause-toggle data-play="Play!" data-pause="Pause!">Play Toggle</button> Is Playing: {{ isPlaying }}
<br/>
<br/>Volume: {{ volume }} -
<button music-volume data-type="increase">+</button> -
<button music-volume data-type="decrease">-</button> -
<button mute-music>Mute ({{ mute }})</button>
<br/>
<br/>
<button prev-track>Prev Track</button> -
<button next-track>Next Track</button> -
<button clear-playlist>Clear Playlist</button>
<br/>
<br/>
<h5>Playlist</h5>
<ul>
<li ng-repeat="song in playlist">
<a play-from-playlist="song">{{ song.title }}</a> -
<a remove-from-playlist="song" data-index="{{$index}}">
<small>(remove)</small>
</a>
<span ng-if="currentPlaying.id == song.id"> - (current)</span>
</li>
</ul>
</div>
</div>
-->
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"></script>
<script src="dist/angular-soundmanager2.min.js"></script>
<script src="assets/app.js"></script>
</body>
</html>