option to put sidebar on the right
See original GitHub issueFeature request
An option to put the sidebar on the right instead of the left
What problem does this feature solve?
Sometimes people want it on the other side (maybe they embed Docsify somewhere that already has a sidebar on the left, or maybe they have a custom landing page with a custom menu on the right and when they click the link to go to documentation they’d also want the docs to have the sidebar on the same side).
What does the proposed API look like?
rightSidebar: true // or false
or
sidebarPosition: 'right' // or 'left'
How should this be implemented in your opinion?
I think we might be able to achieve this just with CSS, leaving the markup alone.
cc @jhildenbiddle for CSS expertise here.
Are you willing to work on this yourself?
Of course (if/when I get the time)!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (6 by maintainers)
Top Results From Across the Web
CSS Sidebars: A Beginner's Guide - HubSpot Blog
Learn how to code your own website sidebar using CSS and HTML. We'll explain static, fixed, sticky, grid, and collapsible sidebars and how ......
Read more >How to use the Google Sidebar | Including Options and Settings
Google Sidebar Settings and Options a How to Guide: This tutorial ... how to install Google Workspace add -ons to the Google Right...
Read more >Can't get my sidebar on the right-hand side - Stack Overflow
I'm an amateur with CSS and have tried using some guides to get myself so far. I've set up a fiddle http://jsfiddle.net/defaye/X9t7M/1/ for ......
Read more >Use sidebars in Pages on Mac - Apple Support
Right sidebar : Click Format or Document in the toolbar to open the sidebar and show the controls. To close the sidebar, click...
Read more >How to Add a Sidebar to the Desktop in Windows 10 & 11
Dock Location and ; Left or ; Right. Add transparency to the sidebar by dragging the slider for the ; Set opacity bar...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out it was easy to do, it took only a few minutes to modify 3 numbers in the CSS:
Of course the menu icon should be re-positioned too.
I’ll make a draft PR once I circle back (I’d like to finish the SSR tests in the other PR).
@paulhibbitts See these lines:
https://github.com/docsifyjs/docsify/blob/c2cf163fc0a02378f27792ce58ac6e5fc5a8bf65/src/themes/basic/_layout.styl#L209
(try changing
left
toright
)https://github.com/docsifyjs/docsify/blob/c2cf163fc0a02378f27792ce58ac6e5fc5a8bf65/src/themes/basic/_layout.styl#L423
(Similar, position from the
right
)https://github.com/docsifyjs/docsify/blob/c2cf163fc0a02378f27792ce58ac6e5fc5a8bf65/src/themes/basic/_layout.styl#L443
(Possibly negate a number if it moves the wrong direction)
That’s about it! Oh, and the sidebar hamburger button needs to be repositioned to the right as well.
Adding an option could simply set, for example, a CSS var to tell the styling to use left or right in a non-breaking way.