Prechádzať zdrojové kódy

report: half-star fix (inline background shorthand reset background-clip:text -> square; use background-image longhand + dim CanvasText right half); uniform hint spacing (94/100, single-space perf separators)

Alexander Korolev 1 mesiac pred
rodič
commit
23241ae3dd
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      src/report/page.html

+ 4 - 4
src/report/page.html

@@ -115,7 +115,7 @@ function starGlyphs(si) {
   for (let i = 1; i <= 5; i++) {
     if (si.s >= i) out += `<span style="color:${col}">★</span>`;
     else if (si.s >= i - 0.5)
-      out += `<span class="half" style="background:linear-gradient(90deg,${col} 50%,color-mix(in srgb,currentColor 25%,transparent) 50%)">★</span>`;
+      out += `<span class="half" style="background-image:linear-gradient(90deg,${col} 50%,color-mix(in srgb,CanvasText 30%,transparent) 50%)">★</span>`;
     else out += '<span class="dim">☆</span>';
   }
   return out;
@@ -383,7 +383,7 @@ function render() {
           ? r.incomplete
             ? '<span class="dim" title="bench started, not finished">◐</span>'
             : '<span class="dim" title="no bench reports">—</span>'
-          : `<span title="${si.pct} /100${pe && pe.points ? " (" + pe.points + ")" : ""}">${starGlyphs(si)}</span>`;
+          : `<span title="${si.pct}/100${pe && pe.points ? " (" + pe.points + ")" : ""}">${starGlyphs(si)}</span>`;
       } else if (v === "" || v == null) {
         body = '<span class="dim">—</span>';
       } else if (c[0] === "name") {
@@ -401,11 +401,11 @@ function render() {
       const lines = r.reports.map(e => {
         const fl = e.files && e.files.length ? e.files : [e.file];
         const ts = (e.perf && e.perf.length)
-          ? ` <span title="${esc(e.perf.map(p => "d" + p.d + " c" + p.c + ": " + p.tg + " t/s").join("  ·  "))}"> ${tg(e, 0, 1) ?? "—"} / ${tg(e, 0, 2) ?? "—"} t/s</span>`
+          ? ` <span title="${esc(e.perf.map(p => "d" + p.d + " c" + p.c + ": " + p.tg + " t/s").join(" · "))}"> ${tg(e, 0, 1) ?? "—"} / ${tg(e, 0, 2) ?? "—"} t/s</span>`
           : "";
         return `<span>${fl.map(f =>
           `<a class="open" href="/r/${encodeURIComponent(r.name)}/${encodeURIComponent(f)}" target="_blank" title="open ${esc(f)}">${esc(f.split('.').pop())}</a>`).join(" ")}</span> ` +
-        `${esc(e.date)}${e.time ? "·" + esc(e.time) : ""} ${esc(e.label)} — ${e.pct != null ? esc(e.pct) + " /100" : '<span class="dim">no score</span>'}${e.points ? " (" + esc(e.points) + ")" : ""}${ts}`;
+        `${esc(e.date)}${e.time ? "·" + esc(e.time) : ""} ${esc(e.label)} — ${e.pct != null ? esc(e.pct) + "/100" : '<span class="dim">no score</span>'}${e.points ? " (" + esc(e.points) + ")" : ""}${ts}`;
       }).join("<br>");
       out.push(`<tr class="hist"><td colspan="${vis.length}">${r.reports.length ? toml + " " + lines : "no reports"}</td></tr>`);
     }