From 5e1d516b9e0892ea0131a5e9c4ca91708cd8551c Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 1 Jun 2021 14:54:54 +0200 Subject: [PATCH] fixed text padding --- www/html.js | 4 +--- www/markdown.js | 2 +- www/textile.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/www/html.js b/www/html.js index 37d9634..c6c6b8f 100644 --- a/www/html.js +++ b/www/html.js @@ -95,9 +95,7 @@ function mapHtmlBinHashes(o, parent, num) { parent.appendChild(_ce("span", "log-notify", '- ' + o.filename + ' \n')); Object.keys(o).sort().forEach(function(k) { if (k == 'filename') return; - var rep = 5 - k.length; - if (rep < 0) rep = 0; - parent.appendChild(_ce("span", "log-notify", ' + ' + k + ": " + " ".repeat(rep) + o[k].toUpperCase() + '\n')); + parent.appendChild(_ce("span", "log-notify", ' + ' + k + ": " + " ".repeat(Math.max(8 - k.length, 0)) + o[k].toUpperCase() + '\n')); }); } diff --git a/www/markdown.js b/www/markdown.js index daebf44..5357645 100644 --- a/www/markdown.js +++ b/www/markdown.js @@ -109,7 +109,7 @@ function mapMarkdownBinHashes(o, num) { var t = o.filename + '\n'; Object.keys(o).sort().forEach(function(k) { if (k == 'filename') return; - t += ' ' + k + ": " + " ".repeat(Math.max(5 - k.length, 0)) + o[k].toUpperCase() + '\n'; + t += ' ' + k + ": " + " ".repeat(Math.max(8 - k.length, 0)) + o[k].toUpperCase() + '\n'; }); return t.trim(); } diff --git a/www/textile.js b/www/textile.js index d8f12bd..c2a947b 100644 --- a/www/textile.js +++ b/www/textile.js @@ -105,7 +105,7 @@ function mapTextileBinHashes(o, num) { var t = o.filename + '\n'; Object.keys(o).sort().forEach(function(k) { if (k == 'filename') return; - t += ' ' + k + ": " + " ".repeat(Math.max(5 - k.length, 0)) + o[k].toUpperCase() + '\n'; + t += ' ' + k + ": " + " ".repeat(Math.max(8 - k.length, 0)) + o[k].toUpperCase() + '\n'; }); return t.trim(); }