-
Notifications
You must be signed in to change notification settings - Fork 0
[sticky otp/toc] Builds on elastic/docs #2478 #1
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
[sticky otp/toc] Builds on elastic/docs #2478 #1
Conversation
resources/web/template.html
Outdated
<!-- Can we pull this in? --> | ||
<div class="book-title">{Book name}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can, it wouldn't be done here. We'd need to prepend the book name to the TOC when it's built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at how we access the book title on index pages. Maybe we can use the same logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I'm going to merge into the main PR so we can get a PR build up!
Targets elastic#2478
I couldn't help but spend some time tinkering! So far this PR includes:
IntersectionObserver
to highlight only one item at a time in the "On this page" list. (Current logic highlights the first heading that is visible on the page if there are multiple headings visible.)content-container
class to better accommodate sticky content on both sides.clipped-shorter.mov
If you think this is a good direction (and not to controversial!) we can merge this into elastic#2478 and continue from there. There are a few things that definitely need to be taken care of still including:
Let me know what you think about this direction!