Improve display of clippy lints page when JS is disabled
There is no point in displaying the settings menu and the filters if JS is disabled. So in this case, this PR simply hides it:
![image](https://github.com/user-attachments/assets/e96039a9-e698-49b7-bf2b-70e78442b305)
For the theme handling though, I need to send a fix to mdBook first. But once done, it'll look as expected (dark if system is in dark mode).
changelog: Improve clippy lints page display when JS is disabled.
r? `@Alexendoo`
Allow to go through clippy lints page without javascript
Fixes#13536.
This is the follow-up of https://github.com/rust-lang/rust-clippy/pull/13269.
This PR makes it possible to expand/collapse lints (individually) without JS. To achieve this result, there are two ways:
1. Use `details` and `summary` tags. Problem with this approach is that the web browser search may open the `details` tags automatically if content matching it is inside. From a previous discussion with `@Alexendoo,` it seems to not be a desired behaviour.
2. Use a little trick where you use a `label` and a checkbox where the checkbox is in fact hidden. Then it's just a matter of CSS.
r? `@Alexendoo`
changelog: Allow to go through clippy lints page without JS
The URLs contained an extra `clippy_lints`, which resulted in
broken links. Links are generated using each lint's `id_location`,
which already contains the full path inside the repository.
Rewrite lints page
This PR has multiple goals:
* Make lints page to work without needing a web server by removing the json file.
* Prepare the field to also make the page work with JS (not done in this PR but should be straightforward).
* Remove angular dependency.
r? `@Alexendoo`
changelog: make lint page work without web server
Add settings menu on clippy lints page
It looks like this (when the menu is expanded):
![Screenshot from 2024-08-06 21-36-41](https://github.com/user-attachments/assets/c464aef3-b21e-48cc-8e3a-c32a134f995e)
Follow-up of https://github.com/rust-lang/rust-clippy/pull/13178.
Someone pointed out that they should be able to disable the shortcuts on this page like it's the case for rustdoc and docs.rs. So here we go.
The first commit moves the style into its own file: it's much better for a web browser because it can then cache it.
The second one actually adds the new settings menu you can see above.
r? `@Alexendoo`
changelog: Add settings menu on clippy lints page
Add possibility to focus on search input using keyboard
This PR adds the possibility to focus on the search input with `S` or `/` like in rustdoc and `mdbook` and `docs.rs` (unification++). Pressing escape will blur it.
r? `@Alexendoo`
changelog: Add possibility to focus on search input using keyboard