quantecon-book-theme icon indicating copy to clipboard operation
quantecon-book-theme copied to clipboard

Adjustments for RHS TOC

Open mmcky opened this issue 4 years ago • 4 comments

https://github.com/QuantEcon/lecture-datascience.myst/issues/119

@DrDrij thoughts?

mmcky avatar May 28 '21 01:05 mmcky

@mmcky I reckon it's pretty useful functionality. Almost like the minimap in code editors. I'd be happy to implement. This would include:

  • Make the whole in-page-toc sticky (not just 'back to top')
  • Add active highlight to toc items depending on page scroll

DrDrij avatar May 28 '21 04:05 DrDrij

Yeah it is pretty good. Now that we are inheriting from sphinx-book-theme are we just overriding the styles? Or do we need to implement this in our context?

mmcky avatar May 28 '21 04:05 mmcky

I'll take a closer look. There might be a tiny little work to refactor the markup so that it can use the JS/CSS from SBT. Hopefully as you have suggested all we'll need then is some QBT styling. @mmcky Shall we go ahead and implement this across the quantecon-book-theme sites?

DrDrij avatar May 28 '21 04:05 DrDrij

Yeah let's see what it looks like. I think the animation and navigation is nice but John might like the simplicity of what we have. So let's make a PR and get comments :-)

We could always have a simple-contents-toc=True/False flag

mmcky avatar May 28 '21 04:05 mmcky