mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Account for header when locking the sidebar (#15847)
This commit is contained in:
parent
7c45fce74f
commit
2d95b176f7
@ -37,8 +37,9 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const sidebar = document.querySelector("#sidebar").querySelector(".grid");
|
||||
if (sidebar) {
|
||||
const content = document.querySelector(".page-content").querySelector(".grid-wrapper")
|
||||
if (sidebar.clientHeight > content.clientHeight || sidebar.clientHeight > window.innerHeight) {
|
||||
const content = document.querySelector(".page-content").querySelector(".grid-wrapper");
|
||||
const windowHeight = window.innerHeight - 82;
|
||||
if (sidebar.clientHeight > content.clientHeight || sidebar.clientHeight > windowHeight) {
|
||||
sidebar.style.display = "contents"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user