Deep-linking: /about experience bitmask + blog section anchors :3 #12

Merged
vxfemboy merged 9 commits from deep-linking into master 2026-07-13 22:21:04 +00:00
vxfemboy commented 2026-07-13 22:12:12 +00:00 (Migrated from github.com)

Deep-linking: /about experience bitmask + blog section anchors

Makes parts of the site linkable — everything is URL fragments (client-side JS + server-rendered id/data-bit), so there are no new server routes and the curl/no-JS view is unaffected.

/about experience

  • Each job gets a stable per-company bit (alphabetical company slug → bit index; reordering the timeline never shifts it).
  • Toggling a job writes #exp;<base36 mask> into the URL; loading such a URL reopens exactly those jobs across both desktop + mobile variants and scrolls to the block.

Blog post headings

  • Every h2h6 gets a GitHub-style id slug (deduped -2, -3), so …/post/<slug>#section jumps to that section.
  • Headings are plain titles — no visible # — but are clickable (JS): clicking drops the section link into the URL, and a scroll-spy mirrors the section you're reading into the address bar in real time (replaceState, no history spam).
  • Kept as plain <hN id> (not <a>) so nothing recolors them; the curl/ANSI heading renders clean (no stray #).

Bug fixes folded in

  • /blog no longer panicstruncate_text counted bytes and could slice mid-UTF-8-char on the unicode-heavy posts; now truncates by character.
  • Local dev stays on the hostlocalhost/127.0.0.1 resolve to http://<host:port> instead of the production https://vx.gay default, so nav links don't bounce off localhost. Production domains unchanged.

Tests / gates

  • Unit tests added: slugify, heading anchors/dedup, company_bit_map stability, local-dev host resolution. Full suite green (23), cargo fmt --all -- --check + clippy -D warnings clean.
  • Verified in-browser: bitmask restore across viewports, heading click → hash, scroll-spy section selection, and clean curl output.

🄯 vxfemboy | meow <3

## Deep-linking: `/about` experience bitmask + blog section anchors Makes parts of the site linkable — everything is URL fragments (client-side JS + server-rendered `id`/`data-bit`), so there are **no new server routes** and the `curl`/no-JS view is unaffected. ### `/about` experience - Each job gets a **stable per-company bit** (alphabetical company slug → bit index; reordering the timeline never shifts it). - Toggling a job writes `#exp;<base36 mask>` into the URL; loading such a URL reopens exactly those jobs across **both** desktop + mobile variants and scrolls to the block. ### Blog post headings - Every `h2`–`h6` gets a GitHub-style `id` slug (deduped `-2`, `-3`), so `…/post/<slug>#section` jumps to that section. - Headings are **plain titles** — no visible `#` — but are **clickable** (JS): clicking drops the section link into the URL, and a **scroll-spy** mirrors the section you're reading into the address bar in real time (`replaceState`, no history spam). - Kept as plain `<hN id>` (not `<a>`) so nothing recolors them; the curl/ANSI heading renders clean (no stray `#`). ### Bug fixes folded in - **`/blog` no longer panics** — `truncate_text` counted bytes and could slice mid-UTF-8-char on the unicode-heavy posts; now truncates by character. - **Local dev stays on the host** — `localhost`/`127.0.0.1` resolve to `http://<host:port>` instead of the production `https://vx.gay` default, so nav links don't bounce off localhost. Production domains unchanged. ### Tests / gates - Unit tests added: `slugify`, heading anchors/dedup, `company_bit_map` stability, local-dev host resolution. Full suite green (23), `cargo fmt --all -- --check` + `clippy -D warnings` clean. - Verified in-browser: bitmask restore across viewports, heading click → hash, scroll-spy section selection, and clean curl output. 🄯 vxfemboy | meow <3
Sign in to join this conversation.
No description provided.