Explorar o código

Merge remote-tracking branch 'origin/master'

Conflicts:
	app/templates/room.html
KrisVos130 %!s(int64=9) %!d(string=hai) anos
pai
achega
821db449c3
Modificáronse 3 ficheiros con 73 adicións e 10 borrados
  1. 41 2
      app/app.css
  2. 26 3
      app/app.js
  3. 6 5
      app/templates/room.html

+ 41 - 2
app/app.css

@@ -472,6 +472,32 @@ form button:hover {
     animation-delay: 11s;
 }
 
+/* Tablet view fix */
+@media (max-width: 768px){
+    #station-main nav h3{
+        margin-left: 20% !important;
+    }
+    .bg-bubbles li:nth-child(10) {
+        display: none;
+    }
+    #song-media{
+        margin-left: 0;
+    }
+    #song-info{
+        margin: 15px auto;
+        width: 200px;
+    }
+    #settings{
+        margin: 0 auto !important;
+        width: 300px !important;
+        margin-bottom: 100px !important;
+    }
+    #side-panel{
+        display: none;
+    }
+}
+/**/
+
 @-webkit-keyframes square {
     0% {
         -webkit-transform: translateY(0);
@@ -520,14 +546,14 @@ form button:hover {
 footer {
     text-align: center;
     width: 100%;
-    height: 60px;
+    height: 75px;
     margin-top: 75px;
     color: white;
     padding-top: 5px;
 }
 
 .push {
-    height: 60px; /* .push must be the same height as .footer */
+    height: 75px; /* .push must be the same height as .footer */
 }
 
 footer a {
@@ -916,6 +942,19 @@ footer .fa {
     color: white;
 }
 
+/*Navbar HAMBURGUR*/
+.navbar-default .navbar-toggle .icon-bar{
+    background-color: white;
+}
+
+.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus{
+    background-color: transparent;
+}
+
+.navbar-default .navbar-toggle{
+    background-color: transparent;
+}
+
 #station-main nav i {
     margin-left: 1em;
     font-size: 2em;

+ 26 - 3
app/app.js

@@ -245,6 +245,30 @@ if (Meteor.isClient) {
             });
             $("#close-modal-a").click();
         },
+        "click #smile-modal": function(e){
+            e.preventDefault();
+            if (Session.get("smileClicked")) {
+                $("#smile-modal").removeClass("active");
+                Session.set("smileClicked", false);
+            } else {
+				$("#meh-modal").removeClass("active");
+				Session.set("mehClicked", false);
+                $("#smile-modal").addClass("active");
+                Session.set("smileClicked", true);
+            }
+        },
+        "click #meh-modal": function(e){
+            e.preventDefault();
+            if (Session.get("mehClicked")) {
+                $("#meh-modal").removeClass("active");
+                Session.set("mehClicked", false);
+            } else {
+				$("#smile-modal").removeClass("active");
+				Session.set("smileClicked", false);
+                $("#meh-modal").addClass("active");
+                Session.set("mehClicked", true);
+            }
+        },
         "click #toggle-video": function(e){
             e.preventDefault();
             if (Session.get("mediaHidden")) {
@@ -973,10 +997,10 @@ if (Meteor.isServer) {
         reCAPTCHA.config({
             privatekey: '6LcVxg0TAAAAAI2fgIEEWHFxwNXeVIs8mzq5cfRM'
         });
-        var stations = [{tag: "edm", dislay: "EDM"}, {tag: "pop", display: "Pop"}]; //Rooms to be set on server startup
+        var stations = [{tag: "edm", display: "EDM"}, {tag: "pop", display: "Pop"}]; //Rooms to be set on server startup
         for(var i in stations){
             if(Rooms.find({type: stations[i]}).count() === 0){
-                createRoom(stations[i].tag, stations[i].display);
+                createRoom(stations[i].display, stations[i].tag);
             }
         }
     });
@@ -1180,7 +1204,6 @@ if (Meteor.isServer) {
         query = query.toLowerCase().split(" ").join("%20");
 
         var res = Meteor.http.get('https://api.spotify.com/v1/search?q=' + query + '&type=track');
-
         for(var i in res.data){
             for(var j in res.data[i].items){
                 if(search.indexOf(res.data[i].items[j].name) !== -1 && artistName.indexOf(res.data[i].items[j].artists[0].name) !== -1){

+ 6 - 5
app/templates/room.html

@@ -31,7 +31,7 @@
                                 <!--div id="player" class="embed-responsive-item"></div-->
                             </div>
                         </div>
-                        <div class="col-md-4" style="margin-top:15px">
+                        <div id="song-info" class="col-md-4" style="margin-top:15px">
                           <img class="song-img" onError="this.src='http://static.boredpanda.com/blog/wp-content/uploads/2014/04/amazing-fox-photos-182.jpg'" id="song-img"/>
                           <h2 class="room-title">{{{title}}}</h2>
                           <h2 class="room-artist">{{{artist}}}</h2>
@@ -50,11 +50,12 @@
                         </div>
                         <div class="col-md-3">
                             {{#if currentUser}}
-							<button title="Smile to this song." type="button" id="song-modal" class="btn btn-success btn-lg" data-toggle="modal" data-target="#myModal"><i class="fa fa-smile-o"> 79</i></button>
-                            <button title="I dislike this song." type="button" id="song-modal" class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModal"><i class="fa fa-meh-o"> 14</i></button>
+                            <button title="Smile to this song." type="button" id="smile-modal" class="btn btn-success btn-lg"><i class="fa fa-smile-o"> 79</i></button>
+                            <button title="I dislike this song." type="button" id="meh-modal" class="btn btn-danger btn-lg"><i class="fa fa-meh-o"> 14</i></button>
                             {{else}}
-                            <button title="You need to be logged to smile to this song." type="button" id="song-modal" class="btn btn-success btn-lg" data-toggle="modal" data-target="#myModal" disabled><i class="fa fa-smile-o"> 79</i></button>
-                            <button title="You need to be logge to dislike this song." type="button" id="song-modal" class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModal" disabled><i class="fa fa-meh-o"> 14</i></button>
+                            <button title="You need to be logged to smile this song." type="button" id="smile-modal" class="btn btn-success btn-lg" data-toggle="modal" data-target="#myModal" disabled><i class="fa fa-smile-o"> 79</i></button>
+                            <button title="You need to be logged to dislike this song." type="button" id="meh-modal" class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModal" disabled><i class="fa fa-meh-o"> 14</i></button>
+							<button title="You need to be logged to report this song!" type="button" id="song-modal" class="btn btn-warning btn-lg" data-toggle="modal" data-target="#myModal" disabled><i class="fa fa-flag"></i></button>
 							{{/if}}
                             <button title="Report this song!" type="button" id="report-modal" class="btn btn-warning btn-lg report-button" data-toggle="modal" data-target="#reportModal"><i class="fa fa-flag"></i></button>
                         </div>