mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "FIX: make full height menu and cloak respect custom headers"
This reverts commit a61d9deba1.
This commit is contained in:
@@ -367,7 +367,7 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
|
|||||||
$headerCloak.show();
|
$headerCloak.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
const menuTop = this.site.mobileView ? headerTop() : headerHeight();
|
const menuTop = this.site.mobileView ? 0 : headerHeight();
|
||||||
|
|
||||||
let height;
|
let height;
|
||||||
const winHeightOffset = 16;
|
const winHeightOffset = 16;
|
||||||
@@ -386,7 +386,6 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
|
|||||||
}
|
}
|
||||||
if (style.top !== menuTop + "px" || style.height !== height) {
|
if (style.top !== menuTop + "px" || style.height !== height) {
|
||||||
$panel.css({ top: menuTop + "px", height });
|
$panel.css({ top: menuTop + "px", height });
|
||||||
$(".header-cloak").css({ top: menuTop + "px" });
|
|
||||||
}
|
}
|
||||||
$("body").removeClass("drop-down-mode");
|
$("body").removeClass("drop-down-mode");
|
||||||
}
|
}
|
||||||
@@ -435,9 +434,3 @@ export function headerHeight() {
|
|||||||
$header.outerHeight() + headerOffsetTop - $(window).scrollTop()
|
$header.outerHeight() + headerOffsetTop - $(window).scrollTop()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function headerTop() {
|
|
||||||
const $header = $("header.d-header");
|
|
||||||
const headerOffset = $header.offset();
|
|
||||||
return headerOffset ? headerOffset.top : 0;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user