|
|
@ -22,10 +22,12 @@ const countdown = (target, heading) => {
|
|
|
|
|
|
|
|
|
|
|
|
if (heading === 1 || formatted.filter(timespan => timespan.substr(0, 1) == '-').length === 0) {
|
|
|
|
if (heading === 1 || formatted.filter(timespan => timespan.substr(0, 1) == '-').length === 0) {
|
|
|
|
return `
|
|
|
|
return `
|
|
|
|
<h${heading}>${formatted[0]} Days</h${heading}>
|
|
|
|
<span style="font-size:${Math.round(100 - 60 * (4 - 4 / heading) / 4)}%">
|
|
|
|
<h${heading}>${formatted[1]} Hours</h${heading}>
|
|
|
|
${formatted[0]} Days<br>
|
|
|
|
<h${heading}>${formatted[2]} Minutes</h${heading}>
|
|
|
|
${formatted[1]} Hours<br>
|
|
|
|
<h${heading}>${formatted[3]} Seconds</h${heading}>
|
|
|
|
${formatted[2]} Minutes<br>
|
|
|
|
|
|
|
|
${formatted[3]} Seconds<br>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|