Refactoring html generation + categories

This commit is contained in:
relikd
2020-09-23 17:13:33 +02:00
parent 46a196c3c4
commit 8fef0cb33f
14 changed files with 628 additions and 364 deletions

View File

@@ -12,7 +12,7 @@ function lookup_rank_js(bundle_id) {
function update(i, id, fmt=String) {
let r = (rank[i] - 1) / (rank_max - 1);
let target = document.getElementById(id);
let bar = target.querySelector('.percentile');
let bar = target.querySelector('.pcbar');
bar.classList.add(r < 0.5 ? 'g' : 'b');
bar.firstChild.style.left = r * 100 + '%';
let meta = target.lastElementChild.children;