Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

KrisVos130 9 vuotta sitten
vanhempi
sitoutus
3315129552

+ 7 - 6
app/client/app.css

@@ -1286,15 +1286,13 @@ nav form input[type="image"]{
 }
 
 .contact-name {
-    margin-left: 30px;
-    margin-top: 35px;
     float: left;
-    height: 90px;
-    margin-bottom: 0;
 }
 
 .contact-img {
     float: left;
+    margin-bottom: 20px;
+    margin-right: 20px;
 }
 
 .contact-ul {
@@ -1316,7 +1314,10 @@ nav form input[type="image"]{
     height: 28px;
     font-size: 28px !important;
 }
-
+.contact-pos {
+    padding-top: -10px;
+    margin-top: 70px;
+}
 .settings-label {
     color: #50a3a2;
     line-height: 18px;
@@ -1363,4 +1364,4 @@ nav form input[type="image"]{
 
 #banned-container {
     color: white;
-}
+}

+ 19 - 0
app/client/client.js

@@ -82,6 +82,21 @@ Template.profile.helpers({
             })
         });
         return likedArr;
+    },
+    dislikedSongs: function(){
+        var dislikedArr = [];
+        Session.get("disliked").forEach(function(mid){
+            Rooms.find().forEach(function(room){
+                Playlists.find({type: room.type}).forEach(function(pl){
+                    for(var i in pl.songs){
+                        if(pl.songs[i].mid === mid){
+                            dislikedArr.push({title: pl.songs[i].title, artist: pl.songs[i].artist, room: room.display});
+                        }
+                    }
+                });
+            })
+        });
+        return dislikedArr;
     }
 });
 
@@ -98,6 +113,7 @@ Template.profile.onCreated(function() {
             Session.set("first_joined", data.createdAt);
             Session.set("rank", data.profile.rank);
             Session.set("liked", data.profile.liked);
+            Session.set("disliked", data.profile.disliked);
             Session.set("loaded", true);
         }
     });
@@ -1277,6 +1293,9 @@ Template.playlist.events({
                 }
             })
         }
+    },
+    "click #pl-item": function(){
+        console.log($(this).text());
     }
 })
 

+ 4 - 0
app/client/templates/contact.html

@@ -7,6 +7,7 @@
                 <!-- Akira -->
                 <img height="100px" width="100px" class="img-circle contact-img" src="https://avatars0.githubusercontent.com/u/11958359?v=3&s=460" itemprop="image"/>
                 <h2 class="contact-name" itemprop="name">Akira Laine</h2>
+                <h3 class="contact-pos">Co Founder, Lead Developer & Whovian</h3>
                 <ul class="contact-ul">
                     <li class="contact-option place-contact"><i class="fa fa-2x fa-map-marker contact-icon"></i> <span itemprop="address">Noumea, New Caledonia</span></li>
                     <li class="contact-option email-contact"><i class="fa fa-2x fa-envelope contact-icon"></i> <span itemprop="email">Akira_Laine@outlook.com</span></li>
@@ -17,6 +18,7 @@
                 <!-- Kris -->
                 <img height="100px" width="100px" class="img-circle contact-img" src="https://avatars2.githubusercontent.com/u/9784561?v=3&s=460" itemprop="image"/>
                 <h2 class="contact-name" itemprop="name">Kristian Vos</h2>
+                <h3 class="contact-pos">Co Founder, Lead Developer & Fox</h3>
                 <ul class="contact-ul">
                     <li class="contact-option place-contact"><i class="fa fa-2x fa-map-marker contact-icon"></i> <span itemprop="address">Haarlem, The Netherlands</span></li>
                     <li class="contact-option email-contact"><i class="fa fa-2x fa-envelope contact-icon"></i> <span itemprop="email">KrisVos130@gmail.com</span></li>
@@ -29,6 +31,7 @@
                 <!-- Johand -->
                 <img height="100px" width="100px" class="img-circle contact-img" src="https://avatars2.githubusercontent.com/u/6952369?v=3&s=460" itemprop="image"/>
                 <h2 class="contact-name" itemprop="name">Johannes Andersen</h2>
+                <h3 class="contact-pos">Co Founder, Lead Developer & Marketing Mangager</h3>
                 <ul class="contact-ul">
                     <li class="contact-option place-contact"><i class="fa fa-2x fa-map-marker contact-icon"></i> <span itemprop="address">Fredrikstad, Norway</span></li>
                     <li class="contact-option email-contact"><i class="fa fa-2x fa-envelope contact-icon"></i> <span itemprop="email">Johand@johand.me</span></li>
@@ -40,6 +43,7 @@
                 <!-- Wesley -->
                 <img height="100px" width="100px" class="img-circle contact-img" src="https://avatars0.githubusercontent.com/u/1158013?v=3&s=460" itemprop="image"/>
                 <h2 class="contact-name" itemprop="name">Wesley McCann</h2>
+                <h3 class="contact-pos">Web Developer</h3>
                 <ul class="contact-ul">
                     <li class="contact-option place-contact"><i class="fa fa-2x fa-map-marker contact-icon"></i> <span itemprop="address">USA</span></li>
                 </ul>

+ 13 - 1
app/client/templates/profile.html

@@ -6,7 +6,7 @@
         {{#if loaded}}
             <h1 id="profile-name">{{username}}</h1>
 
-            <div class="col-md-4 col-md-offset-2">
+            <div class="col-md-4">
                 <div class="panel panel-primary">
                     <div class="panel-heading">Basic Info</div>
                     <div class="panel-body">
@@ -29,6 +29,18 @@
                     </div>
                 </div>
             </div>
+            <div class="col-md-4">
+                <div class="panel panel-danger">
+                    <div class="panel-heading">Disliked Songs</div>
+                    <div class="panel-body">
+                        <ul>
+                            {{#each dislikedSongs}}
+                                <li>{{title}} - {{artist}} - {{room}}</li>
+                            {{/each}}
+                        </ul>
+                    </div>
+                </div>
+            </div>
         {{else}}
             {{> loading}}
         {{/if}}