hinode icon indicating copy to clipboard operation
hinode copied to clipboard

Switching themes does not work properly

Open markdumay opened this issue 1 year ago • 1 comments

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

markdumay avatar Sep 09 '24 05:09 markdumay

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.

markdumay avatar Sep 09 '24 05:09 markdumay

The fix has been released in https://github.com/gethinode/hinode/releases/tag/v0.27.0.

markdumay avatar Oct 21 '24 11:10 markdumay