Browse Source

reset station HTML

unknown 9 năm trước cách đây
mục cha
commit
c205b8932f
3 tập tin đã thay đổi với 40 bổ sung42 xóa
  1. 20 25
      app/app.css
  2. 3 0
      app/app.html
  3. 17 17
      app/app.js

+ 20 - 25
app/app.css

@@ -298,40 +298,35 @@ footer a:hover{
 .button:hover {
   background-color: #f5f7f9;
 }
-#dashboard #name-container{
-  background-color: rgba(255,255,255,0.5);
-  width: 300px;
-  height: 60px;
-}
-#dashboard h1{
-  margin-left: 20px;
-  line-height: 60px;
-  color: white;
-  font-weight: 600;
-}
-#dashboard .logout{
+
+.logout{
   margin-left: 20px;
   cursor: pointer;
 }
-#dashboard .station{
-  
-}
-#dashboard .station:hover{
+.station{
   background-color: rgba(102,205,170,0.7);
+  height: 300px;
+  width: 300px;
+  border-radius: 100%;
+}
+.station-top{
+  height: 200px;
 }
-#dashboard .station .station-name{
+.station:hover{
 
 }
-#dashboard .station .song-info{
-  text-align: center;
+.station .station-name-container{
+  background-color: rgba(102,205,200,1);
+  border-radius: 20px;
+  width: 275px;
 }
-#dashboard .station .song-title{
+.station .station-name{
   font-size: 2.5em;
+  color: white;
+  text-align: center;
+  font-weight: 600;
 }
-#dashboard .station .song-artist{
-  font-size: 2em;
-}
-#dashboard .station .button-tunein{
+.station .button-tunein{
   outline: 0;
   border: 0;
   border: 2px solid white;
@@ -345,7 +340,7 @@ footer a:hover{
   display: block;
   margin: 0 auto;
 }
-#dashboard .station .controls{
+.station .controls{
   font-size: 2em;
   display: block;
   text-align: center;

+ 3 - 0
app/app.html

@@ -50,6 +50,9 @@
 
 <template name="dashboard">
   <div class="landing">
+    <div class="station">
+      <div class="station-name-container"><h3 class="station-name">EDM</h3></div>
+    </div>
 
     <ul class="bg-bubbles">
     	<li></li>

+ 17 - 17
app/app.js

@@ -1,6 +1,6 @@
 History = new Mongo.Collection("history");
 
-if (Meteor.isClient) {  
+if (Meteor.isClient) {
     Template.register.events({
         "submit form": function(e){
             e.preventDefault();
@@ -87,7 +87,7 @@ if (Meteor.isClient) {
             $("#stop").show();
         }
     });
-  
+
     Template.Room.helpers({
         type: function() {
             var parts = location.href.split('/');
@@ -98,7 +98,7 @@ if (Meteor.isClient) {
             return Session.get("duration");
         }
     });
-  
+
     var currentSong = undefined;
     var _sound = undefined;
     var size = 0;
@@ -106,24 +106,24 @@ if (Meteor.isClient) {
     function getTimeElapsed() {
         if (currentSong !== undefined) {
             return Date.now() - currentSong.started;
-        } 
+        }
         return 0;
     }
-  
+
     function startSong() {
         if (currentSong !== undefined) {
             if (_sound !== undefined)_sound.stop();
             SC.stream("/tracks/" + currentSong.song.id + "/", function(sound){
                 _sound = sound;
                 sound._player._volume = 0.3;
-                sound.play();
+                //sound.play();
                 setTimeout(function() { // HACK, otherwise seek doesn't work.
                     sound._player.seek(getTimeElapsed());
                 }, 500);
             });
         }
     }
-  
+
     Template.Room.onCreated(function () {
         /*var instance = this;
         HTTP.get('/api/room/edm', function (err, data) {
@@ -131,8 +131,8 @@ if (Meteor.isClient) {
           console.log(data);
           // PLAY SONG AND SUCH
         });*/
-        
-        
+
+
         /*console.log("Created!");
         Meteor.call("getDuration", function(err, res) {
             Session.set("duration", res);
@@ -156,10 +156,10 @@ if (Meteor.isClient) {
             });
         });*/
     });
-  
+
     Meteor.subscribe("history");
-  
-  
+
+
     Meteor.setInterval(function() {
         var data = History.findOne();
         if (data.history.length > size) {
@@ -171,7 +171,7 @@ if (Meteor.isClient) {
     //console.log(History, "History");
 }
 
-if (Meteor.isServer) { 
+if (Meteor.isServer) {
     var startedAt = Date.now();
     var songs = [{id: 172055891, duration: 20}, {id: 101244339, duration: 60}];
     var currentSong = 0;
@@ -195,7 +195,7 @@ if (Meteor.isServer) {
             skipSong();
         }, songs[currentSong].duration * 1000);
     }
-    
+
     ServiceConfiguration.configurations.remove({
         service: "facebook"
     });
@@ -215,10 +215,10 @@ if (Meteor.isServer) {
         clientId: "dcecd720f47c0e4001f7",
         secret: "375939d001ef1a0ca67c11dbf8fb9aeaa551e01b"
     });
-  
+
     songTimer();
-  
-    /*Meteor.methods({ 
+
+    /*Meteor.methods({
       getDuration: function() {
           return "100 minutes";
       },