Floating Table of Contents
complete
braniqvranik
In v.2.x.x there is "Sticky Table of Content". I would suggest users have possibility to setup whether table of contents is sticky while scrolling or not (e.g. in admin area). Currently, ToC is always on the top, and changing to another chapter requires 2 steps (clicking up arrow, then change the chapter). This is quite annoying when reading the wiki page.
Emmanuel Olatunde
How can i access table of contents? I can't seem to see that feature/add on in my Wiki.js (Wiki.js 2.5.170)
Lisa Woodring
Emmanuel Olatunde: Your screen has to be wide enough or it is not shown at all (and no option to view/open it).
B
Billy Tetrud
Lisa Woodring: Booo, that's not an acceptable way to design a webpage. Elements shouldn't disappear if your screen isn't the blessed dimensions, those elements should be moved somewhere else that's still accessible.
Lisa Woodring
Billy Tetrud: Exactly. Agreed.
Nicolas Giard
complete
Added in 2.4.
M
Michael Ferullo
I second this. For a long table of contents, you may need to implement a separate scroll bar for the table of contents specifically, but you would also need to make sure this doesn't change the way the table of contents looks across pages that don't require a scroll bar.
Thomas Pozzo di Borgo
Thanks Aitor Rosell Torralba clever way to do it. I would like to see it as native option. For now, extending css does the job.
Aitor Rosell Torralba
I think this would be accomplished by simply adding this class to the element:
.stickyToc {
position: sticky;
top: 80px;
z-index: 2;
max-height: 55vh;
overflow-x: auto;
}
I think this should do the trick for the moment at least, add this to extra css in your wiki and you would have a sticky Table Of Contents:
#app > div.v-application--wrap > main > div > div.container.pl-5.pt-4.container--fluid.grid-list-xl > div >
div.flex.page-col-sd.lg3.xl2 > div:nth-child(1) {
position: sticky;
top: 80px;
z-index: 2;
max-height: 55vh;
overflow-x: auto;
}
Matthew Dean
Agreed. Navigation is EXTREMELY clumsy on Wiki.js. The main menu confusingly turns into a "mobile" view and hides itself except via overlay if the page is anything less than 1200 pixels? Which is crazy. The default theme seems kinda bonkers in it's usability challenges.