fix: 阅读页目录位置、移动端交互和主题切换优化 - #16
Open
Aafff623 wants to merge 7 commits into
Open
Conversation
- mobile TOC: decode %-encoded heading ids before getElementById - desktop TOC: intercept anchor clicks with smooth scroll + history.replaceState to avoid daybook-router fallback recursion
- move TOC from article top into a sticky right rail - pin reading controls (progress, top/bottom) above the aside tools - compact author identity aligned with the persistent logo - move tags from article bottom into the header meta area - merge meta info into a single row
- article pages: clock effect requires double-click, single clicks on blank areas no longer trigger it (home stays single-click) - fix mouseenter on document resetting hover state, which caused link clicks to be treated as blank-area clicks
- apply theme mode and button state immediately on click instead of waiting for the View Transition capture frame - guard isTransitioning with a 2s timeout and try/catch so a never-settling finished promise (e.g. background tab) can no longer brick all theme/palette toggles
- homepage single-click vs article single/double-click clock gating - clock must not carry over from the notes list into articles - right rail TOC visible, sticky and progress updates on scroll
Intl.NumberFormat rejects underscore locale codes; the zh_CN/en_US rename broke every page load with RangeError: Invalid language tag
Owner
recording_20260830_10-46-36_30831.mp4 |
Owner
|
Owner
三分之二的布局我会重排的,宽屏下面暂时先不要动了。 |
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.
对应 #15 里提的几个阅读体验问题,都在这个分支上改了。
主要做了这些:
顺手修了两个小东西:封面图缓存文件名从 md5 换成 sha256;同步最新 main 的时候发现 embeds 里有个 locale 写法会让页面打开直接报错,也一起修了。
有一点要说明:目录位置、标签位置、文章页时钟改双击,这些属于默认行为变了;原来超宽屏下的动画阅读轨道在新布局里就没有了。如果想保留旧行为,可以商量做成开关。然后 check.sh 本地全跑过,桌面和手机宽度都看过一遍。