From: Urban Wallasch Date: Mon, 5 Aug 2019 10:41:28 +0000 (+0200) Subject: * Tweaked some minor aspects of browser presentation. X-Git-Tag: v0.1.0~36 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=0490088f0189806564c16665503d917cb4e003ff;p=ets2_tele.git * Tweaked some minor aspects of browser presentation. --- diff --git a/dash.html b/dash.html index 87c0737..a959e97 100644 --- a/dash.html +++ b/dash.html @@ -23,14 +23,17 @@ x-boxleft, x-boxright { } x-boxleft { float:left; } x-boxright { float:right; } -.clear { clear:both; } + +.clear { + clear:both; +} .cont { min-width:14.5em; - padding: 0.2em; - border: solid 2px grey; + padding: 2px; + border: solid 1px grey; } .bar { - min-width:15em; + min-width:14.5em; } table, caption, tbody, tfoot, thead, tr, th, td { @@ -44,6 +47,7 @@ table, caption, tbody, tfoot, thead, tr, th, td { vertical-align: baseline; background: transparent; } +table { width: 100%; } .aright { text-align: right; } .aleft { text-align: left; } @@ -54,7 +58,8 @@ table, caption, tbody, tfoot, thead, tr, th, td { .medium { font-size: 4em; } .small { font-size: 2.5em; } .smaller { font-size: 1.8em; } -.tiny { font-size: 1.2em; } +.tiny { font-size: 1em; } +.tinyb { font-size: 1em; font-weight: bold; } .warn1 { color:#fd0; } .warn2 { color:#f20; } @@ -66,9 +71,7 @@ x-bar { display: block; clear: both; width: 100%; - padding: 0.2em; - margin: 0.1em; - border: none; + padding: 3px; font-size: 150%; } .pause { @@ -82,7 +85,12 @@ x-bar { display: none; } .nosleep { - font-size: 80%; + background-color: #000; + color: #ff8; + font-size: 90%; +} +.nosleepon { + color: #af8; } @@ -92,33 +100,33 @@ x-bar { - - +
-- km/h
+ - + - +
-- km/h
 â€“   - km/h- km/h
-- rpm
- rpm
- - - - - - +
Fuel- l
Range- km
Current- l/100km
Average- l/100km
Mileage-km
+ + + + +
Fuel- l
Range- km
Current- l/100km
Average- l/100km
Mileage-km
- - +
Distance- km
+ @@ -126,21 +134,21 @@ x-bar { -
Distance- km
ETA-
Next rest-
Deadline-
- - - - - - - +
Vehicle -
Trailers -
Cargo -
Mass -
From -
To -
Reward -
+ + + + + + +
Vehicle -
Trailers -
Cargo -
Mass -
From -
To -
Reward -
Paused - - --- +   +  
@@ -306,8 +314,10 @@ function update_cb() { // current fuel consumption: if ( last_fuel != tele.fuel && last_odometer != tele.odometer ) { - if ( last_fuel > 0 && last_odometer > 0 ) - fuel_cons.innerHTML = ((last_fuel-tele.fuel)*100 / (tele.odometer-last_odometer)).toFixed(1); + if ( last_fuel > 0 && last_odometer > 0 ) { + var fc = (last_fuel-tele.fuel)*100 / (tele.odometer-last_odometer); + fuel_cons.innerHTML = fc > 999 ? '∞' : fc.toFixed(1); + } last_fuel = tele.fuel; last_odometer = tele.odometer; } @@ -345,7 +355,7 @@ function update_cb() { ? tele.job_deltime != 4294967295 ? m2hm(tele.job_deltime - tele.game_time) : '[external]' - : '[none]' + : '-' //// "job" box @@ -476,8 +486,8 @@ function installNoSleepHandler() { function enableNoSleep() { document.removeEventListener('click', enableNoSleep, false); noSleep.enable(); - nsbar.innerHTML = "NoSleep enabled!"; - nsbar.style.color = "#a00"; + nsbar.innerHTML = "NoSleep enabled."; + nsbar.classList.add("nosleepon"); }, false ); @@ -487,8 +497,8 @@ function installNoSleepHandler() { function disableNoSleep() { noSleep.disable(); installNoSleepHandler(); - nsbar.innerHTML = "NoSleep disabled.
Click to enable."; - nsbar.style.color = "#0a0"; + nsbar.innerHTML = "Click page to enable NoSleep."; + nsbar.classList.remove("nosleepon"); } disableNoSleep();