diff --git a/app.js b/app.js index d95f63c..321ecb6 100644 --- a/app.js +++ b/app.js @@ -640,6 +640,11 @@ function toSubscript(n) { return String(n).split('').map(d => SUBSCRIPTS[d]).join(''); } +const TICKER_COLORS = [ + '#7ec8e3', '#a8d5a2', '#f0c674', '#d4a0d4', '#e8a87c', + '#87ceeb', '#98d4bb', '#deb887', '#c9b1ff', '#ff9a9e' +]; + const TICKER_SYSTEMS = [ { key: 'binary', min: 1, max: 255, prefix: toSubscript(2) }, { key: 'octal', min: 1, max: 511, prefix: toSubscript(8) }, @@ -661,7 +666,8 @@ function generateTickerText() { const wrapped = sys.key === 'slavonic' ? '' + prefixed + '' : prefixed; - pairs.push(wrapped + ' = ' + num); + const color = TICKER_COLORS[Math.floor(Math.random() * TICKER_COLORS.length)]; + pairs.push('' + wrapped + ' = ' + num + ''); } return pairs.join('\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0'); } diff --git a/index.html b/index.html index 91a1558..11cc6b8 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +
@@ -155,10 +155,10 @@
- + diff --git a/styles.css b/styles.css index c293bd9..0843d24 100644 --- a/styles.css +++ b/styles.css @@ -114,12 +114,11 @@ body { font-size: 1.05rem; font-family: monospace; animation: ticker-scroll 40s linear infinite; - padding-left: 100%; } @keyframes ticker-scroll { - 0% { transform: translateX(0); } - 100% { transform: translateX(-50%); } + 0% { transform: translateX(100%); } + 100% { transform: translateX(-100%); } } /* BUTTONS */ diff --git a/sw.js b/sw.js index 2d0a4d5..845a8a2 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'numnum-v38'; +const CACHE_NAME = 'numnum-v39'; const ASSETS = [ '/', '/index.html',