Skip to content

Commit

Permalink
Small GUI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
woubuc committed Dec 22, 2017
1 parent e76b609 commit d752a2f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/resources/template/app/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ WurmMapGen.map = {
// Set up the map
var map = WurmMapGen.map.map = L.map('map', {
maxBounds: [xy(0,0), xy(config.actualMapSize,config.actualMapSize)],
maxBoundsViscosity: 1.0,
maxZoom: config.mapMaxZoom,
minZoom: config.mapMinZoom,
crs: L.CRS.Simple,
zoomControl: false
zoomControl: false,
attributionControl: false
});

new L.Control.Zoom({position: 'bottomright'}).addTo(map);
Expand All @@ -41,7 +43,6 @@ WurmMapGen.map = {
maxBounds: mapBounds,
maxBoundsViscosity: 1.0,
inertia: false,
attribution: 'Rendered with <a href="https://github.com/Garrett92/WurmMapGen">WurmMapGen</a>',
noWrap: true,
tms: false
}).addTo(map);
Expand Down
5 changes: 4 additions & 1 deletion src/resources/template/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ h1 { font-size:14px; font-weight:700; }
#playercount { font-size:12px; color:#888; }
label { display:block; padding:10px 0; cursor:pointer; }

.attribution { font-size:11px; color:#888; }
.attribution p { padding:2px 0; }

/* Map labels */
.icon-textlabel { width:0px; height:1px; border:5px solid transparent; border-top-color:rgba(0,0,0,0.6);
white-space:nowrap; text-align:center; font-size:10px; }
Expand All @@ -33,7 +36,7 @@ label { display:block; padding:10px 0; cursor:pointer; }
background:rgba(0,0,0,0.6); color:white; border-radius:3px; }

/* Basic GUI elements */
#sidebar { height:100vh; width:240px; left:-240px; background:white; }
#sidebar { height:100vh; width:240px; left:-240px; background:white; overflow-y:auto; }
#sidebar-toggle { left:0; top:10px; width:40px; height:44px; line-height:43px;
background:white; border-radius:0 3px 3px 0; box-shadow:0 0 5px rgba(0,0,0,0.1);
font-size:20px; text-align:center; cursor:pointer; }
Expand Down
11 changes: 11 additions & 0 deletions src/resources/template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ <h1>{{serverName}}</h1>
</div>
{{/showStructures}}

<div class="block attribution">
<p>
<a href="https://github.com/woubuc/WurmMapGen" target="_blank" rel="noreferrer noopener">WurmMapGen</a>
powered by
<a href="http://leafletjs.com/" target="_blank" rel="noreferrer noopener">Leaflet</a>
</p>

<p>Developed and maintained by <a href="https://github.com/woubuc">woubuc</a></p>
<p>Based on code by <a href="https://github.com/Garrett92/">Garrett92</a></p>
</div>

</div>

<div id="search" class="absolute transition z-gui" :class="{open: searchResultsOpen}">
Expand Down

0 comments on commit d752a2f

Please sign in to comment.