]> git.sesse.net Git - ultimatescore/commitdiff
Bring back Lato (for Trøndisk).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Oct 2018 18:59:39 +0000 (20:59 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Oct 2018 18:59:39 +0000 (20:59 +0200)
score.css
score.html
score.js

index c596902abb5a3e12014e9e61e4c33a9493908aa7..759e07ec15cde5e70571c4a45e9e141ded743027 100644 (file)
--- 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;
index b5a73a731328db55728344c1d610dd905e6b4f03..26da3137642fff4b6e59154e4c0e0ee0240d55d2 100644 (file)
@@ -3,7 +3,8 @@
  <head>
    <meta http-equiv="content-type" value="text/html; charset=utf-8" />
    <meta charset="utf-8" />
-   <link href="fonts/exo.css" rel="stylesheet">
+<!--   <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> -->
+   <link href="fonts/lato.css" rel="stylesheet">
    <link href="score.css" rel="stylesheet">
   </head>
   <body>
index 3f0a4d055daad4353f9d96ceffedd3adaf9679f8..133a7d834383c97398f8f6283177901af2fe1146 100644 (file)
--- 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 += "<div style='display: inline-block; width: 15px'>" + text.charAt(i) + "</div>";
+       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 += "<div style='display: inline-block; width: 15px'>" + text.charAt(i) + "</div>";
+                       }
                }
+               document.getElementById('clock').innerHTML = html;
+       } else {
+               document.getElementById('clock').innerHTML = text;
        }
-       document.getElementById('clock').innerHTML = html;
 }
 
 function goalA()