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

CMS pages can now display a table of contents #4074

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Conversation

ajrbyers
Copy link
Member

@ajrbyers ajrbyers commented Apr 2, 2024

Note: When a page has TOC enabled, the reading pane will be thinner than usual.

@ajrbyers ajrbyers requested a review from mauromsl April 2, 2024 09:28
Copy link
Member

@mauromsl mauromsl left a comment

Choose a reason for hiding this comment

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

just a minor comment on the reuse of JS scripts

src/themes/material/templates/cms/page.html Show resolved Hide resolved
@mauromsl mauromsl requested a review from joemull April 2, 2024 14:04
Copy link
Member

@joemull joemull left a comment

Choose a reason for hiding this comment

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

Super feature, but it doesn't work well on narrow screens.

Why don't you turn it off entirely at the small breakpoint?

</div>
</div>
{% endif %}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

On material it covers up content:

image

</div>
</div>
</aside>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work so well on mobile screens, because the TOC is put at the end, where it would not be expected:

image

@ajrbyers ajrbyers changed the title #3671 CMS pages can now determine whether they will display a Table of Contents CMS pages can now optionally display a table of contents Apr 15, 2024
@ajrbyers ajrbyers changed the title CMS pages can now optionally display a table of contents CMS pages can now display a table of contents Apr 15, 2024
@ajrbyers ajrbyers requested a review from joemull April 15, 2024 15:19
@ajrbyers ajrbyers assigned joemull and unassigned ajrbyers Apr 15, 2024
@ajrbyers
Copy link
Member Author

Super feature, but it doesn't work well on narrow screens.

Why don't you turn it off entirely at the small breakpoint?

Cheers, @joemull, I've added a commit that will disable these elements on small screens.

Copy link
Member

@joemull joemull left a comment

Choose a reason for hiding this comment

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

Hmm, it is still displaying on small screens on clean:

image

@ajrbyers ajrbyers requested a review from joemull April 16, 2024 13:35
@joemull joemull merged commit 6120136 into master Apr 16, 2024
1 check was pending
@joemull joemull deleted the 3671-toc_cms_pages branch April 16, 2024 14:01
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

Successfully merging this pull request may close these issues.

Add sidebar TOC to CMS pages
3 participants