mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Better handling for frontpage-lists thumbnails
This commit is contained in:
@@ -78,20 +78,16 @@ var Frontpage = {
|
||||
var viewers = lists[x].viewers;
|
||||
var description = lists[x].description;
|
||||
var img;
|
||||
if(id.indexOf("soundcloud.com") > -1) {
|
||||
img = "background-image:url('https://img.youtube.com/vi/"+id+"/hqdefault.jpg');";
|
||||
if(lists[x].thumbnail && lists[x].thumbnail != "") {
|
||||
img = "background-image:url('" + lists[x].thumbnail + "');";
|
||||
} else {
|
||||
img = "background-image:url('https://img.youtube.com/vi/"+id+"/hqdefault.jpg');";
|
||||
if(lists[x].thumbnail) {
|
||||
img = "background-image:url('" + lists[x].thumbnail + "');";
|
||||
}
|
||||
}
|
||||
|
||||
var song_count = lists[x].count;
|
||||
var card = document.createElement("div");
|
||||
card.innerHTML += pre_card;
|
||||
//card.innerHTML = card.children[0];
|
||||
if(song_count > 4) {
|
||||
if(song_count > 3) {
|
||||
if(lists[x].pinned == 1) {
|
||||
card.querySelector(".pin").setAttribute("style", "display:block;");
|
||||
//card.find(".card").attr("title", "Featured list");
|
||||
|
||||
Reference in New Issue
Block a user