Skip to content

Commit

Permalink
Merge pull request #61 from Yaronkr/map-fixing
Browse files Browse the repository at this point in the history
fix maps
  • Loading branch information
yujia10 committed Jun 16, 2022
2 parents dc76e86 + afdfc23 commit 66953f1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
6 changes: 6 additions & 0 deletions app/assets/stylesheets/pages/_childcares-index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.childcares-index-container {
margin-top: 30px;
}
#map {
width: 100%;
height: 100vh;
position: sticky;
top: 0;
}

// body {
// background-color: #FAEEE7;
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/pages/_show.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}

.map-container {
width: 500px;
height: 500px;
border-radius: 20px;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/childcares/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>
</div>

<div id="map" style="width: 100%; height: 600px"
<div id="map"
data-controller="mapbox"
data-mapbox-markers-value="<%= @markers.to_json %>"
data-mapbox-api-key-value="<%= ENV['MAPBOX_API_KEY'] %>">
Expand Down
23 changes: 13 additions & 10 deletions app/views/childcares/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@

<%= render 'shared/show_photo_banner'%>

<div class="map-wrraper d-flex justify-content-between">
<div class="container map-container pl-40 mr-10 ">
<div class="map-wrraper">
<div class="container d-flex justify-content-between">

<div class="map-container w-75 mx-5">
<div id="show-map"
data-controller="mapbox"
data-mapbox-markers-value="<%= @markers.to_json %>"
data-mapbox-api-key-value="<%= ENV['MAPBOX_API_KEY'] %>">
</div>
</div>
<div class="conatiner opening-hours mr-30">
<h2 style="padding-bottom: 20px;"> <strong>Opening Hours</strong></h2>
<ul>
<% @childcare.opening_hours.each do |time| %>
<li style="white-space: nowwrap; width:300px;"><%= time.time %></li>
<% end %>
</ul>
</div>
<div class="opening-hours">
<h2 style="padding-bottom: 20px; font-size: 24px"> <strong>Opening Hours</strong></h2>
<ul>
<% @childcare.opening_hours.each do |time| %>
<li class="my-2" style="white-space: nowwrap; width:300px;"><%= time.time %></li>
<% end %>
</ul>
</div>
</div>
</div>

<div style="background-color: #FAEEE7; padding-top:2px;">
Expand Down

0 comments on commit 66953f1

Please sign in to comment.