mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-20 21:19:31 -07:00
move footerUpdate function to overlay.ts and combine it with recenter function
This commit is contained in:
@@ -61,18 +61,3 @@ export const center = (e: HTMLDivElement): void => {
|
||||
e.style.top = 'calc((100% - 31px) / 2 + 31px)'
|
||||
}
|
||||
}
|
||||
|
||||
export function footerHeightUpdateInit(): void {
|
||||
window.addEventListener(
|
||||
'resize',
|
||||
() => {
|
||||
const r = document.querySelector(':root') as HTMLElement
|
||||
if (window.innerWidth > 768) {
|
||||
r.style.setProperty('--footer-height', '38px')
|
||||
} else {
|
||||
r.style.setProperty('--footer-height', '31px')
|
||||
}
|
||||
},
|
||||
{ passive: true }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user