mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added duration to songs
This commit is contained in:
@@ -17,6 +17,16 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-duration{
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0px;
|
||||||
|
right: 0px;
|
||||||
|
background: rgba(0,0,0,.7);
|
||||||
|
color: white;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.width25{
|
.width25{
|
||||||
width: 25% !important;
|
width: 25% !important;
|
||||||
}
|
}
|
||||||
|
|||||||
4
public/dist/embed.min.js
vendored
4
public/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/dist/main.min.js
vendored
8
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -154,6 +154,13 @@ var Helper = {
|
|||||||
return Math.floor(Math.random() * (max - min)) + min;
|
return Math.floor(Math.random() * (max - min)) + min;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
secondsToOther: function(seconds){
|
||||||
|
var time = seconds;
|
||||||
|
var minutes = Math.floor(time/60);
|
||||||
|
time = time - (minutes * 60);
|
||||||
|
return [minutes, time];
|
||||||
|
},
|
||||||
|
|
||||||
rgbToHsl: function(arr, light){
|
rgbToHsl: function(arr, light){
|
||||||
r = arr[0];
|
r = arr[0];
|
||||||
g = arr[1];
|
g = arr[1];
|
||||||
|
|||||||
@@ -843,6 +843,9 @@ var List = {
|
|||||||
}
|
}
|
||||||
attr = ".vote-container";
|
attr = ".vote-container";
|
||||||
del_attr = "del";
|
del_attr = "del";
|
||||||
|
|
||||||
|
var _temp_duration = Helper.secondsToOther(_song_info.duration);
|
||||||
|
song.find(".card-duration").text(Helper.pad(_temp_duration[0]) + ":" + Helper.pad(_temp_duration[1]));
|
||||||
}else if(!list){
|
}else if(!list){
|
||||||
song.find(".vote-text").text(_song_info.duration);
|
song.find(".vote-text").text(_song_info.duration);
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,11 @@
|
|||||||
<div id="list-song" class="card left-align list-song">
|
<div id="list-song" class="card left-align list-song">
|
||||||
<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('/public/images/loading.png');"></span>
|
<span class="lazy card-image cardbg list-image" style="background-image:url('/public/images/loading.png');">
|
||||||
|
<span class="card-duration">
|
||||||
|
01:00
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<span class="card-content">
|
<span class="card-content">
|
||||||
<span class="flow-text truncate list-title"></span>
|
<span class="flow-text truncate list-title"></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user