diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-04 13:57:38 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-04 13:57:38 +0200 |
| commit | dd1a52f8b6ced8f49384859bbf379c9a05493f5c (patch) | |
| tree | de1c06e9f56123d8ace97758a476c67863ab8c2d | |
| parent | ecb397a3650d9a6001a2c3a7b51f395c1625727a (diff) | |
| download | rust-dd1a52f8b6ced8f49384859bbf379c9a05493f5c.tar.gz rust-dd1a52f8b6ced8f49384859bbf379c9a05493f5c.zip | |
Simplify clippy lints page further
| -rw-r--r-- | util/gh-pages/index_template.html | 16 | ||||
| -rw-r--r-- | util/gh-pages/script.js | 6 | ||||
| -rw-r--r-- | util/gh-pages/style.css | 7 |
3 files changed, 14 insertions, 15 deletions
diff --git a/util/gh-pages/index_template.html b/util/gh-pages/index_template.html index 458f20d9f99..6f380ec8fee 100644 --- a/util/gh-pages/index_template.html +++ b/util/gh-pages/index_template.html @@ -151,8 +151,8 @@ Otherwise, have a great day =^.^= <label for="label-{{lint.id}}"> {# #} <h2 class="lint-title"> {# #} <div class="panel-title-name" id="lint-{{lint.id}}"> {# #} - <span>{{lint.id}}</span> {#+ #} - <a href="#{{lint.id}}" class="lint-anchor anchor label label-default">¶</a> {#+ #} + {{lint.id +}} + <a href="#{{lint.id}}" class="anchor label label-default">¶</a> {#+ #} <a href="" class="copy-to-clipboard anchor label label-default"> {# #} 📋 {# #} </a> {# #} @@ -170,24 +170,24 @@ Otherwise, have a great day =^.^= <div class="list-group-item lint-doc-md">{{Self::markdown(lint.docs)}}</div> {# #} <div class="lint-additional-info-container"> {# Applicability #} - <div class="lint-additional-info-item"> {# #} - <span> Applicability: </span> {# #} + <div> {# #} + Applicability: {#+ #} <span class="label label-default label-applicability">{{ lint.applicability_str() }}</span> {# #} <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a> {# #} </div> {# Clippy version #} - <div class="lint-additional-info-item"> {# #} - <span>{% if lint.group == "deprecated" %}Deprecated{% else %} Added{% endif +%} in: </span> {# #} + <div> {# #} + {% if lint.group == "deprecated" %}Deprecated{% else %} Added{% endif +%} in: {#+ #} <span class="label label-default label-version">{{lint.version}}</span> {# #} </div> {# Open related issues #} - <div class="lint-additional-info-item"> {# #} + <div> {# #} <a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+{{lint.id}}">Related Issues</a> {# #} </div> {# Jump to source #} {% if let Some(id_location) = lint.id_location %} - <div class="lint-additional-info-item"> {# #} + <div> {# #} <a href="https://github.com/rust-lang/rust-clippy/blob/master/{{id_location}}">View Source</a> {# #} </div> {% endif %} diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js index 285aa34e701..ee13f1c0cd8 100644 --- a/util/gh-pages/script.js +++ b/util/gh-pages/script.js @@ -554,10 +554,10 @@ function addListeners() { return; } - if (event.target.classList.contains("lint-anchor")) { - lintAnchor(event); - } else if (event.target.classList.contains("copy-to-clipboard")) { + if (event.target.classList.contains("copy-to-clipboard")) { copyToClipboard(event); + } else if (event.target.classList.contains("anchor")) { + lintAnchor(event); } }); diff --git a/util/gh-pages/style.css b/util/gh-pages/style.css index 046a2a5df7c..022ea875200 100644 --- a/util/gh-pages/style.css +++ b/util/gh-pages/style.css @@ -69,7 +69,6 @@ div.panel div.panel-body button.open { .lint-title .label { display: inline-block; } .panel-title-name { flex: 1; min-width: 400px;} -.panel-title-name span { vertical-align: bottom; } .panel .panel-title-name .anchor { display: none; } .panel:hover .panel-title-name .anchor { display: inline;} @@ -162,7 +161,7 @@ div.panel div.panel-body button.open { display: flex; flex-flow: column; } - .lint-additional-info-item + .lint-additional-info-item { + .lint-additional-info-container > div + div { border-top: 1px solid var(--theme-popup-border); } } @@ -171,12 +170,12 @@ div.panel div.panel-body button.open { display: flex; flex-flow: row; } - .lint-additional-info-item + .lint-additional-info-item { + .lint-additional-info-container > div + div { border-left: 1px solid var(--theme-popup-border); } } -.lint-additional-info-item { +.lint-additional-info-container > div { display: inline-flex; min-width: 200px; flex-grow: 1; |
