Skip to content

Commit ac78a77

Browse files
couple of small tweaks
* fix not emiting a resize event for gmaps * added icon to embed page
1 parent 7923ea2 commit ac78a77

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 210
2+
# version 214
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&language=en_us&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

css/main.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ body {
2020
font-family: "Roboto", Ariel, sans-serif;
2121
}
2222

23-
i.right {
23+
.rfloat {
2424
float: right;
2525
}
26+
.lfloat {
27+
float: left;
28+
}
2629

2730
.scrollStyleV {
2831
z-index: 100;
@@ -316,7 +319,9 @@ header > div {
316319
.slimContainer {
317320
position: relative;
318321
margin: 20px auto;
319-
width: 300px;
322+
width: 290px;
323+
padding-left: 5px;
324+
padding-right: 5px;
320325
}
321326
.slimContainer hr {
322327
margin-bottom: 10px;

index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353

5454
<div id="embedbox" style="display: none" class="flatpage">
5555
<div class="slimContainer">
56-
<h2>Embed tracker</h2>
56+
<h2>Embed tracker
57+
<svg width="35" height="40" viewbox="0 0 35 40" version="1.1" class="rfloat">
58+
<path style="fill:#666666;" d="m19.188,4.0378c-1.698,10.6-3.396,21.2-5.094,31.8,1.478,0.9,2.037-0.6,2.024-1.7,1.607-10.1,3.213-20.1,4.82-30.1h-1.75zm-6.469,5.3c-3.9064,3-7.8129,6-11.719,9v3.7c3.9045,3,7.8143,6,11.719,9v-3.9c-3.0949-2.3-6.1868-4.6-9.2815-7,3.0937-2.3,6.1875-4.6,9.2815-6.9v-3.9zm9.562,0v3.9c3.094,2.3,6.188,4.6,9.281,6.9-3.093,2.4-6.187,4.7-9.281,7v3.9c3.905-3,7.814-6,11.719-9v-3.7c-3.906-3-7.813-6-11.719-9z"/>
59+
</svg>
60+
</h2>
5761
<hr>
5862
<span>
5963
It's possible to embed the mobile tracker on any page. If you are developing a HAB project, you can add the tracker
@@ -68,7 +72,7 @@ <h2>Embed tracker</h2>
6872
</div>
6973
<div id="aboutbox" style="display: none" class="flatpage">
7074
<div class="slimContainer">
71-
<h2><i class="icon-question right"></i>About</h2>
75+
<h2><i class="icon-question rfloat"></i>About</h2>
7276
<hr>
7377
<span>
7478
Welcome to the Habitat Mobile Tracker beta. This webpage is specifically crafted with mobile devices in mind.
@@ -85,7 +89,7 @@ <h2>Contribute</h2>
8589
</div>
8690
<div id="settingsbox" style="display: none" class="flatpage">
8791
<div class="slimContainer">
88-
<h2><i class="icon-settings right"></i>Settings</h2>
92+
<h2><i class="icon-settings rfloat"></i>Settings</h2>
8993
<hr>
9094
<div class="row option">
9195
<span><b>Daylight overlay</b></span>

js/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function checkSize() {
119119
$('#mapscreen,#map,#telemetry_graph,#telemetry_graph .holder').width(w-sw);
120120
$('#main').width(sw);
121121
} else { // portrait mode
122-
if(h < 420) h = 420;
122+
//if(h < 420) h = 420;
123123
var mh = (embed.vlist) ? 180 : 0;
124124

125125
$('body,#loading').height(h);
@@ -131,6 +131,8 @@ function checkSize() {
131131

132132
// this should hide the address bar on mobile phones, when possible
133133
window.scrollTo(0,1);
134+
135+
if(map) google.maps.event.trigger(map, 'resize');
134136
}
135137

136138
window.onresize = checkSize;
@@ -358,6 +360,7 @@ $(window).ready(function() {
358360
$('.main_screen,#chasecarbox,#aboutbox,#settingsbox').hide();
359361
box.show();
360362
}
363+
checkSize();
361364
});
362365

363366
// toggle functionality for switch button

0 commit comments

Comments
 (0)