Skip to content

Commit

Permalink
feat: Sticky head sidebar
Browse files Browse the repository at this point in the history
Resolves #235
  • Loading branch information
oodamien authored May 9, 2024
1 parent 420af97 commit e93882d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
11 changes: 9 additions & 2 deletions src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ html.is-clipped--nav {

.nav-panel-menu .context {
padding: 0.8rem 1rem;
padding-bottom: 0;
margin-bottom: 0.5rem;
position: sticky;
top: 0;
background-color: var(--body-background-color);
z-index: 99;
}

.nav-panel-menu .context .title {
Expand Down Expand Up @@ -252,9 +258,10 @@ html.dark-theme button.browse-version:hover {
.nav-menu .search {
position: relative;
border: 0 none;
height: 44px;
height: 40px;
display: none;
margin-bottom: 0.5rem;
margin: 0 -1rem;
margin-top: 1rem;
}

.nav-resize {
Expand Down
8 changes: 6 additions & 2 deletions src/css/vendor/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
color: var(--body-font-color);
background: var(--body-background-color);
text-align: left;
padding-left: 35px;
padding-left: 50px;
border: 1px solid var(--nav-panel-divider-color);
border-left-width: 0;
border-right-width: 0;
Expand Down Expand Up @@ -67,7 +67,7 @@
.DocSearch-Button svg {
position: absolute;
top: 10px;
left: 10px;
left: 25px;
width: 20px;
fill: var(--body-font-color);
}
Expand Down Expand Up @@ -333,5 +333,9 @@ a.ais-Hits-item:hover {
.DocSearch-Button {
border-left-width: 1px;
border-right-width: 1px;
padding-left: 35px;
}
.DocSearch-Button svg {
left: 10px;
}
}
1 change: 1 addition & 0 deletions src/partials/nav-explore.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
d="M384,224c-17.7,0-32,14.3-32,32s14.3,32,32,32s32-14.3,32-32S401.7,224,384,224L384,224z"
></path></g></svg>
</button>
{{> nav-search}}
</div>
1 change: 0 additions & 1 deletion src/partials/nav-menu.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{> nav-search}}
{{#with page.navigation}}
{{> nav-tree navigation=this}}
{{/with}}

0 comments on commit e93882d

Please sign in to comment.