Repository navigation
feat: nav header on data-browser pages - #23
Merged
Merged
Conversation
Previously the data-browser dropped the user on a wall of rendered
JSON-LD with no navigation chrome — the only way back was the
browser's back button. Now every resource our browser renders has
a small nav strip above the data:
[↑ Up] [Home] [Account] [Docs]
───────────────────────────
{ ... rendered JSON-LD ... }
- "Up" navigates one path segment higher (e.g. /public/links.jsonld
→ /public/; /profile/ → /). Hidden at the pod root.
- Home, Account, Docs link to the corresponding jspod-owned pages.
- Visually consistent with the cream + card style of welcome.html /
account.html / signin.html.
Module size: 988 B → 1528 B. Still well under any reasonable budget
for a data browser and a navigation surface combined.
Refs #1
This was referenced May 16, 2026
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
The data-browser previously dropped the user on a wall of rendered JSON-LD with no navigation chrome. Now every resource our browser renders gets a small nav strip above the data:
```
[↑ Up] [Home] [Account] [Docs]
─────────────────────────────────
{ ... rendered JSON-LD ... }
```
Implementation
`data-browser.js` grows by ~540 bytes (988 → 1528). New module:
```js
' + (up ? `↑ Up` : '') + 'HomeAccountDocs';const p = window.location.pathname;
const up = (p === '/' || !p)
? null
: (s => { const i = s.lastIndexOf('/'); return i === 0 ? '/' : s.slice(0,i) + '/'; })(p.replace(//$/, ''));
const nav = '
```
CSS for `.jspod-nav` is in the same injected style block (same overall card + cream visual language as the rest of jspod's pages).
Test plan
Bumps jspod to 0.0.25.
Refs #1