File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 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");
4949function setMobileTopbar ( ) {
5050 // FIXME: It would be nicer to generate this text content directly in HTML,
5151 // 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" ) ;
5353 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 ) ;
5658 }
5759}
5860
Original file line number Diff line number Diff line change 8484 < img class ="rust-logo " src ="{{static_root_path|safe}}{{files.rust_logo_svg}} " alt ="logo "> {# #}
8585 {% endif %}
8686 </ a > {# #}
87- < h2 > </ h2 > {# #}
88- </ nav > {# #}
87+ </ nav >
8988 {% endif %}
9089 < nav class ="sidebar "> {# #}
9190 {% if page.css_class != "src" %}
You can’t perform that action at this time.
0 commit comments