Spaces:
Running
Running
thibaud frere
commited on
Commit
·
b05faf0
1
Parent(s):
e0e09d3
update
Browse files
app/src/components/ThemeToggle.astro
CHANGED
|
@@ -53,9 +53,9 @@
|
|
| 53 |
const nodes = Array.from(document.querySelectorAll('*'));
|
| 54 |
for (const el of nodes) {
|
| 55 |
const cs = window.getComputedStyle(el);
|
| 56 |
-
if (cs.position === 'fixed' && cs.top === '0px'
|
| 57 |
const rect = el.getBoundingClientRect();
|
| 58 |
-
if (rect.top <= 1 && rect.height <= 80) {
|
| 59 |
topbar = Math.max(topbar, Math.ceil(rect.bottom));
|
| 60 |
}
|
| 61 |
}
|
|
|
|
| 53 |
const nodes = Array.from(document.querySelectorAll('*'));
|
| 54 |
for (const el of nodes) {
|
| 55 |
const cs = window.getComputedStyle(el);
|
| 56 |
+
if (cs.position === 'fixed' && cs.top === '0px') {
|
| 57 |
const rect = el.getBoundingClientRect();
|
| 58 |
+
if (rect.top <= 1 && rect.height > 0 && rect.height <= 80) {
|
| 59 |
topbar = Math.max(topbar, Math.ceil(rect.bottom));
|
| 60 |
}
|
| 61 |
}
|