diff --git a/source/app/metrics/utils.mjs b/source/app/metrics/utils.mjs index ab5a64d5..2964d3d7 100644 --- a/source/app/metrics/utils.mjs +++ b/source/app/metrics/utils.mjs @@ -28,14 +28,14 @@ } /**Formatter */ - export function format(n, {sign = false, unit = true} = {}) { + export function format(n, {sign = false, unit = true, fixed} = {}) { if (unit) { for (const {u, v} of [{u:"b", v:10**9}, {u:"m", v:10**6}, {u:"k", v:10**3}]) { if (n/v >= 1) - return `${(sign)&&(n > 0) ? "+" : ""}${(n/v).toFixed(2).substr(0, 4).replace(/[.]0*$/, "")}${u}` + return `${(sign)&&(n > 0) ? "+" : ""}${(n/v).toFixed(fixed ?? 2).substr(0, 4).replace(/[.]0*$/, "")}${u}` } } - return `${(sign)&&(n > 0) ? "+" : ""}${n}` + return `${(sign)&&(n > 0) ? "+" : ""}${fixed ? n.toFixed(fixed) : n}` } /**Bytes formatter */ diff --git a/source/templates/classic/partials/stock.ejs b/source/templates/classic/partials/stock.ejs index f25287c3..e356d53c 100644 --- a/source/templates/classic/partials/stock.ejs +++ b/source/templates/classic/partials/stock.ejs @@ -36,7 +36,7 @@ <% } else { %> <% } %> - <%= f(plugins.stock.delta.toFixed(2), {sign:true}) %> (<%= f((100*plugins.stock.delta/plugins.stock.price).toFixed(2), {sign:true}) %>%) + <%= f(plugins.stock.delta, {sign:true, fixed:2}) %> (<%= f(100*plugins.stock.delta/plugins.stock.price, {sign:true, fixed:2}) %>%) diff --git a/source/templates/classic/style.css b/source/templates/classic/style.css index 8ae3584b..6b2e6aea 100644 --- a/source/templates/classic/style.css +++ b/source/templates/classic/style.css @@ -132,7 +132,7 @@ /* Labels */ .label { - background-color: #F1F8FF; + background-color: #58A6FF30; color: #0366D6; padding: 0 10px; font-weight: 500; @@ -143,11 +143,6 @@ font-size: 12px; } - .label:hover { - background-color: #DDEEFF; - cursor: pointer; - } - /* Habits */ .habits { margin: 0; @@ -498,7 +493,7 @@ .repository .name span:last-child { color: #666666; - font-size: 13px; + font-size: 10px; } .repository .description {