Skip to content

Add TOC to policy pages #127

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add TOC to policy pages #127

wants to merge 5 commits into from

Conversation

remibetin
Copy link
Member

@remibetin remibetin commented May 7, 2025

This PR displays a table of contents on country pages.

Preview in context (from wai-policies-prototype repo)

The implementation differs from the exploratory PR in some ways:

  • The TOC is positioned after the last updated date. I find this cleaner.
  • The TOC is added to the current layout in wai-website-theme, used in production. As such, it does not support states and provinces. I suggest to open a distinct PR when the state/province level policies will be added to the pages.
  • The TOC uses the toc.html include for consistency.

This PR also:

  • makes the disclaimer at the bottom of a country page more prominent, by including it into a box.
  • uses h2s instead of boxes to delimit each policy on a country page, as in the exploratory PR.
  • stops passing an id parameter when calling multilang-list-policy-links.html include. This parameter was not used by the include file.

This comment was marked as off-topic.

@remibetin
Copy link
Member Author

@kfranqueiro @iadawn FYI in case you have started looking at this PR, I have just made a few changes to the PR (0602eae and 144659d) and updated the PR description accordingly.

@remibetin remibetin assigned iadawn and remibetin and unassigned remibetin May 21, 2025
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.

2 participants