make more use of the empty space below the sidebar now that there’s a map rendered behind it all the time

This commit is contained in:
Stefan Breunig
2013-02-11 12:10:40 +01:00
parent 1de0e166e0
commit 4a45570f40
4 changed files with 14 additions and 15 deletions

View File

@ -33,11 +33,11 @@ window.setupStyles = function() {
'#chatcontrols { bottom: '+(CHAT_SHRINKED+24)+'px; }', '#chatcontrols { bottom: '+(CHAT_SHRINKED+24)+'px; }',
'#chat { height: '+CHAT_SHRINKED+'px; } ', '#chat { height: '+CHAT_SHRINKED+'px; } ',
'.leaflet-right { margin-right: '+(SIDEBAR_WIDTH+1)+'px } ', '.leaflet-right { margin-right: '+(SIDEBAR_WIDTH+1)+'px } ',
'#updatestatus { width:'+(SIDEBAR_WIDTH-2*4)+'px; } ', '#updatestatus { width:'+(SIDEBAR_WIDTH-2*4+1)+'px; } ',
'#sidebar { width:'+(SIDEBAR_WIDTH + HIDDEN_SCROLLBAR_ASSUMED_WIDTH + 1 /*border*/)+'px; } ', '#sidebar { width:'+(SIDEBAR_WIDTH + HIDDEN_SCROLLBAR_ASSUMED_WIDTH + 1 /*border*/)+'px; } ',
'#sidebartoggle { right:'+SIDEBAR_WIDTH+'px; } ', '#sidebartoggle { right:'+SIDEBAR_WIDTH+'px; } ',
'#scrollwrapper { width:'+(SIDEBAR_WIDTH + 2*HIDDEN_SCROLLBAR_ASSUMED_WIDTH)+'px; right:-'+(2*HIDDEN_SCROLLBAR_ASSUMED_WIDTH-2)+'px } ', '#scrollwrapper { width:'+(SIDEBAR_WIDTH + 2*HIDDEN_SCROLLBAR_ASSUMED_WIDTH)+'px; right:-'+(2*HIDDEN_SCROLLBAR_ASSUMED_WIDTH-2)+'px } ',
'#sidebar input, h2, #updatestatus { width:'+(SIDEBAR_WIDTH - 2*4)+'px !important } ', '#sidebar input, h2 { width:'+(SIDEBAR_WIDTH - 2*4)+'px !important } ',
'#sidebar > *, #gamestat span, .imgpreview img { width:'+SIDEBAR_WIDTH+'px; }'].join("\n") '#sidebar > *, #gamestat span, .imgpreview img { width:'+SIDEBAR_WIDTH+'px; }'].join("\n")
+ '</style>'); + '</style>');
} }

View File

@ -50,7 +50,7 @@ window.renderUpdateStatus = function() {
t += ' <span style="color:red" class="help" title="Can only render so much before it gets unbearably slow. Not all entities are shown. Zoom in or increase the limit (search for MAX_DRAWN_*).">RENDER LIMIT</span> ' t += ' <span style="color:red" class="help" title="Can only render so much before it gets unbearably slow. Not all entities are shown. Zoom in or increase the limit (search for MAX_DRAWN_*).">RENDER LIMIT</span> '
if(window.failedRequestCount > 0) if(window.failedRequestCount > 0)
t += ' <span style="color:red">' + window.failedRequestCount + ' requests failed</span>.' t += ' <span style="color:red">' + window.failedRequestCount + ' failed</span>.'
t += '<br/>('; t += '<br/>(';
var minlvl = getMinPortalLevel(); var minlvl = getMinPortalLevel();

11
main.js
View File

@ -49,14 +49,13 @@ for(var i = 0; i < d.length; i++) {
// player information is now available in a hash like this: // player information is now available in a hash like this:
// window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ALIENS||RESISTANCE"}; // window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ALIENS||RESISTANCE"};
// remove complete page. We only wanted the user-data and the pages // remove complete page. We only wanted the user-data and the pages
// security context so we can access the API easily. Setup as much as // security context so we can access the API easily. Setup as much as
// possible without requiring scripts. // possible without requiring scripts.
document.getElementsByTagName('head')[0].innerHTML = '' document.getElementsByTagName('head')[0].innerHTML = ''
//~ + '<link rel="stylesheet" type="text/css" href="http://0.0.0.0:8000/style.css"/>' + '<link rel="stylesheet" type="text/css" href="http://0.0.0.0:8000/style.css"/>'
+ '<title>Ingress Intel Map</title>' + '<title>Ingress Intel Map</title>'
+ '<link rel="stylesheet" type="text/css" href="http://breunigs.github.com/ingress-intel-total-conversion/style.css?@@BUILDDATE@@"/>' //~ + '<link rel="stylesheet" type="text/css" href="http://breunigs.github.com/ingress-intel-total-conversion/style.css?@@BUILDDATE@@"/>'
+ '<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css"/>' + '<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css"/>'
+ '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Coda"/>'; + '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Coda"/>';
@ -81,9 +80,9 @@ document.getElementsByTagName('body')[0].innerHTML = ''
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>' + ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
+ ' <div id="toolbox"><a onmouseover="setPermaLink(this)">permalink</a></div>' + ' <div id="toolbox"><a onmouseover="setPermaLink(this)">permalink</a></div>'
+ ' <div id="spacer"></div>' + ' <div id="spacer"></div>'
+ ' <div id="updatestatus"></div>' + ' </div>'
+ ' </div>'; + '</div>'
+ '</div>'; + '<div id="updatestatus"></div>';
// putting everything in a wrapper function that in turn is placed in a // putting everything in a wrapper function that in turn is placed in a
// script tag on the website allows us to execute in the sites context // script tag on the website allows us to execute in the sites context

View File

@ -11,22 +11,22 @@ body {
} }
#scrollwrapper { #scrollwrapper {
height: 100%;
overflow: hidden; overflow: hidden;
position: fixed; position: fixed;
right: -38px; right: -38px;
top: 0; top: 0;
width: 340px; width: 340px;
bottom: 45px;
} }
#sidebar { #sidebar {
background-color: rgba(8, 48, 78, 0.9); background-color: rgba(8, 48, 78, 0.9);
border-left: 1px solid #20A8B1; border-left: 1px solid #20A8B1;
color: #888; color: #888;
height: 100%;
position: relative; position: relative;
left: 0; left: 0;
top: 0; top: 0;
max-height: 100%;
overflow-y:scroll; overflow-y:scroll;
overflow-x:hidden; overflow-x:hidden;
z-index: 3000; z-index: 3000;
@ -523,16 +523,14 @@ aside:nth-child(odd) span {
} }
#spacer { #spacer {
/* cheap hack to prevent sidebar content being overlayed by the map height: 10px;
* status box */
height: 55px;
} }
/* a common portal display takes this much space (prevents moving /* a common portal display takes this much space (prevents moving
* content when first selecting a portal) */ * content when first selecting a portal) */
#portaldetails { #portaldetails {
min-height: 532px; min-height: 553px;
} }
@ -541,12 +539,14 @@ aside:nth-child(odd) span {
background-color: rgba(8, 48, 78, 1); background-color: rgba(8, 48, 78, 1);
border-bottom: 0; border-bottom: 0;
border-top: 1px solid #20A8B1; border-top: 1px solid #20A8B1;
border-left: 1px solid #20A8B1;
bottom: 0; bottom: 0;
color: #ffce00; color: #ffce00;
font-size:13px; font-size:13px;
padding: 4px; padding: 4px;
position: fixed; position: fixed;
right: 0; right: 0;
z-index:3002;
} }