File tree 2 files changed +15
-19
lines changed
2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -596,9 +596,19 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
596
596
|buf : & mut Buffer | {
597
597
write ! (
598
598
buf,
599
- "<link rel=\" stylesheet\" type=\" text/css\" \
600
- href=\" {root_path}settings{suffix}.css\" >\
601
- <script defer src=\" {root_path}settings{suffix}.js\" ></script>",
599
+ "<div class=\" main-heading\" >\
600
+ <h1 class=\" fqn\" >\
601
+ <span class=\" in-band\" >Rustdoc settings</span>\
602
+ </h1>\
603
+ <span class=\" out-of-band\" >\
604
+ <a id=\" back\" href=\" javascript:void(0)\" onclick=\" history.back();\" >\
605
+ Back\
606
+ </a>\
607
+ </span>\
608
+ </div>\
609
+ <link rel=\" stylesheet\" type=\" text/css\" \
610
+ href=\" {root_path}settings{suffix}.css\" >\
611
+ <script defer src=\" {root_path}settings{suffix}.js\" ></script>",
602
612
root_path = page. static_root_path. unwrap_or( "" ) ,
603
613
suffix = page. resource_suffix,
604
614
)
Original file line number Diff line number Diff line change 206
206
] ;
207
207
208
208
// Then we build the DOM.
209
- let innerHTML = "" ;
210
- let elementKind = "div" ;
211
-
212
- if ( isSettingsPage ) {
213
- elementKind = "section" ;
214
- innerHTML = `<div class="main-heading">
215
- <h1 class="fqn">
216
- <span class="in-band">Rustdoc settings</span>
217
- </h1>
218
- <span class="out-of-band">
219
- <a id="back" href="javascript:void(0)" onclick="history.back();">Back</a>
220
- </span>
221
- </div>` ;
222
- }
223
- innerHTML += `<div class="settings">${ buildSettingsPageSections ( settings ) } </div>` ;
224
-
209
+ const elementKind = isSettingsPage ? "section" : "div" ;
210
+ const innerHTML = `<div class="settings">${ buildSettingsPageSections ( settings ) } </div>` ;
225
211
const el = document . createElement ( elementKind ) ;
226
212
el . id = "settings" ;
227
213
el . innerHTML = innerHTML ;
You can’t perform that action at this time.
0 commit comments