Closed welpo closed 11 months ago
Name | Link |
---|---|
Latest commit | 0c0c0e18de8c0db6a9f470fc5b85b367d588f2f1 |
Latest deploy log | https://app.netlify.com/sites/abridge/deploys/64cad8a2f7dea30008bd5897 |
Deploy Preview | https://deploy-preview-131--abridge.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
ah another relic of the past, at one point there was only a couple of js features, and I think I only hid the js search initially.
Thanks for spotting this, appreciate it.
Understandable! I was working on hiding the theme switcher button on my theme, and at first I made it hide by default but become visible with the theme switcher js.
I decided to check out how you did it with abridge and I liked the idea of making it more versatile for possible future additions. So I copied your way of doing it (https://github.com/welpo/tabi/commit/113a7f4e5d4efd87646f8c26f81b7754ea7f41e2) and noticed the issue with build_search_index
.
Currently, the
nojs.css
file is only loaded whenconfig.build_search_index
returns false. This file is responsible for hiding JavaScript elements when JavaScript is disabled in the user's browser.In practice, this means JavaScript elements like the theme switcher button or the encoded email (in the socials section) are mistakenly visible when JavaScript is disabled, as long as
build_search_index
is not set totrue
inconfig.toml
. This is contrary to the expected behavior where these elements should be hidden when JavaScript is disabled, irrespective of thebuild_search_index
setting.This PR fixes this issue by removing the conditional, effectively ensuring that the
nojs.css
file is always loaded when JavaScript is disabled. This change aligns the behavior with the intended functionality of hiding specific JavaScript-dependent elements when JavaScript is not enabled.