feat(viewer): align local CLI viewer with share viewer design (#56) - #57
Merged
Conversation
Mirror the gander.md share viewer redesign in the local CLI viewer: add the goose logo + 'gander' wordmark to the TOC left column, and add a 'Get your gander at gander.md/cli' CTA below the content with the small goose logo. Move the live-reload SSE swap target from <main id="content"> to an inner <div id="content-body"> so the CTA survives every save. Update the mermaid init script scope to match. Pairs with #41 per the CLI-pairing convention.
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
ganderwordmark to the local viewer's TOC left column (matching the share viewer's TOC header)Get your gander at gander.md/cliCTA footer below the content, with the small goose logo (matching the share viewer's bottom CTA)<main id="content">to an inner<div id="content-body">, so the new CTA survives every save#content-body(otherwise live reloads would leak mermaid blocks outside the content)TestBuildViewerMetaAndCTAOutsideSSESwapTargetplus TOC logo/wordmark + CSS coverageRelated Issue
Closes #56
Paired change with #41 per the CLI-pairing convention. Server-only design change, no API or wire-format impact.
Testing
go test ./...— all green (existing + 6 new)go vet ./...— cleanCGO_ENABLED=0 go build -trimpath -ldflags "-X main.Version=v0.0.0-local" .— cleanNew tests cover:
ganderwordmark<main>with the small goose logo andgander.md/clilink.gander-md-cta,.gander-md-viewer-logo,.gander-toc-logo,.gander-toc-wordmark#content-bodylives inside<main>and the CTA renders after it (survives live reloads)#content-body, not the old#contentid#content-bodyNotes
{filename} · gander.md) was left for a follow-up; the local CLI'sbuildHTMLdoesn't currently know the source filename, and threading it through is a separate, larger change. The structural changes (1-3 in the issue) are all in.gandermd/internal/render/page.goto keep visual parity load-bearing.