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

[Website] Render nested categories in side bar #1482

Merged
merged 2 commits into from Feb 28, 2018
Merged

Conversation

Pessimistress
Copy link
Collaborator

For #1470

Change List

  • Support sub headers in table of contents
  • Support badges
  • Render wider side bar in large window

screen shot 2018-02-27 at 4 38 23 pm

const INDENT_BASE = 16;
const INDENT_INC = 12;

function getContentHeight(page) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat:

const getContentHeight = page =>
  page.children
    ? page.children.reduce((acc, child) => acc + getContentHeight(child), ITEM_HEIGHT)
    : ITEM_HEIGHT

@Pessimistress Pessimistress merged commit 86ac03e into master Feb 28, 2018
@Pessimistress Pessimistress deleted the table-of-contents branch February 28, 2018 01:17
@jianhuang01 jianhuang01 added doc and removed code labels Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants