Skip to content

Commit dd1a52f

Browse files
Simplify clippy lints page further
1 parent ecb397a commit dd1a52f

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

util/gh-pages/index_template.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ <h1>Clippy Lints <span id="lint-count" class="badge"></span></h1> {# #}
151151
<label for="label-{{lint.id}}"> {# #}
152152
<h2 class="lint-title"> {# #}
153153
<div class="panel-title-name" id="lint-{{lint.id}}"> {# #}
154-
<span>{{lint.id}}</span> {#+ #}
155-
<a href="#{{lint.id}}" class="lint-anchor anchor label label-default">&para;</a> {#+ #}
154+
{{lint.id +}}
155+
<a href="#{{lint.id}}" class="anchor label label-default">&para;</a> {#+ #}
156156
<a href="" class="copy-to-clipboard anchor label label-default"> {# #}
157157
&#128203; {# #}
158158
</a> {# #}
@@ -170,24 +170,24 @@ <h2 class="lint-title"> {# #}
170170
<div class="list-group-item lint-doc-md">{{Self::markdown(lint.docs)}}</div> {# #}
171171
<div class="lint-additional-info-container">
172172
{# Applicability #}
173-
<div class="lint-additional-info-item"> {# #}
174-
<span> Applicability: </span> {# #}
173+
<div> {# #}
174+
Applicability: {#+ #}
175175
<span class="label label-default label-applicability">{{ lint.applicability_str() }}</span> {# #}
176176
<a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a> {# #}
177177
</div>
178178
{# Clippy version #}
179-
<div class="lint-additional-info-item"> {# #}
180-
<span>{% if lint.group == "deprecated" %}Deprecated{% else %} Added{% endif +%} in: </span> {# #}
179+
<div> {# #}
180+
{% if lint.group == "deprecated" %}Deprecated{% else %} Added{% endif +%} in: {#+ #}
181181
<span class="label label-default label-version">{{lint.version}}</span> {# #}
182182
</div>
183183
{# Open related issues #}
184-
<div class="lint-additional-info-item"> {# #}
184+
<div> {# #}
185185
<a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+{{lint.id}}">Related Issues</a> {# #}
186186
</div>
187187

188188
{# Jump to source #}
189189
{% if let Some(id_location) = lint.id_location %}
190-
<div class="lint-additional-info-item"> {# #}
190+
<div> {# #}
191191
<a href="https://github.com/rust-lang/rust-clippy/blob/master/{{id_location}}">View Source</a> {# #}
192192
</div>
193193
{% endif %}

util/gh-pages/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,10 @@ function addListeners() {
554554
return;
555555
}
556556

557-
if (event.target.classList.contains("lint-anchor")) {
558-
lintAnchor(event);
559-
} else if (event.target.classList.contains("copy-to-clipboard")) {
557+
if (event.target.classList.contains("copy-to-clipboard")) {
560558
copyToClipboard(event);
559+
} else if (event.target.classList.contains("anchor")) {
560+
lintAnchor(event);
561561
}
562562
});
563563

util/gh-pages/style.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ div.panel div.panel-body button.open {
6969
.lint-title .label { display: inline-block; }
7070

7171
.panel-title-name { flex: 1; min-width: 400px;}
72-
.panel-title-name span { vertical-align: bottom; }
7372

7473
.panel .panel-title-name .anchor { display: none; }
7574
.panel:hover .panel-title-name .anchor { display: inline;}
@@ -162,7 +161,7 @@ div.panel div.panel-body button.open {
162161
display: flex;
163162
flex-flow: column;
164163
}
165-
.lint-additional-info-item + .lint-additional-info-item {
164+
.lint-additional-info-container > div + div {
166165
border-top: 1px solid var(--theme-popup-border);
167166
}
168167
}
@@ -171,12 +170,12 @@ div.panel div.panel-body button.open {
171170
display: flex;
172171
flex-flow: row;
173172
}
174-
.lint-additional-info-item + .lint-additional-info-item {
173+
.lint-additional-info-container > div + div {
175174
border-left: 1px solid var(--theme-popup-border);
176175
}
177176
}
178177

179-
.lint-additional-info-item {
178+
.lint-additional-info-container > div {
180179
display: inline-flex;
181180
min-width: 200px;
182181
flex-grow: 1;

0 commit comments

Comments
 (0)