From be2d38d2ebf338843ba46d9693571536a546ba4e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 14 Oct 2018 20:59:39 +0200 Subject: [PATCH] =?utf8?q?Bring=20back=20Lato=20(for=20Tr=C3=B8ndisk).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- score.css | 16 ++++++++++------ score.html | 3 ++- score.js | 24 ++++++++++++++---------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/score.css b/score.css index c596902..759e07e 100644 --- a/score.css +++ b/score.css @@ -14,8 +14,12 @@ body { transform-origin: top left; */ } body { - font-family: 'Exo', sans-serif; + font-family: 'Lato', sans-serif; color: white; + + /* Needs to be adjusted per-font! 2px/4px is a good choice for Exo. */ + --main-padding-top-adjust: 0px; + --main-padding-top-large-adjust: 0px; } /* Score */ @@ -50,14 +54,14 @@ body { text-align: center; height: 35px; background: linear-gradient(to bottom, #00a, #008); - padding-top: 2px; /* needs to be adjusted per-font! */ + padding-top: var(--main-padding-top-adjust); } .score { text-align: center; background: linear-gradient(to bottom, #00c, #00a); width: 110px; height: 35px; - padding-top: 2px; /* needs to be adjusted per-font! */ + padding-top: var(--main-padding-top-adjust); } /* Clock, to the right of score */ @@ -75,7 +79,7 @@ body { background: linear-gradient(to bottom, #00a, #008); text-align: center; height: 36px; - padding-top: 2px; + padding-top: var(--main-padding-top-adjust); width: 90px; } .clockbug-hidden { @@ -152,7 +156,7 @@ body { .lowerthird-headline-content { padding-left: 20px; position: absolute; - padding-top: 4px; /* needs to be adjusted per-font! */ + padding-top: var(--main-padding-top-large-adjust); } .lowerthird-headline-content-hidden { clip: rect(0px,0px,200px,0px); @@ -197,7 +201,7 @@ body { .lowerthird-subheading-content { position: absolute; padding-left: 20px; - padding-top: 2px; /* needs to be adjusted per-font! */ + padding-top: var(--main-padding-top-adjust); } .lowerthird-subheading-content-hidden { width: 0px; diff --git a/score.html b/score.html index b5a73a7..26da313 100644 --- a/score.html +++ b/score.html @@ -3,7 +3,8 @@ - + + diff --git a/score.js b/score.js index 3f0a4d0..133a7d8 100644 --- a/score.js +++ b/score.js @@ -166,18 +166,22 @@ function update_clock() if (sec < 10) sec = "0" + sec; let text = min + ":" + sec; - // This is a hack around the fact that Exo has variable-width numerals. - // It doesn't look fantastic, but for the clock, it's better not to have - // the text jumping around. - let html = ""; - for (let i = 0; i < text.length; ++i) { - if (text.charAt(i) === ':') { - html += ':'; - } else { - html += "
" + text.charAt(i) + "
"; + if (false) { + // This is a hack around the fact that Exo has variable-width numerals. + // It doesn't look fantastic, but for the clock, it's better not to have + // the text jumping around. + let html = ""; + for (let i = 0; i < text.length; ++i) { + if (text.charAt(i) === ':') { + html += ':'; + } else { + html += "
" + text.charAt(i) + "
"; + } } + document.getElementById('clock').innerHTML = html; + } else { + document.getElementById('clock').innerHTML = text; } - document.getElementById('clock').innerHTML = html; } function goalA() -- 2.39.2