From 5bf8eb73331cfa8ecdbe137720133a98da1062eb Mon Sep 17 00:00:00 2001 From: fkloft Date: Sat, 13 Jul 2013 00:12:49 +0200 Subject: [PATCH] Visual tweaks (mostly CSS, don't show "Portals:" in statusbar on smartphones --- code/request_handling.js | 8 +++++--- mobile/smartphone.css | 36 +++++++++++++++++++++++++----------- style.css | 12 ++++++------ 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/code/request_handling.js b/code/request_handling.js index 16ec02e2..90368909 100644 --- a/code/request_handling.js +++ b/code/request_handling.js @@ -45,12 +45,14 @@ window.requests.abort = function() { // to website. Updates info in layer chooser. window.renderUpdateStatus = function() { - var t = 'portals: '; + var t = ''; + if(!window.isSmartphone()) // space is valueable + t += 'portals: '; var minlvl = getMinPortalLevel(); if(minlvl === 0) - t+= 'all'; + t+= 'all'; else - t+= 'L'+minlvl+(minlvl<8?'+':'') + ''; + t+= 'L'+minlvl+(minlvl<8?'+':'') + ''; t +=''; t += ' map: '; diff --git a/mobile/smartphone.css b/mobile/smartphone.css index 6e7b6a9f..060661ab 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -8,32 +8,46 @@ body { width: 100%; color: #d4d5d6; border: 0; + padding: 0; } -#updatestatus .loadlevel { +#updatestatus .map { + margin-left: 4px; +} + +#innerstatus { + padding: 4px; + float: right; + width: 50%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#loadlevel { border-width: 0; background: transparent; color: #FFF; } -#innerstatus { - float: right; - max-width: 50%; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} - #mobileinfo { float: left; - max-width: 50%; + width: 50%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; + position:relative; + padding: 4px 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } #mobileinfo .portallevel { - padding: 0 0.2em; + padding: 0 0.25em; color: #FFF; } diff --git a/style.css b/style.css index 1d48f101..5d3441f3 100644 --- a/style.css +++ b/style.css @@ -717,21 +717,21 @@ h3 { box-sizing: border-box; } -#updatestatus .loadlevel { +#updatestatus .map { + margin-left: 8px; +} + +#loadlevel { background: #FFF; color: #000000; display: inline-block; - min-width: 1.5em; + min-width: 1.8em; border: 1px solid #20A8B1; border-width: 0 1px; margin: -4px 0; padding: 4px 0.2em; } -#updatestatus .map { - margin-left: 8px; -} - /* Dialogs */ .ui-tooltip, .ui-dialog {