Documentation
¶
Index ¶
Constants ¶
View Source
const PAGE_SIZE = 4096 // Each page is 4096 chars
Variables ¶
This section is empty.
Functions ¶
func LearningMaterialList ¶
func LearningMaterialList(props LearningMaterialListProps) *dom.Node
func ReadingMaterialPage ¶
func ReadingMaterialPage(props ReadingProps) *dom.Node
func Word ¶
Word renders a single word as an inline span element Each word can be individually focused and styled
func WordDefinitionPanel ¶ added in v0.0.26
WordDefinitionPanel renders a bordered panel showing word definition
Types ¶
type ReadingProps ¶
type ReadingProps struct {
MaterialID int64
MaterialTitle string
CurrentPage int
TotalPages int
Content string
Loading bool
Error string
// Word navigation
FocusedWordIndex int
WordPositions []models.WordPosition
// Viewport scrolling
ScrollOffset int
ViewportHeight int
// Word definition
ShowDefinition bool
DefinitionWord string
OnNextPage func()
OnPrevPage func()
OnGoToPage func(page int)
OnJumpToFirst func() // Jump to first word (gg in vim)
OnJumpToLast func() // Jump to last word (G in vim)
OnKeyG func() // Handle 'g' key press for 'gg' sequence
OnToggleDefinition func() // Toggle word definition panel (Enter key)
}
Click to show internal directories.
Click to hide internal directories.