File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,12 @@ window.currentCrate = getVar("current-crate");
49
49
function setMobileTopbar ( ) {
50
50
// FIXME: It would be nicer to generate this text content directly in HTML,
51
51
// but with the current code it's hard to get the right information in the right place.
52
- const mobileLocationTitle = document . querySelector ( ".mobile-topbar h2 " ) ;
52
+ const mobileTopbar = document . querySelector ( ".mobile-topbar" ) ;
53
53
const locationTitle = document . querySelector ( ".sidebar h2.location" ) ;
54
- if ( mobileLocationTitle && locationTitle ) {
55
- mobileLocationTitle . innerHTML = locationTitle . innerHTML ;
54
+ if ( mobileTopbar && locationTitle ) {
55
+ const mobileTitle = document . createElement ( "h2" ) ;
56
+ mobileTitle . innerHTML = locationTitle . innerHTML ;
57
+ mobileTopbar . appendChild ( mobileTitle ) ;
56
58
}
57
59
}
58
60
Original file line number Diff line number Diff line change 84
84
< img class ="rust-logo " src ="{{static_root_path|safe}}{{files.rust_logo_svg}} " alt ="logo "> {# #}
85
85
{% endif %}
86
86
</ a > {# #}
87
- < h2 > </ h2 > {# #}
88
- </ nav > {# #}
87
+ </ nav >
89
88
{% endif %}
90
89
< nav class ="sidebar "> {# #}
91
90
{% if page.css_class != "src" %}
You can’t perform that action at this time.
0 commit comments