Added some responsivity

This commit is contained in:
feliciaan 2014-12-10 22:26:09 +01:00
parent b9208a36fb
commit 651d598b9c
2 changed files with 51 additions and 7 deletions

49
map.css
View file

@ -15,8 +15,15 @@ html, body {
border-radius: 0px; border-radius: 0px;
} }
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
width: 400px; width: 600px;
max-height: 400px;
overflow-y:auto
}
.leaflet-popup-content {
width:auto !important;
} }
h4 { h4 {
@ -27,14 +34,20 @@ h4 {
table { table {
padding-bottom: 10px; padding-bottom: 10px;
border-spacing: 0; border-spacing: 0;
width: 100%
} }
tr td:first-child { .desktop tr td {
padding-right: 5px;
width: 75;
}
.mobile tr td:first-child {
padding: 0; padding: 0;
padding-right: 10px; padding-right: 10px;
} }
.table tr:nth-child(2n) { .mobile tr:nth-child(2n) {
background: rgb(244,244,244); background: rgb(244,244,244);
} }
@ -50,3 +63,33 @@ tr td:first-child {
top: 15px; top: 15px;
right: 15px; right: 15px;
} }
.mobile {
display: none;
}
@media screen and (max-width: 1000px) {
.leaflet-popup-content-wrapper {
width: 250px;
}
.desktop {
display: none;
}
.mobile {
display: block;
width: 213px;
}
h3, .text {
max-width: 150px;
}
}
@media screen and (max-height: 400px) {
.leaflet-popup-content-wrapper {
max-height: 150px;
}
}

View file

@ -16,11 +16,12 @@
<script id="popup-template" type="text/x-handlebars-template"> <script id="popup-template" type="text/x-handlebars-template">
<div id="resto-popup"> <div id="resto-popup">
<h3>{{name}} ({{capacity}} pl.)</h3> <h3>{{name}} ({{capacity}} pl.)</h3>
Locatie: {{address}}<br />
Van {{period.start}} tot {{period.end}}<br />
<img src="{{type}}.png" class="type"> <img src="{{type}}.png" class="type">
<div class="text">Locatie: {{address}}<br />
Van {{period.start}} tot {{period.end}}
</div>
<h4>Openingsuren</h4> <h4>Openingsuren</h4>
<table> <table class="desktop">
<tr> <tr>
<td>Maandag</td> <td>Maandag</td>
<td>Dinsdag</td> <td>Dinsdag</td>
@ -40,7 +41,7 @@
<td>{{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
</table> </table>
<table class="table"> <table class="mobile">
<tr> <tr>
<td>Maandag</td> <td>Maandag</td>
<td>{{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}}</td>