Repository navigation
Site: navigation bar, shared stylesheet, copy buttons - #18
Merged
Merged
Conversation
Adds a sticky nav (Sifthound · Quick start · MCP · Benchmark · GitHub) to every page, with the current page marked, and moves the pages' duplicated inline CSS into docs/style.css. Homepage sections get anchors (#quick-start, #mcp, ...). Adding a page means linking style.css and one link in each nav.
docs/site.js wraps each <pre> and adds a Copy button (Clipboard API, with a select-and-copy fallback); it shows 'Copied' for 1.5s. Buttons appear on hover or focus on desktop and always on touch screens. Pages work unchanged without JavaScript.
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.
The benchmark page was only reachable from a link inside the comparison section. This adds a navigation bar to every page of the site, plus copy buttons on code blocks.
aria-current), wraps to a second row on phones.docs/style.css: the two pages' duplicated inline CSS merged into one stylesheet, plus nav and copy-button styles.docs/site.js(small, shared,defer): a copy icon button on every code block (5 on the homepage, 1 on the benchmark page). Uses the Clipboard API with a select-and-copy fallback, switches to a check mark for 1.5s, appears on hover or keyboard focus on desktop and always on touch screens. Without JavaScript the pages look and work exactly as before.#features,#quick-start,#tavily,#mcp,#compare,#faq), with scroll margin so headings clear the sticky bar.style.cssandsite.js, copy the nav block, add one link to each page's nav.Checked: HTML well-formed and JSON-LD valid;
node --check site.js; headless Chrome confirms the buttons are injected on both pages; layout rendered at desktop and 390px. No external requests.