[FIX] website: fix top position of modal

Before this commit, the top position of a modal in website was always
the height of the main menu navbar. Even if the main menu navbar was
not displayed when the user is not logged.

That bug was introduced in 6ef622772f

After this commit, the top position of a modal is the height of the
main menu navbar but only if that navbar is displayed.

task-2507949

closes odoo/odoo#69391

X-original-commit: 00ab01d05b3876c5d926e16b9a5d65ace4df7360
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Benjamin Vray
2021-04-19 13:01:46 +00:00
committed by qsm-odoo
parent 61aa892686
commit 079b9556c6
+7 -8
View File
@@ -87,11 +87,6 @@ $-seen-urls: ();
}
#wrapwrap {
// When the modal is in #wrapwrap, position top should be size of the navbar
.modal:not(.s_popup_bottom) {
top: $o-navbar-height;
}
@if o-website-value('body-image') {
background-image: url("/#{str-slice(o-website-value('body-image'), 2)}");
background-position: center;
@@ -181,6 +176,13 @@ $-seen-urls: ();
}
}
#oe_main_menu_navbar:not(.o_hidden) + #wrapwrap {
.o_header_affixed, .modal:not(.s_popup_bottom) {
// For these elements, in #wrapwrap, position top should be size of the navbar
top: $o-navbar-height;
}
}
.navbar {
.navbar-collapse {
@@ -770,9 +772,6 @@ $-transition-duration: 200ms;
}
}
}
#oe_main_menu_navbar + #wrapwrap .o_header_affixed {
top: $o-navbar-height;
}
// Navbar
.navbar .o_extra_menu_items.show > ul {