Skip to content

Commit c054ace

Browse files
make pages scrollable
1 parent 227b2fd commit c054ace

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

css/main.css

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ html, body {
7373
}
7474

7575
header {
76+
position: fixed;
77+
top: 0;
78+
left; 0;
7679
padding: 0;
7780
margin: 0;
7881
height: 50px;
@@ -82,7 +85,6 @@ header {
8285
border-bottom: 5px solid #33b5e5;
8386
box-shadow: 0px 1px 3px #555;
8487
z-index: 5;
85-
position: relative;
8688
}
8789
#app_name {
8890
line-height: normal;
@@ -94,6 +96,11 @@ header > div {
9496
position: relative;
9597
height: 50px;
9698
}
99+
100+
#mapscreen {
101+
margin-top: 55px;
102+
}
103+
97104
#map,
98105
#main {
99106
position: relative;
@@ -224,8 +231,9 @@ header > div {
224231
color: #00A3D3;
225232
}
226233

227-
#chasecarbox,
228-
#aboutbox {
234+
.flatpage {
235+
margin-top: 55px;
236+
overflow: auto;
229237
position: absolute;
230238
width: 100%;
231239
z-index: 4;
@@ -242,9 +250,9 @@ header > div {
242250
margin: 0;
243251
}
244252
.slimContainer {
253+
position: relative;
245254
margin: 20px auto;
246255
width: 300px;
247-
height: 100%;
248256
}
249257
.slimContainer hr {
250258
margin-bottom: 10px;
@@ -394,6 +402,7 @@ header > div {
394402
height: 245px;
395403
width: 199px;
396404
overflow: hidden;
405+
margin-top: 55px;
397406
}
398407
#main .data {
399408
height: 100%;

index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</div>
4747
</header>
4848

49-
<div id="aboutbox" style="display: none">
49+
<div id="aboutbox" style="display: none" class="flatpage">
5050
<div class="slimContainer">
5151
<h2>About</h2>
5252
<hr>
@@ -63,7 +63,7 @@ <h2>Contribute</h2>
6363
</span>
6464
</div>
6565
</div>
66-
<div id="settingsbox" style="display: none">
66+
<div id="settingsbox" style="display: none" class="flatpage">
6767
<div class="slimContainer">
6868
<h2>Settings</h2>
6969
<hr>
@@ -112,10 +112,9 @@ <h2>Settings</h2>
112112
The size of cache files is around 600 KB.
113113
</span>
114114
</div>
115-
<span>&nbsp;</span>
116115
</div>
117116
</div>
118-
<div id="chasecarbox" style="display: none">
117+
<div id="chasecarbox" style="display: none" class="flatpage">
119118
<div class="slimContainer">
120119
<h2>Chase car mode</h2>
121120
<hr>

js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ function checkSize() {
9999
w = $(window).width();
100100
w = (w < 320) ? 320 : w; // absolute minimum 320px
101101
h = $(window).height();
102-
h = (h < 300) ? 300 : h; // absolute minimum 320px minus 20px for the iphone bar
102+
//h = (h < 300) ? 300 : h; // absolute minimum 320px minus 20px for the iphone bar
103103
hh = $('header').height();
104104

105-
$("#mapscreen").height(h-hh-5);
105+
$("#mapscreen,.flatpage").height(h-hh-5);
106106

107107
sw = (embed.vlist) ? 199 : 0;
108108

0 commit comments

Comments
 (0)