fix feed panel display on mobile

This commit is contained in:
2019-03-11 13:18:15 +01:00
parent 5bb13e54bd
commit 048bb6497f
5 changed files with 35 additions and 6 deletions

View File

@@ -387,12 +387,10 @@ function updateFeed(bFirstChunk, bDiscrete)
if(bFirstChunk===true) { if(bFirstChunk===true) {
self.tmp('news_chunk', 0); self.tmp('news_chunk', 0);
if(!bDiscrete) $('#projects').removeClass('with-feed');
} }
self.get('feed', function(asData) { self.get('feed', function(asData) {
$('#loading').hide(); $('#loading').hide();
if(!bDiscrete) $('#projects').addClass('with-feed');
$.each(asData, function(iKey, asPost){ $.each(asData, function(iKey, asPost){
$Posts.append(getPost(asPost)); $Posts.append(getPost(asPost));

View File

@@ -31,6 +31,11 @@ $legend-color: #222;
max-width: calc(#{$feed-width-max}); max-width: calc(#{$feed-width-max});
} }
#feed {
z-index: 999;
transition: none;
}
#post-button { #post-button {
.fa { .fa {
@extend .fa-next; @extend .fa-next;
@@ -193,7 +198,10 @@ $legend-color: #222;
bottom: 0; bottom: 0;
width: calc(#{$feed-width}); width: calc(#{$feed-width});
max-width: calc(#{$feed-width-max}); max-width: calc(#{$feed-width-max});
z-index: 999; z-index: -1;
transition-property: z-index;
transition-duration: 0.1s;
transition-delay: 0.5s;
overflow: hidden; overflow: hidden;
input, textarea, button { input, textarea, button {

View File

@@ -1,7 +1,30 @@
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
.desktop, .leaflet-control-container { .desktop {
display: none; display: none;
} }
#projects {
&.with-feed {
#submap {
width: 100%;
}
.leaflet-right {
width: calc(100% - 44px - 2 * #{$block-spacing});
}
}
.leaflet-control-container {
.leaflet-top.leaflet-left, .leaflet-bottom.leaflet-left, .leaflet-bottom.leaflet-right {
display: none;
}
}
#feed {
width: calc(100% - 44px - 2 * #{$block-spacing});
}
}
} }
@media only screen and (min-width: 801px) { @media only screen and (min-width: 801px) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long