montpellier: add roadworks css/js (#73652)
This commit is contained in:
parent
3f0215c179
commit
cdd717133c
|
@ -1,5 +1,6 @@
|
||||||
$cell-map-height: calc(100vh - 265px);
|
$cell-map-height: calc(100vh - 265px) !default;
|
||||||
$cell-map-mobile-height: calc(100vh - 108px);
|
$cell-map-mobile-height: calc(100vh - 108px) !default;
|
||||||
|
$roadwork-width: 400px !default;
|
||||||
|
|
||||||
.page-template-roadworks-map {
|
.page-template-roadworks-map {
|
||||||
#main-content {
|
#main-content {
|
||||||
|
@ -42,8 +43,8 @@ $cell-map-mobile-height: calc(100vh - 108px);
|
||||||
height: calc(#{$cell-map-height} + 2px);
|
height: calc(#{$cell-map-height} + 2px);
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
width: 25vw;
|
width: $roadwork-width;
|
||||||
transform: translateX(25vw);
|
transform: translateX($roadwork-width);
|
||||||
transition: transform linear 250ms;
|
transition: transform linear 250ms;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
h3 {
|
h3 {
|
||||||
|
|
|
@ -978,3 +978,22 @@ p#help {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-template-roadworks-map {
|
||||||
|
.leaflet-marker-icon {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.chantier .chantier--libelle {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.chantier {
|
||||||
|
padding: 0;
|
||||||
|
> h3 {
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
font-size: 110%;
|
||||||
|
}
|
||||||
|
> div {
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -42,3 +42,5 @@ $wcs-steps-spacing: 0.7rem;
|
||||||
$wcs-step-background: #fbfbfb;
|
$wcs-step-background: #fbfbfb;
|
||||||
|
|
||||||
$or-separator: false;
|
$or-separator: false;
|
||||||
|
|
||||||
|
$cell-map-mobile-height: calc(100vh - 198px);
|
||||||
|
|
|
@ -59,4 +59,26 @@ $(function() {
|
||||||
$(this).parent().toggleClass('on');
|
$(this).parent().toggleClass('on');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.page-template-roadworks-map div.cell.map').on('combo:map-feature-prepare', function(ev, info) {
|
||||||
|
info.layer.on('click', function(ev) {
|
||||||
|
var marker = info.layer;
|
||||||
|
var chantier_id = marker.feature.properties.IDCHANTIER || marker.feature.properties.id;
|
||||||
|
var $cell = $('[data-chantier-id=' + chantier_id + ']');
|
||||||
|
if ($cell.hasClass('shown')) {
|
||||||
|
$('.chantier').removeClass('shown');
|
||||||
|
} else {
|
||||||
|
$('.chantier[data-chantier-id!=' + chantier_id + ']').removeClass('shown');
|
||||||
|
$('.chantier').show();
|
||||||
|
$cell.addClass('shown');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if ($('.page-template-roadworks-map').length) {
|
||||||
|
$(document).on('combo:cell-loaded combo:roadworks-loaded', function(ev, elem) {
|
||||||
|
$('.chantier').off('click').on('click', function() { $(this).toggleClass('shown'); });
|
||||||
|
});
|
||||||
|
$(document).trigger('combo:roadworks-loaded');
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,5 +16,6 @@
|
||||||
@import '../includes/back-top';
|
@import '../includes/back-top';
|
||||||
@import '../includes/library';
|
@import '../includes/library';
|
||||||
@import '../includes/authentic';
|
@import '../includes/authentic';
|
||||||
|
@import '../montpellier-ville/chantiers';
|
||||||
|
|
||||||
@import 'custom';
|
@import 'custom';
|
||||||
|
|
Loading…
Reference in New Issue