Skip to content

CMS pages can now display a table of contents#4074

Merged
joemull merged 3 commits into
masterfrom
3671-toc_cms_pages
Apr 16, 2024
Merged

CMS pages can now display a table of contents#4074
joemull merged 3 commits into
masterfrom
3671-toc_cms_pages

Conversation

@ajrbyers

@ajrbyers ajrbyers commented Apr 2, 2024

Copy link
Copy Markdown
Member

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

@mauromsl mauromsl left a comment

Copy link
Copy Markdown
Member

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

Comment thread src/themes/material/templates/cms/page.html
@mauromsl mauromsl requested a review from joemull April 2, 2024 14:04

@joemull joemull left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@joemull joemull left a comment

Copy link
Copy Markdown
Member

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
@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