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-23 11:08:51 +00:00
|
|
|
? "62px"
|
2022-03-18 10:44:08 +00:00
|
|
|
: rects
|
2022-03-23 11:08:51 +00:00
|
|
|
? rects.height - 30 + 36 + "px"
|
|
|
|
: "62px";
|
2022-03-18 10:44:08 +00:00
|
|
|
|
|
|
|
return { headerHeight, sectionHeaderTop, sectionHeaderMarginTop };
|
|
|
|
};
|