Skip to content

Commit

Permalink
cleaned up styling of location form
Browse files Browse the repository at this point in the history
  • Loading branch information
nstjean committed Dec 13, 2019
1 parent a81b89a commit 9dc5409
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
*= require jquery-confirm/css/jquery-confirm.css
*= require jquery.atwho
*= require profile
*= require location
*/
16 changes: 16 additions & 0 deletions app/assets/stylesheets/location.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.leaflet-marker-icon {
background: url("https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-black.png") ;
}

#map_content p {
margin: 0;
}
#map_content label {
margin-bottom: .2rem;
}
#map_content .form-group {
margin-bottom: 1.4rem;
}
#map_content .form-group .btn {
margin-top: .4rem;
}
55 changes: 25 additions & 30 deletions app/views/editor/rich.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
<%= javascript_include_tag('/lib/leaflet-spin/example/leaflet.spin.min.js') %>

<style type="text/css">
.leaflet-marker-icon {
background: url("https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-black.png") ;
}
/* Fix a background-color error on this page. */
body {
background-color: white;
}
Expand Down Expand Up @@ -129,45 +127,44 @@
</div>

<div class="col-lg-6">
<label>By place name</label>
<p>
<input id="placenameInput" type="text" class="form-control" />
</p>
<p><label>Or by entering coordinates</label></p>

<div class="row">
<div class="col-lg-6">
<p>
<label>
Latitude
<div class="form-group">
<label>By place name</label>
<p>
<input id="placenameInput" type="text" class="form-control" />
</p>
</div>

<div class="form-group">
<p><label>Or by entering coordinates</label></p>

<div class="row">
<div class="col-lg-6">
<label>Latitude</label>
<p>
<input
id="lat"
type="text"
class="form-control"
placeholder="Latitude"
/>
</label>
</p>
</div>
</p>
</div>

<div class="col-lg-6">
<p>
<label>
Longitude
<div class="col-lg-6">
<label>Longitude</label>
<p>
<input
id="lng"
type="text"
class="form-control"
placeholder="Longitude"
/>
</label>
</p>
</p>
</div>
</div>
</div>

<br>

<p>
<div class="form-group">
<button
class="btn btn-lg btn-outline-secondary"
onclick="editor.mapModule.blurredLocation.geocodeWithBrowser(true);"
Expand All @@ -177,10 +174,8 @@
Use current location
</div>
</button>
</p>
</div>

<br>

<div class="form-check">
<label class="form-check-label">
<input
Expand All @@ -191,7 +186,7 @@
/>
Blur my location
</label>
<a href="https://publiclab.org/location-privacy">Learn more</a>
<a href="https://publiclab.org/location-privacy" target="_blank">Learn more »</a>
</div>

</div>
Expand Down

0 comments on commit 9dc5409

Please sign in to comment.