-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[do not merge] add a rightSidebar option #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,15 @@ li input[type='checkbox'] | |
vertical-align middle | ||
|
||
/* navbar */ | ||
body.right-sidebar .app-nav | ||
margin 25px 0 0 60px | ||
left 0 | ||
right unset | ||
|
||
& > ul | ||
padding-inline-start: 0; | ||
padding-inline-end: 40px; // Chrome's default value. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jhildenbiddle I aimed to make all the changes in here non-breaking for the end user. You may have some opinion on how better to organize this change. Happy to hear if you do! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason for Maybe |
||
.app-nav | ||
margin 25px 60px 0 0 | ||
position absolute | ||
|
@@ -159,6 +168,10 @@ li input[type='checkbox'] | |
display block | ||
|
||
/* github corner */ | ||
body.right-sidebar .github-corner | ||
right unset | ||
transform scaleX(-1) | ||
|
||
.github-corner | ||
border-bottom 0 | ||
position fixed | ||
|
@@ -199,6 +212,11 @@ main.hidden | |
text-decoration underline | ||
|
||
/* sidebar */ | ||
body.right-sidebar .sidebar | ||
left 100% | ||
border-left 1px solid rgba(0, 0, 0, 0.07) | ||
border-right none | ||
|
||
.sidebar | ||
border-right 1px solid rgba(0, 0, 0, 0.07) | ||
overflow-y auto | ||
|
@@ -265,6 +283,11 @@ main.hidden | |
background rgba(136, 136, 136, 0.1) | ||
|
||
/* sidebar toggle */ | ||
body.right-sidebar .sidebar-toggle | ||
left unset | ||
right 0 | ||
transform scaleX(-1) // keeps toggle button on the right | ||
|
||
.sidebar-toggle | ||
background-color transparent | ||
background-color rgba($color-bg, 0.8) | ||
|
@@ -295,14 +318,18 @@ body.sticky | |
position fixed | ||
|
||
/* main content */ | ||
body.right-sidebar .content | ||
right $sidebar-width | ||
left 0 | ||
|
||
.content | ||
padding-top 60px | ||
position absolute | ||
top 0 | ||
right 0 | ||
bottom 0 | ||
left $sidebar-width | ||
transition left 250ms ease | ||
transition left 250ms ease, right 250ms ease | ||
|
||
/* markdown content found on pages */ | ||
.markdown-section | ||
|
@@ -391,16 +418,25 @@ body.sticky | |
.markdown-section ul.task-list > li | ||
list-style-type none | ||
|
||
body.close | ||
.sidebar | ||
body | ||
&.close .sidebar | ||
transform translateX(- $sidebar-width) | ||
|
||
.sidebar-toggle | ||
&.right-sidebar .sidebar | ||
transform translateX(- $sidebar-width) | ||
|
||
&.close.right-sidebar .sidebar | ||
transform translateX(0) | ||
|
||
&.close .sidebar-toggle | ||
width auto | ||
|
||
.content | ||
$.close .content | ||
left 0 | ||
|
||
&.close.right-sidebar .content | ||
right 0 | ||
|
||
@media print | ||
.github-corner, .sidebar-toggle, .sidebar, .app-nav | ||
display none | ||
|
@@ -419,6 +455,9 @@ body.close | |
height auto | ||
overflow-x hidden | ||
|
||
body.right-sidebar .sidebar | ||
left 100% | ||
|
||
.sidebar | ||
left - $sidebar-width | ||
transition transform 250ms ease-out | ||
|
@@ -438,21 +477,35 @@ body.close | |
width auto | ||
padding 30px 30px 10px 10px | ||
|
||
body.close | ||
.sidebar | ||
body | ||
// Note, on mobile .close means open, because mobile starts with the sidebar | ||
// closed (opposite of desktop which starts with sidebar open), and the | ||
// `close` class is toggled by the toggle button. | ||
|
||
&.close .sidebar | ||
transform translateX($sidebar-width) | ||
|
||
.sidebar-toggle | ||
background-color rgba($color-bg, 0.8) | ||
transition 1s background-color | ||
width $sidebar-width - 16px | ||
padding 10px | ||
&.right-sidebar .sidebar | ||
transform translateX(0) | ||
|
||
.content | ||
transform translateX($sidebar-width) | ||
&.close.right-sidebar .sidebar | ||
transform translateX(- $sidebar-width) | ||
|
||
.app-nav, .github-corner | ||
display none | ||
&.close | ||
.sidebar-toggle | ||
background-color rgba($color-bg, 0.8) | ||
transition 1s background-color | ||
width $sidebar-width - 16px | ||
padding 10px | ||
|
||
.content | ||
transform translateX($sidebar-width) | ||
|
||
&.right-sidebar .content | ||
transform translateX(- $sidebar-width) | ||
|
||
.app-nav, .github-corner | ||
display none | ||
|
||
.github-corner | ||
&:hover .octo-arm | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was wrong