Skip to content

Commit 03ef44c

Browse files
committed
Adds content-desktop class to hide map on mobile (codefordurham#171)
1 parent b97f8ef commit 03ef44c

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

eatsmart/static/css/site.css

+24-2
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,14 @@ tr.violation-detail td {
322322
text-align: center;
323323
margin-top: 15px;
324324
}
325-
}
326-
327325

326+
}
328327

329328
.main-map {
330329
height: 300px;
331330
margin-bottom: 10px;
332331
}
332+
333333
@media screen and (max-width: 768px) {
334334
.main-map {
335335
height: 150px;
@@ -346,3 +346,25 @@ tr.violation-detail td {
346346
padding-right: 13px;
347347

348348
}
349+
350+
/* Content Desktop controls what is visible based on typical
351+
content size of iPad portrait, otherwise the content is
352+
hidden
353+
*/
354+
355+
@media screen and (min-width: 768px) {
356+
357+
.content-desktop {
358+
display: block;
359+
}
360+
361+
}
362+
363+
@media screen and (min-width: 0px) and (max-width: 768px) {
364+
365+
.content-desktop {
366+
display: none;
367+
}
368+
369+
}
370+

eatsmart/templates/inspections/establishment_list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{% block body_id %}establishment-list{% endblock %}
99

1010
{% block map %}
11-
<div class="row">
11+
<div class="row content-desktop">
1212
<div class=" col-md-12">
1313
<div id='map' class="main-map"></div>
1414
</div>

eatsmart/templates/map.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{% block map %}
77
<h1>MAP</h1>
8-
<div class="row col-md-12">
8+
<div class="row col-md-12 content-desktop">
99
{% leaflet_map "main-map" callback="main_map_init" %}
1010
<script type="text/javascript">
1111
function main_map_init (map, options) {

0 commit comments

Comments
 (0)