Waves-effeeeect

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-30 17:34:38 +02:00
parent 7678ce5dbe
commit 52218cafaf
5 changed files with 16 additions and 12 deletions

View File

@@ -1642,7 +1642,7 @@ nav ul li:hover, nav ul li.active {
.card-image{cursor:pointer} .card-image{cursor:pointer}
.card{ .card{
margin:5px 0 5px 0 !important; margin:2.5px 0 2.5px 0 !important;
overflow:hidden; overflow:hidden;
transition: box-shadow 0s; transition: box-shadow 0s;
} }
@@ -1675,6 +1675,10 @@ nav ul li:hover, nav ul li.active {
color:white; color:white;
} }
.list-song {
width: 100%;
}
.open-externally:hover { .open-externally:hover {
color:orange; color:orange;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -67,7 +67,7 @@ var List = {
var i = List.getIndexOfSong(song_info.id); var i = List.getIndexOfSong(song_info.id);
var display = "none"; var display = "none";
if(!song_info.now_playing){ if(!song_info.now_playing){
if(i >= List.page && i < List.page + (List.can_fit)) display = "block" if(i >= List.page && i < List.page + (List.can_fit)) display = "inline-block"
var add = List.generateSong(song_info, transition, false, true, false, display, false); var add = List.generateSong(song_info, transition, false, true, false, display, false);
if(i === 0) { if(i === 0) {
$("#wrapper").prepend(add); $("#wrapper").prepend(add);
@@ -76,12 +76,12 @@ var List = {
} }
var added = $("#wrapper").children()[i]; var added = $("#wrapper").children()[i];
$(added).css("display", display); $(added).css("display", display);
if(display == "block" && $("#wrapper").children().length >= List.page + List.can_fit + 1){ if(display == "inline-block" && $("#wrapper").children().length >= List.page + List.can_fit + 1){
$($("#wrapper").children()[List.page + List.can_fit]).css("display", "none"); $($("#wrapper").children()[List.page + List.can_fit]).css("display", "none");
} else if(i < List.page && $("#wrapper").children().length - (List.page + 1) >= 0){ } else if(i < List.page && $("#wrapper").children().length - (List.page + 1) >= 0){
$($("#wrapper").children()[List.page]).css("display", "block"); $($("#wrapper").children()[List.page]).css("display", "inline-block");
} else if($("#wrapper").children().length > List.page + List.can_fit){ } else if($("#wrapper").children().length > List.page + List.can_fit){
$($("#wrapper").children()[List.page + List.can_fit - 1]).css("display", "block"); $($("#wrapper").children()[List.page + List.can_fit - 1]).css("display", "inline-block");
} }
if(change && List.page > 0){ if(change && List.page > 0){
$($("#wrapper").children()[List.page - 1]).css("display", "none"); $($("#wrapper").children()[List.page - 1]).css("display", "none");
@@ -333,11 +333,11 @@ var List = {
if(index < List.page && $("#wrapper").children().length - (List.page + 2) >= 0){ if(index < List.page && $("#wrapper").children().length - (List.page + 2) >= 0){
$($("#wrapper").children()[List.page]).css("height", 0); $($("#wrapper").children()[List.page]).css("height", 0);
$($("#wrapper").children()[List.page]).css("display", "block"); $($("#wrapper").children()[List.page]).css("display", "inline-block");
$($("#wrapper").children()[List.page]).css("height", List.element_height); $($("#wrapper").children()[List.page]).css("height", List.element_height);
} else if($("#wrapper").children().length > List.page + (List.can_fit)){ } else if($("#wrapper").children().length > List.page + (List.can_fit)){
$($("#wrapper").children()[List.page + (List.can_fit)]).css("height", 0); $($("#wrapper").children()[List.page + (List.can_fit)]).css("height", 0);
$($("#wrapper").children()[List.page + (List.can_fit)]).css("display", "block"); $($("#wrapper").children()[List.page + (List.can_fit)]).css("display", "inline-block");
$($("#wrapper").children()[List.page + (List.can_fit)]).css("height", List.element_height); $($("#wrapper").children()[List.page + (List.can_fit)]).css("height", List.element_height);
} }
@@ -375,9 +375,9 @@ var List = {
if(!List.empty){ if(!List.empty){
$("#"+deleted).remove(); $("#"+deleted).remove();
if(index < List.page && $("#wrapper").children().length - (List.page + 1) >= 0){ if(index < List.page && $("#wrapper").children().length - (List.page + 1) >= 0){
$($("#wrapper").children()[List.page - 1]).css("display", "block"); $($("#wrapper").children()[List.page - 1]).css("display", "inline-block");
} else if($("#wrapper").children().length > List.page + List.can_fit){ } else if($("#wrapper").children().length > List.page + List.can_fit){
$($("#wrapper").children()[List.page + (List.can_fit - 1)]).css("display", "block"); $($("#wrapper").children()[List.page + (List.can_fit - 1)]).css("display", "inline-block");
} }
if(chromecastAvailable){ if(chromecastAvailable){
Player.sendNext({title: full_playlist[0].title, videoId: full_playlist[0].id}); Player.sendNext({title: full_playlist[0].title, videoId: full_playlist[0].id});

View File

@@ -225,7 +225,7 @@
</div> </div>
<div id="wrapper" class="tabs_height"> <div id="wrapper" class="tabs_height">
<div id="list-song-html"> <div id="list-song-html">
<div id="list-song" class="card left-align list-song"> <div id="list-song" class="card left-align list-song waves-effect waves-light">
<div class="clickable vote-container" title="Vote!"> <div class="clickable vote-container" title="Vote!">
<a class="clickable center-align votebg"> <a class="clickable center-align votebg">
<span class="lazy card-image cardbg list-image" style="background-image:url('/assets/images/loading.png');"> <span class="lazy card-image cardbg list-image" style="background-image:url('/assets/images/loading.png');">