fix(search): eliminate duplicate searchbar#1059
Conversation
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request disables the sidebar search box in the hugo.toml configuration. Feedback was provided regarding a potential accessibility issue where mobile users might lose all search functionality, suggesting that the navbar search visibility be adjusted or a mobile-specific toggle be added.
| sidebar_menu_compact = true | ||
| # Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) | ||
| sidebar_search_disable = false | ||
| sidebar_search_disable = true |
There was a problem hiding this comment.
Disabling the sidebar search while the navbar search is hidden on mobile devices (due to the d-none d-lg-block classes in layouts/partials/navbar.html) will leave mobile users without any search functionality. To maintain accessibility, consider updating the navbar search to be visible on all screen sizes or providing a mobile-specific search toggle.
There was a problem hiding this comment.
Desktop view: navbar search is shown and sidebar search is removed.
Mobile view: sidebar search is automatically shown by the theme, so search still works on both screens with no loss of functionality.
|
|
Thanks @Sbragul26 lgtm!! |
Notes for Reviewers
This PR fixes #1057
It eliminates the duplicate search field by disabling the sidebar search, keeping only the top navbar search. Sidebar content now fills the available space from the top. Users can access search using the navbar search bar or by pressing “/” to quickly focus the search.
Signed commits