Commit Graph

20 Commits

Author SHA1 Message Date
bors
52b8324503 Auto merge of #13585 - GuillaumeGomez:no-js, r=Alexendoo
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`
2024-11-02 13:49:04 +00:00
Guillaume Gomez
ac764df8ab Handle noscript style with "js" class on <html>. 2024-11-01 20:20:12 +01:00
Guillaume Gomez
c056928af2 Improve display of clippy lints page when JS is disabled 2024-11-01 20:20:12 +01:00
Guillaume Gomez
7115404a97 Open lint when clicking on its anchor 2024-10-23 16:58:06 +02:00
Guillaume Gomez
97d13a8c0a Fix not working lint anchor 2024-10-22 22:50:17 +02:00
René Kijewski
2a5de352a1 docs: remove stray comma 2024-10-20 14:47:01 +02:00
bors
6a795887c4 Auto merge of #13539 - GuillaumeGomez:allow-no-js, 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
2024-10-18 19:24:16 +00:00
Guillaume Gomez
82969e5c4e Allow to go through clippy lints page without javascript 2024-10-18 18:03:16 +02:00
Anastasis Georgoulas
b86a48955e Fix link to source
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.
2024-10-15 22:42:51 +01:00
Guillaume Gomez
603934336d Greatly reduce generated HTML page size 2024-10-03 11:17:33 +02:00
Guillaume Gomez
823c1246ab Move inlined CSS into style.css 2024-10-03 11:12:19 +02:00
Guillaume Gomez
8a3d4e1a70 Replace rinja custom syntax with default syntax
Since all angular code was removed, there is no conflict anymore before angular and jinja2 syntaxes so we can just use plain jinja2 syntax.
2024-10-03 11:12:19 +02:00
Guillaume Gomez
d52b9aa564 Move theme handling JS into its own file to make theme being applied before first rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
47f40d468a Improve rendering speed by moving settings generation after theme rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
59ccebe426 Support all filters except versions 2024-10-03 11:12:19 +02:00
Guillaume Gomez
aeb548a4f7 Put back interactions with settings menus 2024-10-03 11:12:11 +02:00
Guillaume Gomez
f2193c680c Completely remove angular and generate parts of settings in JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
574e3dd922 Finish porting lint functionalities to vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
0055cebaa3 Replace search with vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
b522e7a944 Generate lint list in HTML directly instead of JS 2024-09-22 22:30:44 +02:00