Commit Graph

21 Commits

Author SHA1 Message Date
Julien Calixte
836b480ea6 fix(navigation): resolve clicked anchor when target is a nested element
A click on a child of an <a> (e.g. nested <strong>, <em>, <code>, icon)
made event.target a non-anchor, so getAttribute('href') returned null
and the handler bailed without preventDefault. The browser then
performed the native navigation, which for relative links like
'../note.md' resolved against the current /:user/:repo URL and the SPA
re-routed treating the destination as a new repo.
2026-04-26 13:58:48 +02:00
Julien Calixte
181ffd1e5c feat(navigation): smooth scroll for in-note anchor links
Pure-fragment links (#heading) used to fall through to the browser's
default jump. Handle them in the click listener and scope the lookup
to the same stacked note so identical heading ids in other notes
don't win, with smooth scroll behavior to match cross-note anchors
into already-stacked notes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 09:59:12 +02:00
Julien Calixte
4ce8c30649 fix(navigation): support anchor fragments in note links
Links like `path/to/note.md#heading` previously errored with "Note not
found" because the full href (including `#hash`) was matched against
file paths. Split the fragment off in the link handler, plumb it through
the event bus, and scroll the matching heading into view once the
target note is in place. Headings now get GitHub-style ids via
markdown-it-anchor + github-slugger so the anchors actually exist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 09:40:30 +02:00
Julien Calixte
5f48aa5690 chore: lint and fmt 2026-03-28 09:38:55 +01:00
Julien Calixte
2ea1ec1587 refacto: better const naming 2025-07-12 17:39:34 +02:00
Julien Calixte
2cab8c8e3f autoimport with eslint now 2023-08-14 18:04:27 +02:00
Julien Calixte
c0182c7f57 ♻️ (app) 2023-08-14 14:08:10 +02:00
Julien Calixte
db38eaf639 scope use links 2023-07-19 17:25:44 +02:00
Julien Calixte
e0618e0df6 ⬆️ (lite-note) migrate to pnpm and upgrade every outdated libs 2023-07-01 22:42:35 +02:00
Julien Calixte
c569bde6d0 🐛 (link) anchor links have default use 2021-12-11 21:52:31 +01:00
257dc0794b (cards) implements spaced repetition cards 2021-06-12 16:11:47 +02:00
Julien Calixte
4f13c18573 compute note backlinks 2021-06-06 09:57:17 +02:00
964ddc7ca7 🔇 (use links) 2021-04-04 10:17:08 +02:00
4b1142d688 🐛 (breadcrump) back to home on click 2021-04-03 23:16:18 +02:00
Julien Calixte
23342ead0e (new version) display button if there is a new version. 2021-03-28 10:45:10 +02:00
55faf04d4f 🐛 (flux) listen to click day 1 2021-03-24 21:45:57 +01:00
442adea310 🐛 (link) even lite note link is an external link. 2021-03-21 22:50:32 +01:00
Julien Calixte
b2721763ac 💄 (link) underline external links. 2021-03-21 11:16:52 +01:00
a8cc196508 ♻️ (flux note) move in a component flux …
flux note will be used for fleeting notes and
drafts too
2021-03-20 19:40:00 +01:00
8fad931dfd (notes) add routing between notes 2021-03-13 22:11:58 +01:00
c625db82c7 (note) first note display 2021-03-13 13:59:15 +01:00