Switching themes does not work properly
Discussed in https://github.com/gethinode/hinode/discussions/1139
Originally posted by massrez August 27, 2024 Mark, hello. Thank you for your work. The theme is great. I want to point out that switching themes (dark - light) does not work properly for navbar.
To get the theme switching error, you need to scroll down the page, switch the theme, go back up and try to switch again.
the error is related to <nav class="navbar p-4 navbar-fixed-top navbar-expand-lg" data-bs-theme="dark" style="--bs-navbar-expanded-color: var(--bs-body-bg);">
namely the value of the variable
data-bs-theme="dark"
data-bs-theme="light"
in versions where everything worked correctly the value was data-bs-theme="null" (in the position of the page scroll up)
to fix it, you need to edit the navbar.js file responsible code if (defaultTheme) { navbar.setAttribute('data-bs-theme', defaultTheme) }
the specified incorrect work is easily reproduced on gethinode.com
Thanks for sharing this issue @massrez. I've converted the conversation into a bug, so I can better track its progress. I'm able to reproduce the error following the steps you described. I'll look into it.
The fix has been released in https://github.com/gethinode/hinode/releases/tag/v0.27.0.