quimper: adjust map height on mobile to take title into account

This commit is contained in:
Frédéric Péters 2020-02-02 11:45:53 +01:00
parent 2bff82e78f
commit e0e832723a
1 changed files with 7 additions and 1 deletions

View File

@ -12,11 +12,17 @@ $(function() {
$('div.cell').delegate('.parking', 'click', function(e) {
$(this).removeClass('shown');
});
/* move footer to navigation menu on mobile... */
if (mql.matches) {
/* move footer to navigation menu on mobile... */
var $burger = $('#nav ul');
$('footer .menucell li').each(function(idx, li) {
$(li).detach().addClass('footer-link').appendTo($burger);
});
/* and compute map height to match screen height */
if ($('.cell.parkings').length) {
var cell_top = $('div.cell.map div.combo-cell-map.leaflet-container').position().top;
$('div.cell.map div.combo-cell-map.leaflet-container').css('height',
'calc(100vh - ' + (64 + cell_top) + 'px)');
}
}
});