fx

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Unlicense Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circuit

type Circuit interface {
	Router() *http.ServeMux
	Read(path, prefix string)
	Reader(path string) string
	ToBytes(input string) []byte
	ToString(input string) string
	Compress(data []byte) []byte
	Value() map[string][]*Value
}

func NewCircuit

func NewCircuit() Circuit

type Element

type Element interface {
	HTML(html string) *One
	JS(js string) One
	CSS(css string) One
	Markdown() *goldmark.Markdown
	H1(s string) *One
	H2(s string) *One
	H3(s string) *One
	H4(s string) *One
	H5(s string) *One
	H6(s string) *One
	Paragraph(s string) *One
	Span(s string) *One
	Strong(s string) *One
	Em(s string) *One
	Small(s string) *One
	Mark(s string) *One
	Del(s string) *One
	Ins(s string) *One
	Sub(s string) *One
	Sup(s string) *One
	Kbd(s string) *One
	Samp(s string) *One
	VarElem(s string) *One
	Abbr(s string) *One
	Time(s string) *One
	Button(label string) *One
	Code(code string) *One
	CodeBlock(lang, code string) *One

	Div(class string, children ...*One) *One
	Link(href, text string) *One
	LinkedImg(href, src, alt string) *One
	LinkedIcon(href, src, alt string) *One
	List(items []any, ordered bool) *One
	Img(src, alt string) *One
	Video(src string) *One
	Audio(src string) *One
	Iframe(src string) *One
	Embed(src string) *One
	Source(src string) *One
	Canvas(id string) *One
	Table(cols uint8, rows uint64, data [][]string) *One
}

func NewElement

func NewElement() Element

type Forge

type Forge interface {
	Build(class string, elements ...*One)
	Builder(class string, elements ...*One) *One
	Frames(frame ...*One) []*One
}

func NewForge

func NewForge() Forge

type Fx

type Fx struct {
	*zero.Zero
	Forge
	Element
	Circuit
	Hello []byte
}

func NewFx

func NewFx() *Fx

func (*Fx) BuildHello

func (fx *Fx) BuildHello()

func (*Fx) HandleHello

func (fx *Fx) HandleHello(w http.ResponseWriter, r *http.Request)

func (*Fx) Home

func (fx *Fx) Home(logo, heading string)

func (*Fx) Slides

func (fx *Fx) Slides(dir string)

func (*Fx) Text

func (fx *Fx) Text(path string)

type One

type One template.HTML

func Tag

func Tag(tag, text string) *One

type Value

type Value struct {
	Name string
	Type string
	Data []byte
}

Jump to

Keyboard shortcuts

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