templates: add conditionnal 'has-pwa-navigation' CSS class on body (#51802)

This commit is contained in:
Thomas Jund 2021-03-08 16:57:06 +01:00
parent a303ee1879
commit 307fab9496
10 changed files with 17 additions and 17 deletions

View File

@ -250,7 +250,7 @@ div#footer {
.site-nav, #pwa-navigation {
display: none;
}
.pwa-navigation ~ footer {
&.has-pwa-navigation footer {
margin-bottom: 0;
}
#footer-wrapper {

View File

@ -248,7 +248,7 @@ div#consent_banner {
@extend %top-consent-banner;
}
} @else {
body.pwa div#consent_banner {
.has-pwa-navigation div#consent_banner {
@extend %top-consent-banner;
}
}

View File

@ -436,7 +436,7 @@ div.menucell {
}
@media screen and (max-width: $nav-mobile-limit) {
.pwa-navigation ~ footer {
.has-pwa-navigation footer {
margin-bottom: $nav-mobile-bottom-bar-height;
}
}

View File

@ -189,7 +189,7 @@ div.gru-nav .gru-nav-button {
}
}
}
.pwa-navigation ~ footer {
.has-pwa-navigation footer {
margin-bottom: 0;
}
}

View File

@ -232,7 +232,7 @@ div.gru-nav .gru-nav-button {
}
}
}
.pwa-navigation ~ footer {
.has-pwa-navigation footer {
margin-bottom: 0;
}
}
@ -1273,7 +1273,7 @@ form ul.errorlist {
}
}
body.anonymous-user {
#pwa-navigation ~ footer {
&.has-pwa-navigation footer {
margin-bottom: 0;
}
}

View File

@ -284,15 +284,15 @@ div.gru-nav {
}
// PWA nav
.pwa-navigation {
@media ($min-desktop-viewport) {
@media ($min-desktop-viewport) {
.pwa-navigation {
display: none;
& ~ footer {
margin-bottom: 0;
}
}
.has-pwa-navigation footer {
margin-bottom: 0;
}
}
.pwa-navigation {
text-transform: uppercase;
box-shadow: 0 0 2px 1px white;

View File

@ -590,7 +590,7 @@ div#gauche {
// FOOTER
//
footer {
.has-pwa-navigation footer {
@media ($max-mobile-viewport) {
margin-bottom: calc(#{$nav-mobile-bottom-bar-height} + 2em);
}

View File

@ -903,7 +903,7 @@ div.wcs-tracking-code-input {
.gru-content #sidebar div.cell {
margin-right: 0;
}
footer {
.has-pwa-navigation footer {
margin-bottom: $mobile-navigation-height;
}
#footer-wrapper {

View File

@ -1089,7 +1089,7 @@ div#gauche {
// FOOTER
//
footer {
.has-pwa-navigation footer {
// keep space for PWA nav
@media ($max-mobile-viewport) {
margin-bottom: $nav-mobile-bottom-bar-height;

View File

@ -76,7 +76,7 @@ data-api-root="{{ site_base }}/api/"
{% endblock %}
{% block bodyclasses %}
{% if pwa_display %}pwa{% endif %}
{% if pwa_display %}{% pwa_navigation as pwa_navigation %}{% if pwa_navigation %}has-pwa-navigation{% endif %}{% endif %}
{% get_asset "header:background" as header_background %}{% if header_background %}has-header-background{% endif %}
page-{{ page.slug }}
page-template-{{ page.template_name }}