model

package
v0.0.0-...-1fd5732 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEP = "\n---\n" // sep of slides
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Filename string        // markdown file name
	Theme    string        // markdown theme style
	Page     int           // current visit slide number, from 0
	Slide    string        // current visit slide content (converted to markdown)
	Slides   []string      // all original slides
	Search   search.Search // search input
	// contains filtered or unexported fields
}

func (*Model) CurrentPage

func (m *Model) CurrentPage() int

func (*Model) GetAllSlides

func (m *Model) GetAllSlides() []string

GetAllSlides returns all original slides

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) Initial

func (m *Model) Initial() error

Initial does some initial actions

func (*Model) PageSize

func (m *Model) PageSize() int

PageSize returns total slides count

func (*Model) Render

func (m *Model) Render() string

Render draws layout to a string.

func (*Model) SetPage

func (m *Model) SetPage(page int)

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL