From da8c4f40b5c1ca53844618314b52ff7df970d4d6 Mon Sep 17 00:00:00 2001 From: Pepf Date: Sat, 26 Jul 2014 01:10:27 +0200 Subject: [PATCH] More UI polishing --- client/lib/globalhelpers.html | 7 +++ client/lib/globalhelpers.js | 13 +++-- client/stylesheets/fusic.import.less | 10 ++++ client/views/playlist.css | 6 ++ client/views/playlists.html | 83 +++++++++++++--------------- client/views/playlists.js | 23 ++++++-- client/views/userProfile.html | 6 +- 7 files changed, 91 insertions(+), 57 deletions(-) diff --git a/client/lib/globalhelpers.html b/client/lib/globalhelpers.html index f73a587..ac6d081 100644 --- a/client/lib/globalhelpers.html +++ b/client/lib/globalhelpers.html @@ -1,3 +1,10 @@ + + + \ No newline at end of file diff --git a/client/lib/globalhelpers.js b/client/lib/globalhelpers.js index c96a32a..0ce9298 100644 --- a/client/lib/globalhelpers.js +++ b/client/lib/globalhelpers.js @@ -39,13 +39,13 @@ Handlebars.registerHelper('privacyIcon', function(playlist) { return ''; }); -Template.userProfile.avatarUrl = function() { - if(this.profile.avatar) { - return this.profile.avatar; +Handlebars.registerHelper('avatarUrl', function(user) { + if(user.profile.avatar) { + return user.profile.avatar; } else { return "/img/avatar.jpg"; } -}; +}); Handlebars.registerHelper('currentRoute', function() { var currentRoute = Router.current(); @@ -57,3 +57,8 @@ Handlebars.registerHelper('currentRoute', function() { Handlebars.registerHelper('sessionIs', function(p1, p2) { return Session.get(p1) === p2; }); + + +Template.circleAvatar.rendered = function() { + $('div.avatar').tooltip(); +} diff --git a/client/stylesheets/fusic.import.less b/client/stylesheets/fusic.import.less index 18f8ec7..61216e9 100644 --- a/client/stylesheets/fusic.import.less +++ b/client/stylesheets/fusic.import.less @@ -1,3 +1,13 @@ +#playlistName:hover a#editToggle { + opacity:1; +} +a#editToggle { + font-size:0.5em; + opacity:0; + cursor:pointer; + transition: all 0.33s ease; +} + img.avatar { background-color:@gray-lighter; width:300px; diff --git a/client/views/playlist.css b/client/views/playlist.css index b30ad76..2e52aef 100644 --- a/client/views/playlist.css +++ b/client/views/playlist.css @@ -10,6 +10,7 @@ div.inline { display:inline-block; } + .overlay-container { position:relative; } @@ -22,6 +23,8 @@ div.inline { padding: 4px; } + + .playlist-container:hover { background-color: #eee; } @@ -59,6 +62,9 @@ li.youtube-result:hover { background-color:#eee; } + + + span[data-action*="play"] { cursor:pointer; } diff --git a/client/views/playlists.html b/client/views/playlists.html index 300dbb7..19aa819 100644 --- a/client/views/playlists.html +++ b/client/views/playlists.html @@ -69,10 +69,13 @@

All playlists