Skip to content

Commit b050e32

Browse files
committed
Fix sidebar by making navigation postion fixed
Closes: #184
1 parent 579f83b commit b050e32

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

templates/navigation_rustdoc.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="nav-container">
1+
<div class="nav-container nav-container-rustdoc">
22
<div class="container-rustdoc rustdoc-navigation">
33
<div class="pure-menu pure-menu-horizontal">
44
<form action="/releases/search" method="GET" class="landing-search-form-nav">

templates/style.scss

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ html, button, input, select, textarea,
5151
div.rustdoc {
5252
font-family: $font-family-serif;
5353
padding: 10px 15px 20px 15px;
54-
}
54+
margin-top: 32px;
5555

56-
.sidebar {
57-
padding-top: 32px;
58-
z-index: -1;
56+
.sidebar {
57+
padding-top: 32px;
58+
.block > ul > li {
59+
margin-right: -10px;
60+
}
61+
}
5962
}
6063

6164
body {
@@ -103,13 +106,6 @@ div.container {
103106
div.container-rustdoc {
104107
max-width: 1200px;
105108
text-align: left;
106-
107-
#theme-picker {
108-
margin-top: 30px;
109-
}
110-
#theme-choices {
111-
top: 60px;
112-
}
113109
}
114110

115111
div.nav-container {
@@ -221,6 +217,14 @@ div.nav-container {
221217
}
222218
}
223219

220+
div.nav-container-rustdoc {
221+
position: fixed;
222+
left: 0;
223+
top: 0;
224+
z-index: 999;
225+
width: 100%;
226+
}
227+
224228
div.landing {
225229
text-align: center;
226230
padding-top: 30px;

0 commit comments

Comments
 (0)