|
1 | 1 | <!doctype html>
|
2 |
| - |
3 |
| -<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]--> |
4 |
| -<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]--> |
5 |
| -<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]--> |
6 |
| -<!--[if IE 9]> <html lang="en" class="no-js ie9"> <![endif]--> |
7 |
| -<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> |
| 2 | +<html lang="en"> |
8 | 3 | <head>
|
9 | 4 | <meta charset="utf-8">
|
10 | 5 |
|
11 |
| - <title>Backbone Tunes</title> |
| 6 | + <title>Angular Tunes</title> |
12 | 7 | <meta name=" author" content=" David Goodlad <[email protected]>" >
|
| 8 | + <meta name=" author" content=" Igor Minar <[email protected]>" > |
13 | 9 |
|
14 | 10 | <link rel="stylesheet" href="style/screen.css" media="screen, projection">
|
15 | 11 | <link rel="stylesheet" href="style/fancypants.css" media="screen, projection">
|
16 | 12 |
|
17 |
| - <script src="js/vendor/modernizr-1.6.min.js"></script> |
18 |
| - <script src="js/vendor/jquery-1.5.1.min.js"></script> |
19 |
| - <script src="js/vendor/underscore.js"></script> |
20 |
| - <script src="js/vendor/backbone.js"></script> |
| 13 | + <script src="js/vendor/angular.js" ng:autobind></script> |
21 | 14 | <script src="js/Tunes.js"></script>
|
22 |
| - |
23 |
| - <script type="text/template" id="library-template"> |
24 |
| - <h1>Music Library</h1> |
25 |
| - <ul class="albums"></ul> |
26 |
| - </script> |
27 |
| - |
28 |
| - <script type="text/template" id="playlist-template"> |
29 |
| - <h1>Playlist</h1> |
30 |
| - <nav> |
31 |
| - <button class="control play">Play</button> |
32 |
| - <button class="control pause">Pause</button> |
33 |
| - <button class="control prev">Prev</button> |
34 |
| - <button class="control next">Next</button> |
35 |
| - </nav> |
36 |
| - <ul class="albums"> |
37 |
| - </ul> |
38 |
| - </script> |
39 |
| - |
40 |
| - <script type="text/template" id="album-template"> |
41 |
| - <button class="queue add"><img src="/images/add.png"></button> |
42 |
| - <button class="queue remove"><img src="/images/remove.png"></button> |
43 |
| - <span class="album-title"><%= title %></span> |
44 |
| - <span class="artist-name"><%= artist %></span> |
45 |
| - <ol class="tracks"> |
46 |
| - <% _.each(tracks, function(track) { %> |
47 |
| - <li><%= track.title %></li> |
48 |
| - <% }); %> |
49 |
| - </ol> |
50 |
| - </script> |
51 |
| - |
52 |
| - <script type="application/javascript"> |
53 |
| - jQuery(function() { |
54 |
| - window.library.fetch(); |
55 |
| - }); |
56 |
| - </script> |
57 | 15 | </head>
|
58 | 16 |
|
59 |
| - <body> |
| 17 | + <body ng:controller="TunesCtrl"> |
60 | 18 | <div id="container">
|
| 19 | + <div class="playlist"> |
| 20 | + <h1>Playlist</h1> |
| 21 | + <nav> |
| 22 | + <button class="control play" ng:click="player.play()" ng:hide="player.playing">Play</button> |
| 23 | + <button class="control pause" ng:click="player.pause()" ng:show="player.playing">Pause</button> |
| 24 | + <button class="control prev" ng:click="player.previous()">Prev</button> |
| 25 | + <button class="control next" ng:click="player.next()">Next</button> |
| 26 | + </nav> |
| 27 | + <ul class="albums"> |
| 28 | + <li class="album" ng:repeat="album in player.playlist" |
| 29 | + ng:class="player.current.album == $index && 'current'"> |
| 30 | + <button class="queue remove" ng:click="player.playlist.remove(album)"></button> |
| 31 | + <span class="album-title">{{album.title}}</span> |
| 32 | + <span class="artist-name">{{album.artist}}</span> |
| 33 | + <ol class="tracks"> |
| 34 | + <li ng:repeat="track in album.tracks" |
| 35 | + ng:class="player.current.track == $index && 'current'">{{track.title}}</li> |
| 36 | + </ol> |
| 37 | + </li> |
| 38 | + </ul> |
| 39 | + </div> |
| 40 | + <section class="library"> |
| 41 | + <h1>Music Library</h1> |
| 42 | + <ul class="albums"> |
| 43 | + <li class="album current" ng:repeat="album in albums"> |
| 44 | + <button class="queue add" ng:click="player.playlist.add(album)"></button> |
| 45 | + <span class="album-title">{{album.title}}</span> |
| 46 | + <span class="artist-name">{{album.artist}}</span> |
| 47 | + </li> |
| 48 | + </ul> |
| 49 | + </section> |
61 | 50 | </div>
|
62 | 51 | </body>
|
63 | 52 | </html>
|
0 commit comments