diff --git a/app.js b/app.js index 321ecb6..ccb2ed7 100644 --- a/app.js +++ b/app.js @@ -646,10 +646,10 @@ const TICKER_COLORS = [ ]; const TICKER_SYSTEMS = [ - { key: 'binary', min: 1, max: 255, prefix: toSubscript(2) }, - { key: 'octal', min: 1, max: 511, prefix: toSubscript(8) }, + { key: 'binary', min: 1, max: 255, suffix: toSubscript(2) }, + { key: 'octal', min: 1, max: 511, suffix: toSubscript(8) }, { key: 'hex', min: 1, max: 255, prefix: '0x' }, - { key: 'ternary', min: 1, max: 27, prefix: toSubscript(3) }, + { key: 'ternary', min: 1, max: 27, suffix: toSubscript(3) }, { key: 'braille', min: 1, max: 99, prefix: null }, { key: 'roman', min: 1, max: 3999, prefix: null }, { key: 'greek', min: 1, max: 999, prefix: null }, @@ -662,10 +662,12 @@ function generateTickerText() { const sys = TICKER_SYSTEMS[Math.floor(Math.random() * TICKER_SYSTEMS.length)]; const num = sys.min + Math.floor(Math.random() * (sys.max - sys.min + 1)); const display = SYSTEMS[sys.key].toDisplay(num); - const prefixed = sys.prefix ? sys.prefix + display : display; + let labelled = display; + if (sys.prefix) labelled = sys.prefix + display; + if (sys.suffix) labelled = display + sys.suffix; const wrapped = sys.key === 'slavonic' - ? '' + prefixed + '' - : prefixed; + ? '' + labelled + '' + : labelled; const color = TICKER_COLORS[Math.floor(Math.random() * TICKER_COLORS.length)]; pairs.push('' + wrapped + ' = ' + num + ''); } diff --git a/index.html b/index.html index a1e580b..06543eb 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +
@@ -155,10 +155,10 @@
- + diff --git a/styles.css b/styles.css index fded20c..ff42d4c 100644 --- a/styles.css +++ b/styles.css @@ -111,7 +111,7 @@ body { display: inline-block; white-space: nowrap; color: var(--text-dim); - font-size: 1.05rem; + font-size: 1.3rem; font-family: monospace; animation: ticker-scroll 40s linear infinite; } diff --git a/sw.js b/sw.js index 2b49ac8..8754ca9 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'numnum-v40'; +const CACHE_NAME = 'numnum-v41'; const ASSETS = [ '/', '/index.html',