internal

package
v0.0.0-...-7082f02 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocRenderTypeIndex = iota
	DocRenderTypeContent
)
View Source
const (
	NeverLoaded status = iota
	Loading
	LoadingErr
	Loaded
)
View Source
const (
	GetMarkdownActionKey = "/markdown/get"
)

Variables

View Source
var CurDoc = Document{
	Icon:  homeSVG,
	Title: "Home",
	Name:  "home",
}

Functions

This section is empty.

Types

type Book

type Book struct {
	app.Compo

	MdPathGetter func() string
}

func NewBook

func NewBook(mdPathGetter func() string) *Book

func (*Book) Render

func (p *Book) Render() app.UI

type DocContent

type DocContent struct {
	app.Compo

	Icontent string
}

func (*DocContent) Data

func (d *DocContent) Data(v []byte) *DocContent

func (*DocContent) OnMount

func (d *DocContent) OnMount(ctx app.Context)

func (*DocContent) OnUpdate

func (d *DocContent) OnUpdate(ctx app.Context)

func (*DocContent) Render

func (d *DocContent) Render() app.UI

type DocIndex

type DocIndex struct {
	app.Compo

	Indexes []Index
}

func (*DocIndex) Data

func (p *DocIndex) Data(data []byte) *DocIndex

func (*DocIndex) Render

func (p *DocIndex) Render() app.UI

type DocLoader

type DocLoader struct {
	app.Compo
	// contains filtered or unexported fields
}

func (*DocLoader) Doc

func (d *DocLoader) Doc(doc string) *DocLoader

func (*DocLoader) OnMount

func (d *DocLoader) OnMount(ctx app.Context)

func (*DocLoader) OnUpdate

func (d *DocLoader) OnUpdate(ctx app.Context)

func (*DocLoader) Render

func (d *DocLoader) Render() app.UI

func (*DocLoader) RenderType

func (d *DocLoader) RenderType(t DocRenderType) *DocLoader

type DocRenderType

type DocRenderType = int

type Document

type Document struct {
	Icon  string
	Title string
	Name  string
}

type Index

type Index struct {
	Title string
	Href  string
	Level int
}

type MarkdownContent

type MarkdownContent struct {
	Status status
	Err    error
	Toc    []string
	Data   []byte
}
type Menu struct {
	app.Compo
}
func (m *Menu) Render() app.UI

Jump to

Keyboard shortcuts

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