Commit de7ad9d
authored
fix: pretty-print + visible palette + single-file data browser (#9)
* fix: pretty-print JSON-LD + visible cream palette (data browser)
Two visual fixes to the minimal data browser shipped in 0.0.11:
1. JSON-LD is now pretty-printed with 2-space indent before being
handed to the URI-linking regex. The previous version just dumped
the raw single-line JSON; white-space:pre-wrap made it wrap but
the result was a wall of text with no visible structure. The PR
description that introduced this file used the word "pretty-print"
but the code that landed didn't actually parse+stringify.
2. CSS palette tuned so the styling is actually visible:
- Body background #fafaf8 -> #f3eee5 (warm cream that's clearly
distinguishable from white at normal monitor calibration; the
old value was 5 RGB units off from #fff so the card vanished)
- Card border-radius 8 -> 12px, padding 1 -> 1.5em, shadow opacity
6% -> 8% with a softer larger blur for a visible lift
- Link color #0366d6 -> #0a66c2 (more saturated, reads better
against the cream)
The CSS rules in 0.0.11 were applying correctly — verified by
inspecting computed styles. The bug was that I picked colors too
close to each other for the difference to be perceivable, not that
the rules weren't taking effect.
Bumps jspod to 0.0.12.
Refs #1
* refactor: collapse data browser into a single self-styling JS file
CSS now lives inside data-browser.js as a <style> tag injected on
load. data-browser.css becomes an intentionally-empty stub so JSS's
auto-fetch of the .css sibling (mashlib/index.js:307) still 200s —
no console warning, no two-file version-skew risk, one file owns
the experience. A future JSS PR can drop the sibling fetch and the
stub goes away entirely.
Refs #11 parent 1531910 commit de7ad9d
3 files changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments