🐛 Fix: deformed numeric figure values of site run time

This commit is contained in:
Cell
2022-01-16 15:35:39 +08:00
parent 58e4397fbe
commit 152ea41b7c
3 changed files with 6 additions and 2 deletions
+4
View File
@@ -22,6 +22,10 @@ footer {
animation: icon-animate 1.33s ease-in-out infinite;
}
.run-times {
font-variant-numeric: tabular-nums lining-nums;
}
}
}
+1 -1
View File
@@ -242,7 +242,7 @@
hours = Math.floor(runTime / 60 / 60 - (24 * days)),
minutes = Math.floor(runTime / 60 - (24 * 60 * days) - (60 * hours)),
seconds = Math.floor((now - run) / 1000 - (24 * 60 * 60 * days) - (60 * 60 * hours) - (60 * minutes));
document.querySelector(".run-times").innerHTML = `${days}d ${String(hours).padStart(2,0)}h ${String(minutes).padStart(2,0)}m ${String(seconds).padStart(2,0)}s`;
document.querySelector(".run-times").innerHTML = `${days},${String(hours).padStart(2,0)}:${String(minutes).padStart(2,0)}:${String(seconds).padStart(2,0)}`;
}
{{- end -}}
+1 -1
View File
@@ -57,7 +57,7 @@
></span>
{{- if .Site.Params.ibruce.siteTime -}}
<span class="site-time footer-divider" title={{ T "siteRuning" }}
></span><i class="fas fa-heartbeat animate-icon"></i>
><i class="fas fa-heartbeat animate-icon"></i>
<span class="run-times">Loading...</span
></span>
{{- end -}}