Summary Files Commits Branches @commit @diff @stats
path: root / src / scripts
diff options
context:
space:
mode:
Commit711a6fe25d118497043fadd10039bbf02c10f60c (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-07-11 17:09:05 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-07-11 17:09:05 +0300
Filese270f742f990a66b6aed6be6d3d4cbc49d0ac092 /src/scripts
syndamia.com-711a6fe25d118497043fadd10039bbf02c10f60c.tar
syndamia.com-711a6fe25d118497043fadd10039bbf02c10f60c.tar.gz
syndamia.com-711a6fe25d118497043fadd10039bbf02c10f60c.zip
Parenta6f8798525b666e9befc59b57251f051976d0d19 (diff)
[expand-navbar] Fixed navbar not automatically hiding on small screens
1 files changed, 1 insertions, 1 deletions
-rw-r--r--src/scripts/expand-navbar.js2
diff --git a/src/scripts/expand-navbar.js b/src/scripts/expand-navbar.js
index 614a948..4cea31c 100644
--- a/src/scripts/expand-navbar.js
+++ b/src/scripts/expand-navbar.js
@@ -1,7 +1,7 @@
const expandBtn = document.getElementById('expandNavbarBtn');
const sidebarElem = document.getElementById('sidebar');
-if (localStorage.getItem('navbar') === 'hidden' || window.innerWidth <= 610) {
+if (localStorage.getItem('navbar') === 'hidden' || window.innerWidth <= 610 || window.innerHeight <= 610) {
expandBtn.innerText = '\u25BC';
sidebarElem.classList.add('sidebar-hidden');
}