Skip to content

feat(viewer): align local CLI viewer with share viewer design (#56) - #57

Merged
scott merged 1 commit into
mainfrom
feat/56-align-local-viewer-with-share
Aug 23, 2026
Merged

feat(viewer): align local CLI viewer with share viewer design (#56)#57
scott merged 1 commit into
mainfrom
feat/56-align-local-viewer-with-share

Conversation

@scott

@scott scott commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add the goose logo + gander wordmark to the local viewer's TOC left column (matching the share viewer's TOC header)
  • Add a Get your gander at gander.md/cli CTA footer below the content, with the small goose logo (matching the share viewer's bottom CTA)
  • Move the live-reload SSE swap target from <main id="content"> to an inner <div id="content-body">, so the new CTA survives every save
  • Update the mermaid init script's scope to follow #content-body (otherwise live reloads would leak mermaid blocks outside the content)
  • New tests mirroring gandermd's TestBuildViewerMetaAndCTAOutsideSSESwapTarget plus TOC logo/wordmark + CSS coverage

Related 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 ./... — clean
  • CGO_ENABLED=0 go build -trimpath -ldflags "-X main.Version=v0.0.0-local" . — clean

New tests cover:

  • TOC header renders the clickable logo link + gander wordmark
  • CTA renders below <main> with the small goose logo and gander.md/cli link
  • CTA renders even when there are fewer than 2 headings (i.e., no TOC)
  • CSS includes .gander-md-cta, .gander-md-viewer-logo, .gander-toc-logo, .gander-toc-wordmark
  • #content-body lives inside <main> and the CTA renders after it (survives live reloads)
  • SSE reload script targets #content-body, not the old #content id
  • Mermaid init script scopes to #content-body

Notes

  • The optional title-parity item ({filename} · gander.md) was left for a follow-up; the local CLI's buildHTML doesn'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.
  • The goose SVG is copied verbatim from gandermd/internal/render/page.go to keep visual parity load-bearing.

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.
@scott
scott merged commit 8ffcb86 into main Aug 23, 2026
1 check passed
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.

feat: align local CLI viewer (gander <file>) with the gander.md share viewer design

1 participant