Commit 97f02612 authored by Jonas Haraldsson's avatar Jonas Haraldsson

tunebutton css

parent 3e5ab949
......@@ -103,7 +103,8 @@ function playerReady() {
// If logged in, enable tune buttons
if(ws_key) {
$('#artistname').css({'background' : '#ccc', 'border-radius' : '2px', 'padding' : '0px 2px'});
$('#tracktags').show();
$('#artistname').addClass('tunebutton');
$('#artistname').on('click', function(event) {
var artistname = event.target.textContent;
var artiststation = 'librefm://artist/' + artistname;
......@@ -306,12 +307,12 @@ function getTopTrackTags() {
if ('name' in tag_items) {
// not an array
var tagname = tag_items.name;
$('#tracktags ul').append('<li>' + tagname + '</li>');
$('#tracktags ul').append('<li class="tunebutton">' + tagname + '</li>');
}else{
var i;
for(i in tag_items) {
var tagname = tag_items[i].name;
$('#tracktags ul').append('<li>' + tagname + '</li>');
$('#tracktags ul').append('<li class="tunebutton">' + tagname + '</li>');
}
}
}
......
......@@ -138,6 +138,26 @@ body{ font:16px/24px sans-serif; }
overflow: hidden;
padding: 3px 5px;
}
#trackinfo > #tracktags {
display:none;
}
#trackinfo > #tracktags ul {
display:inline;
padding:0px;
margin:0px;
}
#trackinfo .tunebutton {
background: #eee;
cursor:pointer;
display:inline-block;
border-radius:2px;
padding:0px 2px;
margin:0px 2px;
}
#trackinfo .tunebutton:hover {
background:#ccc;
}
#player > #interface > #trackinfo > #playlist {
display: none;
}
......
......@@ -16,10 +16,6 @@
<span id="artistname"></span> - <span id="trackname"></span> <span id="showplaylist"><a href="#" onclick="togglePlaylist(); return false;"><img src="{$img_url}/player/show-playlist.png" alt="{t}Show playlist{/t}" title="{t}Show playlist{/t}" /></a></span><span id="hideplaylist"><a href="#" onclick="togglePlaylist(); return false;"><img src="{$img_url}/player/hide-playlist.png" alt="{t}Hide playlist{/t}" title="{t}Hide playlist{/t}" /></a></span>
{if $logged_in}
<div id="tracktags">
<style>
#tracktags ul { display:inline; margin:0px;}
#tracktags li { background:#ccc; display:inline; border-radius:2px; padding:0px 2px; margin:0px 2px;}
</style>
<ul>
</ul>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment