Skip to content

Commit 2666568

Browse files
committed
finish styles and prepare for beta release
1 parent 2e38371 commit 2666568

File tree

4 files changed

+87
-32
lines changed

4 files changed

+87
-32
lines changed

public/stylesheets/style.css

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
margin: 0 auto;
1111
}
1212

13+
#text {
14+
font-size: 16px;
15+
}
16+
1317
#title {
1418
font-weight: bold;
1519
font-size: 20px;
@@ -21,11 +25,32 @@
2125

2226
.vote-button {
2327
font-size: 18px;
24-
border-radius: 45%;
28+
border-radius: 50%;
2529
border-style: none;
30+
color: white;
31+
width: 30px;
32+
height: 30px;
2633
}
2734

2835
.modal { height: 500px !important ; } /* increase the height and width as you desire */
2936
.select-dropdown{
3037
overflow-y: auto !important;
3138
}
39+
40+
.up {
41+
background-color: #66bb6a;
42+
}
43+
44+
.up:hover {
45+
background-color: #1b5e20;
46+
transition: all 0.75s ease 0s;
47+
}
48+
49+
.down {
50+
background-color: #42a5f5;
51+
}
52+
53+
.down:hover {
54+
background-color: #0d47a1;
55+
transition: all 0.75s ease 0s;
56+
}

readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ This project uses MongoDB, and uses mongoose to interface with it. Make sure you
1919
#### Regarding the Google Maps API
2020
Remember to add your API key to the `index.hbs` file.
2121

22-
### TODO
22+
### TODO before release
2323
* Add a filtering system to filter spots (i.e. only show places with outlets or places good for freestyle)
24+
* Style infoboxes
25+
* Make sidenav collapsible for mobile clients

views/index.hbs

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div id="map"></div>
2-
32
<div class="fixed-action-btn horizontal">
4-
<a class="btn-floating btn-large waves-effect waves-light red modal-trigger" href="#modal1">
3+
<a class="btn-floating btn-large waves-effect waves-light yellow darken-2 modal-trigger pulse" href="#modal1">
54
<i class="material-icons">add</i>
65
</a>
76
</div>
@@ -45,26 +44,34 @@
4544
</select>
4645
<label>What kind of flying is best here...</label>
4746
</div>
48-
Has an outlet?
49-
<p>
50-
<input name="yes" type="radio" id="test1" />
51-
<label for="test1">Yes</label>
52-
</p>
53-
<p>
54-
<input name="no" type="radio" id="test2" />
55-
<label for="test2">No</label>
56-
</p>
5747

48+
49+
<div class="row">
50+
<p class="col s2">Has an outlet? </p>
51+
<p class="col s1">
52+
<input name="yes" type="radio" id="test1" />
53+
<label for="test1">Yes</label>
54+
</p>
55+
<p class="col s1">
56+
<input name="no" type="radio" id="test2" />
57+
<label for="test2">No</label>
58+
</p>
59+
</div>
60+
61+
</div>
62+
63+
<div class="row">
64+
<div class="col s12">
65+
<button class="btn-large waves-effect waves-light center-align" type="submit" name="action" onclick="Materialize.toast('Spot added, refresh to view it!', 4000)" style="background-color:#fbc02d;">Add Spot
66+
<i class="material-icons right">send</i>
67+
</button>
68+
</div>
5869
</div>
59-
<button class="btn waves-effect waves-light" type="submit" name="action">Add Spot
60-
<i class="material-icons right">send</i>
61-
</button>
6270

