2
0
unknown 9 жил өмнө
parent
commit
c3ac6dc091
3 өөрчлөгдсөн 45 нэмэгдсэн , 109 устгасан
  1. 7 49
      app/app.css
  2. 27 55
      app/app.html
  3. 11 5
      app/app.js

+ 7 - 49
app/app.css

@@ -329,62 +329,20 @@ footer a:hover{
     margin-top: -40px;
     font-size: 15px;
 }
-
-.station-top{
-  height: 200px;
-}
-.station:hover{
-
-}
-.station .station-name-container{
-  background-color: rgba(102,205,200,1);
-  border-radius: 20px;
-  width: 275px;
-}
-.station .station-name{
-  font-size: 2.5em;
+.room-name{
+  font-size: 3.5em;
   color: white;
-  text-align: center;
   font-weight: 600;
-}
-.station .button-tunein{
-  outline: 0;
-  border: 0;
-  border: 2px solid white;
-  padding: 10px 15px;
-  border-radius: 3px;
-  width: 250px;
-  cursor: pointer;
-  font-size: 18px;
-  color: #fff;
-  background-color: transparent;
-  display: block;
-  margin: 0 auto;
-}
-.station .controls{
-  font-size: 2em;
-  display: block;
   text-align: center;
 }
-.room-name{
-  font-size: 3.5em;
+.room-title{
+  font-size: 2.5em;
   color: white;
   font-weight: 600;
-  text-align: center;
 }
-.player{
-  width: 100%;
-  height: 60px;
-  border-top: 2px solid white;
-  position: absolute;
-  bottom: 0;
-}
-.seeker-bar{
-  width: 60%;
-  height: 5px;
-  margin: auto;
-  margin-top: 30px;
-  background-color: black;
+.room-artist{
+  font-size: 2em;
+  color: white;
 }
 @media (max-width: 992px) {
     .station {

+ 27 - 55
app/app.html

@@ -50,56 +50,32 @@
 
 <template name="dashboard">
   <div class="landing">
-<<<<<<< HEAD
-    <div class="station">
-
+    <div class="row">
+        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
+            <div class="station">
+                  <h3>Name</h3>
+                  <h5>Song</h5>
+            </div>
+        </div>
+        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
+            <div class="station">
+                  <h3>Name</h3>
+                  <h5>Song</h5>
+            </div>
+        </div>
+        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
+            <div class="station">
+                  <h3>Name</h3>
+                  <h5>Song</h5>
+            </div>
+        </div>
+        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
+            <div class="station">
+                  <h3>Name</h3>
+                  <h5>Song</h5>
+            </div>
+        </div>
     </div>
-=======
-      <!--ul>
-          <li class="station">
-              <h3>Name</h3>
-              <h5>Song</h5>
-          </li>
-          <li class="station">
-              <h3>Name</h3>
-              <h5>Song</h5>
-          </li>
-          <li class="station">
-              <h3>Name</h3>
-              <h5>Song</h5>
-          </li>
-          <li class="station">
-              <h3>Name</h3>
-              <h5>Song</h5>
-          </li>
-      </ul-->
-      <div class="row">
-          <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
-              <div class="station">
-                    <h3>Name</h3>
-                    <h5>Song</h5>
-              </div>
-          </div>
-          <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
-              <div class="station">
-                    <h3>Name</h3>
-                    <h5>Song</h5>
-              </div>
-          </div>
-          <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
-              <div class="station">
-                    <h3>Name</h3>
-                    <h5>Song</h5>
-              </div>
-          </div>
-          <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
-              <div class="station">
-                    <h3>Name</h3>
-                    <h5>Song</h5>
-              </div>
-          </div>
-      </div>
->>>>>>> 62401d89e4e278a4a04db28644b2306f623b619e
 
     <ul class="bg-bubbles">
     	<li></li>
@@ -161,12 +137,8 @@
 <template name="room">
   <div class="landing">
     <h1 class="room-name">{{{type}}}</h1>
-    <h2>{{{duration}}}</h2>
-    <div class="player">
-      <div class="seeker-bar">
-        <i id="dot" class="fa fa-circle"></i>
-      </div>
-    </div>
+    <h2 class="room-title">{{{title}}}</h2>
+    <h2 class="room-artist">{{{artist}}}</h2>
     <ul class="bg-bubbles">
       <li></li>
       <li></li>

+ 11 - 5
app/app.js

@@ -71,7 +71,6 @@ if (Meteor.isClient) {
 
         "click .button-tunein": function(){
             SC.stream("/tracks/172055891/", function(sound){
-                console.log(sound);
                 sound._player._volume = 0.3;
                 sound.play();
             });
@@ -99,8 +98,11 @@ if (Meteor.isClient) {
           var id = parts.pop();
           return id.toUpperCase();
         },
-        duration: function(){
-          return Session.get("duration");
+        title: function(){
+          return Session.get("title");
+        },
+        artist: function(){
+          return Session.get("artist");
         }
     });
 
@@ -123,9 +125,14 @@ if (Meteor.isClient) {
                     _sound = sound;
                     sound._player._volume = 0.3;
                     //sound.play();
+                    console.log(currentSong);
+                    Session.set("title", currentSong.song.title || "Title");
+                    Session.set("artist", currentSong.song.artist || "Artist");
+                    Session.set("albumArt", currentSong.song.albumArt);
                     Session.set("duration", currentSong.song.duration);
                     setTimeout(function() { // HACK, otherwise seek doesn't work.
                         sound._player.seek(getTimeElapsed());
+                        console.log(sound._player.seek(getTimeElapsed()));
                     }, 500);
                 });
             }
@@ -140,7 +147,6 @@ if (Meteor.isClient) {
                     data = doc;
                 }
             });
-            console.log(data);
             if (data.history.length > size) {
                 currentSong = data.history[data.history.length-1];
                 size = data.history.length;
@@ -152,7 +158,7 @@ if (Meteor.isClient) {
 
 if (Meteor.isServer) {
     var startedAt = Date.now();
-    var songs = [{id: 172055891, duration: 20}, {id: 194153620, duration: 60}];
+    var songs = [{id: 172055891, title: "Immortals", artist: "Fall Out Boy", duration: 90}];
     var currentSong = 0;
     addToHistory(songs[currentSong], startedAt);