Commit Graph
20 Commits
Author SHA1 Message Date
hypercross 9790205468 style: remove hardcoded text color from Article components 2026-07-10 15:56:51 +08:00
hypercross 6ab6b76978 feat: pass source path to markdown parser for icon resolution
Pass the file's base path through the markdown parsing pipeline to
allow the icon directive to resolve relative asset paths correctly
using an absolute fallback chain.
2026-07-08 16:38:19 +08:00
hypercross 2dba19e1f8 feat: implement icon directive with relative path fallback
Refactor icon rendering to use a custom `marked-directive` instead of
a global icon prefix. This allows icons to use a CSS-based fallback
chain (searching up to 10 directory levels for an `assets/` folder),
making icon paths more robust and removing the need to pass path
prefixes through the component tree.
2026-07-08 16:24:09 +08:00
hypercross 779722fe85 refactor: preserve URL search params during navigation
Introduce `useNavigateWithParams` to ensure that existing URL search
parameters are maintained when navigating between pages. This is
applied to the Article component, FileTree, and journal links to
prevent losing state (like session or player info) during client-side
navigation.

Also intercepts markdown anchor links in the Article component to use
client-side navigation.
2026-07-07 23:26:44 +08:00
hypercross aa326f38a0 refactor: introduce RevealManager and Article DOM context
Decouple the reveal logic from the `Article` component by introducing
a `RevealManager` component and an `ArticleDomCtx`. This allows the
reveal logic to reactively manage DOM injections and classes without
polluting the `Article` component's props or lifecycle.

Additionally, implements a robust `cleanupInjections` mechanism to
ensure that injected buttons and styling artifacts are properly removed
during navigation, role changes, or disconnections.
2026-07-07 22:19:04 +08:00
hypercross ced9a4f8f2 feat: implement content reveal mechanism via DOM traversal
Add `addRevealedClasses` to apply `revealed` or `concealed` CSS classes
to article elements based on the current heading hierarchy and
revealed paths. Update `Article` to expose its DOM element via an
`onDom` callback.
2026-07-07 10:56:19 +08:00
hyper d56e8ca23d fix(ui): Add text-black to prose elements 2026-07-03 22:11:50 +08:00
hypercross 4038d67ea0 feat: add md-emfont component and format code
- Add `md-emfont` custom element for dynamic font loading
- Register `md-emfont` in component index
- Reformat `Article.tsx` and `index.ts` using double quotes and
  consistent spacing
- Fix indentation in `index.html`
2026-05-11 11:25:57 +08:00
hypercross fbc67175ae fix: scrolling 2026-03-22 01:18:53 +08:00
hypercross 1da5cfb2ea refactor: article iconPath 2026-03-15 00:40:06 +08:00
hypercross 748f57dd55 fix: refactor stuff 2026-03-13 16:02:09 +08:00
hypercross b737e9f4ea feat: mermaid 2026-03-02 11:03:51 +08:00
hypercross 807ce5a406 refactor: reorg 2026-02-27 12:34:55 +08:00
hypercross f7eb116aa3 feat: a pin component 2026-02-26 18:11:33 +08:00
hypercross 31b6b57ec8 feat: animated expansion of md-link 2026-02-26 17:44:58 +08:00
hypercross 588ae49f5f fix: caching and reactivity 2026-02-26 14:51:26 +08:00
hypercross ba7b264a97 feat: ai's attempt 2026-02-26 14:24:48 +08:00
hypercross dd4068926c feat: section link 2026-02-26 09:53:30 +08:00
hypercross a250762ebe fix: md-* content 2026-02-26 09:47:21 +08:00
hypercross d2a383c5d8 feat: ai's attempt 2026-02-26 09:24:26 +08:00