6371
</form>
6472
</div>
6573
</div>
6674
</div>
67-
6875
<!-- Modal Structure -->
6976
<div id="modalAbout" class="modal">
7077
<div class="modal-content">
@@ -123,8 +130,10 @@ function initMap() {
123130
124131
for (var i = 0; i < spots.length; i++) { // loop through all the locations and render a marker
125132
var outlet = "No";
133+
var date = (spots[i].date).toString().substring(0, 10);
126134
if (spots[i].isOutlet) { outlet = "Yes"; }
127-
addMarker(spots[i].coords, spots[i].address, spots[i]._id, spots[i].points, spots[i].type, spots[i].goodFor, outlet);
135+
136+
addMarker(spots[i].coords, spots[i].address, spots[i]._id, spots[i].points, spots[i].type, spots[i].goodFor, outlet, date);
128137
}
129138
130139
}
@@ -147,17 +156,17 @@ function placeMarkerAndPanTo(latLng, map) {
147156
}
148157
149158
// adds a marker as well as an info box containing the rating of the spot
150-
function addMarker(coords, address, id, points, type, goodFor, hasOutlet) {
159+
function addMarker(coords, address, id, points, type, goodFor, hasOutlet, date) {
151160
var upvote = "/upvote/" + id;
152161
// string that is used to render the html in the info box
153-
var contentString2 = '<div id="content" class="info"><div class="row"><div class="col s12" id="title"><br>' + address + '</div></div><div class="row"><div>'+
154-
'<form action="/upvote/'+ id +'" method="POST">'+
155-
'<input class="vote-button" type="submit" name="upvote" value="↑"/></form>'+ points +
156-
'<form action="/downvote/'+ id +'" method="POST">'+
157-
'<input class="vote-button" type="submit" name="downvote" value="↓"/>'+
158-
'</form></div><div>'+
159-
'<ul><li>This spot is good for <b>' + goodFor + '</b> and is a <b>' + type + '</b>.</li><li> <div>Are you able to charge packs here: <b>' + hasOutlet +
160-
'</b></li></ul></div></div></div></div>';
162+
var contentString2 = '<div id="content" class="info"><div class="row"><div class="col s1.5"><br>' +
163+
'<form action="/upvote/'+ id +'" method="POST">'+
164+
'<input class="vote-button up" type="submit" name="upvote" value="↑"/></form><b style="padding-left: 10px;">'+ points +
165+
'</b><form action="/downvote/'+ id +'" method="POST">'+
166+
'<input class="vote-button down" type="submit" name="downvote" value="↓"/>'+
167+
'</form></div>' + '<div class="col s10.5" id="text"><br><b>' + address + '</b><ul><li>This spot is good for <b>' + goodFor + '</b> and is a <b>' + type + '</b>.</li><li> <div>Are you able to charge packs here: <b>' + hasOutlet +
168+
'</b></li></ul></div></div><div class="divider"></div></div></div></div>'+
169+
'</div><br></div><div class="right-align"> Spot added on ' + date + '</div></div>' ;
161170
162171
var infowindow = new google.maps.InfoWindow({
163172
content: contentString2

views/layout.hbs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<body>
1717

18+
<div class="navbar-fixed">
1819
<nav class="deep-purple darken-1">
1920
<div class="nav-container">
2021
<div class="nav-wrapper">
@@ -24,34 +25,43 @@
2425
<li><a href="badges.html">Filter spots</a></li>
2526
<li><a href="collapsible.html">About</a></li>
2627
</ul> -->
28+
<div class="row">
29+
<div class="col s2">
30+
</div>
31+
<div class="col s8">
32+
33+
</div>
34+
</div>
2735
</div>
2836
</div>
2937
</nav>
38+
</div>
3039

3140
<ul id="slide-out" class="side-nav fixed">
3241
<nav class="deep-purple darken-1">
3342
<div class="nav-container">
3443
<div class="nav-wrapper">
35-
<a href="/" class="brand-logo" style="padding-left: 30px;">BandoMap</a>
44+
<a href="/" class="brand-logo" style="padding-left: 30px;"><i class="material-icons">map</i> BandoMap</a>
3645
</div>
3746
</div>
3847
</nav>
48+
49+
3950
<br>
40-
<li><a class="modal-trigger" href="#modal1"><i class="material-icons">add</i>Add a spot</a></li>
41-
<li><a href="#!"><i class="material-icons">search</i>Search location</a></li>
51+
<!--<li><a href="#!"><i class="material-icons">search</i>Search location</a></li>-->
4252
<li><div class="divider"></div></li>
4353
<li><a class="subheader">Filter Spots</a></li>
4454

4555
<div class="container">
46-
<select class='select' id="type" onchange="filterMarkersStyle(this.value);">
56+
<select class='select' id="type" onchange="filterMarkersStyle(this.value); Materialize.toast('Filtered!', 2000);">
4757
<option value="">Flying style</option>
4858
<option value="Freestyle">Freestyle</option>
4959
<option value="Racing">Racing</option>
5060
<option value="Longrange">Long range</option>
5161
<option value="Everything">Everything</option>
5262
</select>
5363

54-
<select id="type" onchange="filterMarkersType(this.value);">
64+
<select id="type" onchange="filterMarkersType(this.value); Materialize.toast('Filtered!', 2000);">
5565
<option value="">Spot type</option>
5666
<option value="Field">Field</option>
5767
<option value="Park">Park</option>
@@ -66,7 +76,16 @@
6676

6777
<li><div class="divider"></div></li>
6878
<li><a class="subheader">More</a></li>
79+
<li><a class="modal-trigger" href="#modal1"><i class="material-icons">add</i>Add a spot</a></li>
80+
6981
<li><a class="modal-trigger" href="#modalAbout"><i class="material-icons">info</i>About</a></li>
82+
83+
<div class="card-panel green lighten-4 green-text text-darken-4"><b>Tip!</b> Use control or command + scroll to zoom in and out.</div>
84+
85+
<div class="card-panel blue lighten-4 blue-text text-darken-4"><b>Welcome!</b> BandoMap is currently in Beta. Visit the <a href="https://github.com/mAzurkovic/BandoMap">
86+
GitHub repo</a> to contribute to the project.</div>
87+
88+
7089
</ul>
7190

7291
{{{body}}}

0 commit comments

Comments
 (0)