dokuwiki-template-bootstrap3 icon indicating copy to clipboard operation
dokuwiki-template-bootstrap3 copied to clipboard

[Feature Request] Option to move the TOC outside the main display area, perhaps to where "rightSidebar" is

Open dougthor42 opened this issue 6 years ago • 2 comments

Description

I'd like to have an option that places the ToC where the right-sidebar would be (if it existed). This special right-sidebar-like-area would contain the entire document ToC and would act in the same manner as the current ToC (highlighting current nav, clickable, scrolling with the page, etc.).

I would have no problem if this option was mutually exclusive with the rightSidebar option.

Here's what I'm thinking:

dokuwiki_rightside_toc_2

How I faked it:

To make the above gif, I used the following Boostrap3 settings

$conf['tpl']['bootstrap3']['bootstrapTheme'] = 'bootswatch';
$conf['tpl']['bootstrap3']['bootswatchTheme'] = 'cerulean';
$conf['tpl']['bootstrap3']['rightSidebar'] = 'wiki:rightsidebar';
$conf['tpl']['bootstrap3']['sidebarPosition'] = 'left';
$conf['tpl']['bootstrap3']['sidebarShowPageTitle'] = 0;
$conf['tpl']['bootstrap3']['fixedTopNavbar'] = 1;
$conf['tpl']['bootstrap3']['tocAffix'] = 1;
$conf['tpl']['bootstrap3']['tocCollapseSubSections'] = 1;
$conf['tpl']['bootstrap3']['tocPosition'] = 'right';
$conf['tpl']['bootstrap3']['tocCollapseOnScroll'] = 0;
$conf['tpl']['bootstrap3']['tocCollapsed'] = 0;

Then I created the wiki:rightsidebar page and had it contain essentially nothing (a single character .).

Lastly I manually edited the CSS in Chrome, changing #dw__toc.affix to include right: 165px;.

image

Of course, this is the hack and simply adjusting this tiny bit of CSS would not work on all machines, but I think it conveys the spirit of my request.

Versions

  • [Bootstrap3 Template] 2016-12-12
  • [DokuWiki] 2017-02-19e "Frusterick Manners"
  • [Browser] Chrome 62.03202.75

Screenshots or Logs

See above.

Sample Page

N/A

dougthor42 avatar Nov 08 '17 00:11 dougthor42

You can achieve almost the same thing with just

.dw-toc{ margin-right: -260px; }

Of course you have to activate it only on large screens using a @media directive

Aldian-fr avatar Nov 22 '18 09:11 Aldian-fr

Hi ! Any news on this feature ? I find the current collapsible TOC nice, but a bit disturbing, since it resizes some of the content and auto-folds when scrolling. I would prefer a sticky TOC in the right sidebar (on large screens anyway), a bit like how it is done in Argon template : https://www.dokuwiki.org/template:argon Any thoughts ?

apprentiLAB-Suzanne avatar Sep 02 '22 10:09 apprentiLAB-Suzanne