mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
Fix sidebar footer overlap (#16181)
This commit is contained in:
parent
87c121ec1c
commit
ed301346b6
@ -36,10 +36,11 @@
|
||||
// Some sidebars are longer than the screen so they can't be locked.
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const sidebar = document.querySelector("#sidebar").querySelector(".grid");
|
||||
const footer = document.querySelector("footer").querySelector(".grid")
|
||||
if (sidebar) {
|
||||
const content = document.querySelector(".page-content").querySelector(".grid-wrapper");
|
||||
const windowHeight = window.innerHeight - 82;
|
||||
if (sidebar.clientHeight > content.clientHeight || sidebar.clientHeight > windowHeight) {
|
||||
if (sidebar.clientHeight > content.clientHeight || sidebar.clientHeight > windowHeight - footer.clientHeight) {
|
||||
sidebar.style.display = "contents"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user