feat: sidebar-main layout and fix grid detection inside containers#4
Merged
feat: sidebar-main layout and fix grid detection inside containers#4
Conversation
- Add renderSidebarMainLayout() to html-renderer — groups children by
{.sidebar}/{.main} heading markers into wmd-layout-sidebar/main divs
- Add sidebar + layout CSS to all 7 style themes (nav-matching backgrounds,
full-width buttons, section label styling)
- Fix grid detection inside containers: extract processNodeList() shared
helper so both transformToWiremdAST and transformContainer detect
{.grid-N} headings — previously grids inside :::layout, :::card etc.
were silently rendered as plain headings
- Add examples/sidebar-layout.md
- Add parser and renderer tests for sidebar layout and nested grids
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:::layout {.sidebar-main}renders a two-column grid with a styled sidebar panel and main content area. Sidebar background matches each theme's nav (e.g.#87CEEBin sketch). Buttons inside the sidebar span full width.:::card,:::layout, etc.) were silently rendered as plain headings. ExtractedprocessNodeList()shared helper so both the top-level document pass andtransformContainerdetect{.grid-N}headings correctly.examples/sidebar-layout.md— project management workspace wireframe demonstrating the layout with a 3-column stats grid inside the main section.Test plan
npm test— 510 tests passgridAST node; sidebar-main layout structurewiremd examples/sidebar-layout.md --serve 3002 --style sketch— sidebar styled like navbar, 3-column stats grid renders correctly🤖 Generated with Claude Code