-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
style: update "on this page" to only show headers up until level 3 and indent #180
Conversation
✅ Deploy Preview for guidemaker-ember-template ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
<li> | ||
<a href="#{{toc.id}}">{{toc.text}}</a> | ||
</li> | ||
{{#if (or (eq toc.depth '1') (eq toc.depth '2') (eq toc.depth '3'))}} |
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 is pretty verbose, but keeps the component a TOC. Depth is passed as string, and changing that to a number would have a bigger impact and be outside of scope of this repo?
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'm happy with it as it is 👍 if you wanted to make this a helper like (should-show-toc-depth)
then you could absorb the string/number issue there, but that's not necessary 👍
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.
Looks amazing 😍
Implements #179
To be fair, this example doesn't properly showcase the real difference, and a real content page would be better suited to test.
EDIT: test using the Template Tag Format content: