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

revised layout #1682

Merged
merged 17 commits into from
Sep 26, 2024
Merged

revised layout #1682

merged 17 commits into from
Sep 26, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Sep 25, 2024

Changes the header to be top-fixed and to extend all the way to the right edge, and moves the table of contents to under the header. Changes the layout on wide windows so that the sidebar and table of contents remain attached to the center column rather than being on the far edges of the window. Moves the header styles to the default theme from our docs config so that the header works “out of the box” without users having to copy these styles from the docs repo (if they chose to have a header).

Before:
Screenshot 2024-09-25 at 9 48 00 AM

After:
Screenshot 2024-09-25 at 9 48 37 AM

Fixes #657.
Supersedes #1023.

@mbostock

This comment was marked as resolved.

@mbostock
Copy link
Member Author

mbostock commented Sep 25, 2024

Also… wondering if there is a quick fix we can do for the table of contents on mobile #1136. Maybe we can just show it inline rather than position-fixed on narrow windows, so that you can quickly jump down from the top to the desired section? Going to punt on this for now since it’s a separable concern.

@mbostock mbostock marked this pull request as ready for review September 25, 2024 17:19
src/style/layout.css Outdated Show resolved Hide resolved
@CobusT CobusT self-requested a review September 25, 2024 19:46
Copy link
Contributor

@CobusT CobusT left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

@mbostock mbostock enabled auto-merge (squash) September 26, 2024 03:11
@mbostock mbostock merged commit c7dce79 into main Sep 26, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/new-layout branch September 26, 2024 03:12
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.

Bring the sidebar and toc in on wide windows with the default layout
2 participants