Skip to content

Commit 2aa0379

Browse files
sanbuphyclaude
andcommitted
Fix card hover animation and note button discoverability
- Replace transition-all with transition-shadow transition-transform on Welcome page cards to stop all cards from animating on hover - Make section note buttons always visible with border and background instead of invisible until hover - Add note indicator dots on TOC sidebar items - Fix toc-item layout to support note dots Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 3688389 commit 2aa0379

3 files changed

Lines changed: 90 additions & 70 deletions

File tree

web/src/components/NotebookViewer.jsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -564,16 +564,21 @@ function NotebookViewer({ notebook, meta, loading, isBookmarked, toggleBookmark,
564564
<div className="toc-sticky">
565565
<div className="toc-title">{lang === 'en' ? 'Outline' : '大纲'}</div>
566566
<nav className="toc-nav">
567-
{toc.map((item) => (
568-
<button
569-
key={item.id}
570-
data-toc-id={item.id}
571-
className={`toc-item ${activeHeading === item.id ? 'active' : ''} toc-level-${item.level}`}
572-
onClick={() => handleTocClick(item.id)}
573-
>
574-
{item.text}
575-
</button>
576-
))}
567+
{toc.map((item) => {
568+
const tocNoteKey = `${notebook.id}::${item.id}`
569+
const hasTocNote = !!notes[tocNoteKey]
570+
return (
571+
<button
572+
key={item.id}
573+
data-toc-id={item.id}
574+
className={`toc-item ${activeHeading === item.id ? 'active' : ''} toc-level-${item.level}`}
575+
onClick={() => handleTocClick(item.id)}
576+
>
577+
<span className="toc-item-text">{item.text}</span>
578+
{hasTocNote && <span className="toc-item-note-dot" title={lang === 'en' ? 'Has note' : '有笔记'} />}
579+
</button>
580+
)
581+
})}
577582
</nav>
578583
</div>
579584
</aside>

0 commit comments

Comments
 (0)