Skip to content

Commit 77ac7af

Browse files
committed
styled the app
1 parent c5b0bcf commit 77ac7af

File tree

2 files changed

+65
-47
lines changed

2 files changed

+65
-47
lines changed

assets/css/master.css

+58-43
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,54 @@
11
body {
2-
background: blue;
2+
background: #fff;
3+
background: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#C8C8C8), color-stop(0.47, white), to(#C8C8C8));
34
margin: 0;
45
font: 18px Helvetica;
56
text-align: center;
67
}
78

89
#title_bar {
9-
background: black;
10-
color: white;
11-
height: 25px;
12-
padding: 10px 5%;
13-
width: 90%;
10+
/* need a position set to something for z-index to take effect */
11+
position: relative;
12+
z-index: 1;
13+
background: #ccc;
14+
background: -webkit-gradient(linear, 0 0, 0 70%, from(#fff), to(#ccc));
15+
background: linear-gradient(#fff, #ccc 70%);
16+
color: #444;
17+
text-shadow: 0 1px 0 #fff;
18+
border-bottom: 1px solid #999;
19+
height: 44px;
20+
line-height: 44px;
21+
padding: 0;
22+
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.3);
23+
box-shadow: 0 0 3px rgba(0,0,0,0.3);
1424
}
1525

16-
.app_button {
17-
background: gold;
18-
border: khaki;
19-
margin: 15px auto;
20-
padding: 5px;
26+
.app_button, button {
27+
-webkit-border-radius: 20px;
28+
border-radius: 20px;
29+
display: inline-block;
30+
padding: 0 20px;
31+
margin-bottom: 20px;
32+
cursor: pointer;
2133
width: 200px;
22-
-webkit-border-radius: 5px;
34+
background:#F7941E;
35+
background: -webkit-gradient(linear, 0 0, 0 70%, from(#F7941E), to(#D37F18));
36+
background: linear-gradient(#F7941E, #D37F18 70%);
37+
border: 1px solid #C97917;
38+
font-weight: 200;
39+
text-shadow: 0 -1px 0 #7E4B0D;
40+
height: 40px;
41+
line-height: 40px;
42+
color:#fff;
43+
text-align: center;
2344
}
2445

2546
#back_button {
2647
background: grey;
2748
}
28-
29-
/**
30-
* Since all of the views are the same, we'll set them to static widths and heights to match our device.
31-
**/
3249

3350
.view {
34-
width: 320px;
35-
/* on the iPhone, we have to account for the 20px status bar at the top */
36-
/* 480 - 20 = 460 */
37-
/* then 460 - 40 to account for our title bar */
38-
height: 420px;
39-
51+
padding: 35px;
4052
/* only one view is displayed at a time
4153
so we'll set the views to default to be un-displayed
4254
and then override this based on the element id */
@@ -46,29 +58,32 @@ body {
4658
#welcome {
4759
display: block;
4860
}
49-
#settings {
50-
background: white;
51-
}
52-
#map {
53-
background: black;
54-
color: white;
55-
}
5661

57-
.map_image {
58-
margin: auto;
59-
height: 250px;
60-
padding-top: 35px;
61-
width: 250px;
62+
#map {
63+
text-shadow: 0 1px 0 #fff;
6264
}
6365

64-
#settings_form {
65-
display: block;
66-
padding: 20px;
67-
}
66+
.map_image {
67+
margin: auto;
68+
height: 250px;
69+
width: 250px;
70+
border: 1px solid #aaa;
71+
}
6872

69-
button {
70-
font: 18px Helvetica;
71-
height: 30px;
72-
width: 100px;
73-
-webkit-appearance:push-button;
73+
#settings {
7474
}
75+
76+
legend {
77+
font-weight: bold;
78+
text-shadow: 0 1px 0 #fff;
79+
}
80+
81+
fieldset {
82+
margin-bottom: 20px;
83+
border: 1px solid #ccc;
84+
border-radius: 8px;
85+
}
86+
87+
input {
88+
margin-bottom: 8px;
89+
}

index.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
</head>
2525
<body>
26-
<div id="title_bar">PhoneGap Training App</div>
26+
<div id="title_bar">Phone<strong>Gap</strong> Training App</div>
2727

2828
<div id="welcome" class="view">
2929
<div class="app_button" id="map_button">Show My Location</div>
@@ -40,18 +40,21 @@
4040

4141
<div id="settings" class="view">
4242
<form id="settings_form">
43-
<p>Map Type</p>
43+
<fieldset>
44+
<legend>Map Type</legend>
4445
<input type="radio" name="map" value="roadmap" checked>Road Map<br/>
4546
<input type="radio" name="map" value="satellite">Satellite<br/>
4647
<input type="radio" name="map" value="terrain">Terrain<br/>
4748
<input type="radio" name="map" value="hybrid">Hybrid<br/>
48-
<p>Zoom Level</p>
49+
</fieldset>
50+
<fieldset>
51+
<legend>Zoom Level</legend>
4952
<input type="radio" name="zoom" value="10">Super Far<br/>
5053
<input type="radio" name="zoom" value="12">Far<br/>
5154
<input type="radio" name="zoom" value="15" checked>Normal<br/>
5255
<input type="radio" name="zoom" value="18">Close<br/>
5356
<input type="radio" name="zoom" value="20">Super Close<br/>
54-
<br />
57+
</fieldset>
5558
<button id="save_button">Save</button>
5659
</form>
5760
</div>

0 commit comments

Comments
 (0)