2022-03-18 10:44:08 +00:00
|
|
|
export const getBannerAttribute = () => {
|
|
|
|
const bar = document.getElementById("bar-banner");
|
|
|
|
const mainBar = document.getElementById("main-bar");
|
|
|
|
const rects = mainBar ? mainBar.getBoundingClientRect() : null;
|
|
|
|
|
|
|
|
const headerHeight = bar ? 108 + 50 : mainBar ? rects.height + 40 : 48 + 50;
|
|
|
|
const sectionHeaderTop = bar
|
|
|
|
? "108px"
|
|
|
|
: rects
|
|
|
|
? rects.height + 40 + "px"
|
|
|
|
: "48px";
|
|
|
|
const sectionHeaderMarginTop = bar
|
2022-03-28 07:28:45 +00:00
|
|
|
? "106px"
|
2022-03-18 10:44:08 +00:00
|
|
|
: rects
|
2022-03-28 07:28:45 +00:00
|
|
|
? rects.height + 36 + "px"
|
2022-03-24 07:08:16 +00:00
|
|
|
: "46px";
|
2022-03-18 10:44:08 +00:00
|
|
|
|
|
|
|
return { headerHeight, sectionHeaderTop, sectionHeaderMarginTop };
|
|
|
|
};
|