Skip to content
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

Component for table of contents #13

Open
nokome opened this issue Jul 2, 2019 · 3 comments
Open

Component for table of contents #13

nokome opened this issue Jul 2, 2019 · 3 comments

Comments

@nokome
Copy link
Member

nokome commented Jul 2, 2019

It would be useful, particularly for long documents, to have a table of contents generated based on the heading structure of the HTML document. The main requirements for this:

  • able to build a TOC from h1, h2 etc tags alone
  • easily able to be styled to fit with the theme it is applied within
  • indicates the current section the document the viewport is in
  • light weight

A good, pre-existing solution appears to be https://tscanlin.github.io/tocbot/. We should probably use that, at least to start with.

@nokome nokome transferred this issue from stencila/thema Jul 3, 2019
@nokome nokome changed the title Add common component for table of contents Component for table of contents Jul 4, 2019
@nokome
Copy link
Member Author

nokome commented Jul 4, 2019

After discussion with @jwijay and @alex-ketch I've moved this from thema to here. This component will still be used in thema (in the stencila theme, and possibly others).

I'd like to put this and #11 as highest priority for design and development because they are needed for the documentation that we are generating for encoda and other repos (which use the stencila theme).

@nokome
Copy link
Member Author

nokome commented Jul 4, 2019

Some inspo for this from HackMD. I like it's combination of minimalism, interactivity (tells you where you are), responsiveness (only appears on wide screens) and utility (Back to top etc).

Peek 2019-07-05 10-55

@nokome
Copy link
Member Author

nokome commented Oct 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant