Skip to content

feat: restyle prev/next navigation as cards - #149

Open
hwhsu1231 wants to merge 1 commit into
lepture:mainfrom
hwhsu1231-fork:feat/restyle-navigation-prev-next-as-cards
Open

hwhsu1231 wants to merge 1 commit into
lepture:mainfrom
hwhsu1231-fork:feat/restyle-navigation-prev-next-as-cards

Conversation

@hwhsu1231

Copy link
Copy Markdown
Contributor
  • Turn prev/next links into bordered, rounded card-style buttons
  • Show "Previous"/"Next" label above the page title
  • Use accent-a9 for the hover border color
  • Keep single prev/next card at half width (prev left, next right)
  • Stack the cards vertically via a container query on page width
  • Wrap long titles instead of overflowing on narrow widths

- Turn prev/next links into bordered, rounded card-style buttons
- Show "Previous"/"Next" label above the page title
- Use accent-a9 for the hover border color
- Keep single prev/next card at half width (prev left, next right)
- Stack the cards vertically via a container query on page width
- Wrap long titles instead of overflowing on narrow widths
@hwhsu1231

Copy link
Copy Markdown
Contributor Author

Preview of the Modification

2026-09-01_16-19-51-ezgif com-crop

@lepture

lepture commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Why using a card style? The card style is not pretty.

@hwhsu1231

Copy link
Copy Markdown
Contributor Author

Why using a card style? The card style is not pretty.

In fact, whether it was the previous PR #148 for restyling the globaltoc/localtoc or this PR for restyling the prev/next navigation, both share a common goal: to expand and clarify the clickable button area.

In addition, using a card style allows the layout to stack vertically on narrower screens, such as mobile devices. This helps avoid excessive line breaks in the prev/next text as much as possible. For example:

Screenshot_20260901_173048

@hwhsu1231

hwhsu1231 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Below are a few examples of displaying prev/next navigation using a card style:

Zed Documentation (customized mdBook)

Screenshot_20260901_171939

Asto Website

Screenshot_20260901_171952

Docusaurus Website

Screenshot_20260901_172054

MySTMD Website

Screenshot_20260902_155404

@hwhsu1231

Copy link
Copy Markdown
Contributor Author

Furthermore, the "clickable button area" of the original prev/next navigation style depended on the length of the target page's title:

Screenshot_20260901_182724

In contrast, using a card-style prev/next navigation ensures that the "clickable button area" remains equal, at least in terms of width.

@hwhsu1231

Copy link
Copy Markdown
Contributor Author

@lepture I think this PR can be put on hold for now—no rush to decide on it right away.

This branch has not been deployed

No deployments
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