elements

package
v0.0.0-...-25b1d33 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	metas.Generic
	// contains filtered or unexported fields
}

A is a controlling structure that describes everything for "a" HTML element.

func NewA

func NewA(opts *AOptions) *A

NewA creates new "a" element controlling structure.

func (*A) Build

func (a *A) Build() *js.Object

Build builds element and calls Build() for all child elements.

type AOptions

type AOptions struct {
	Class string
	Href  string
	ID    string
	Text  string
}

AOptions is an "a" HTML element configuration structure.

type Body

type Body struct {
	metas.Generic
}

Body is a controlling structure for "body" HTML head element.

func NewBody

func NewBody() *Body

NewBody creates new "body" HTML element controlling structure.

func (*Body) Build

func (b *Body) Build() *js.Object

Build builds child elements.

type Button

type Button struct {
	metas.Generic
	// contains filtered or unexported fields
}

Button is a controlling structure for "button" HTML element.

func NewButton

func NewButton(buttonOptions *ButtonOptions) *Button

NewButton creates new "button" HTML element controlling structure.

func (*Button) Build

func (b *Button) Build() *js.Object

Build builds element and calls Build() for all child elements.

type ButtonOptions

type ButtonOptions struct {
	Class          string
	ID             string
	OnClickHandler func(e *js.Object)
	Text           string
}

ButtonOptions is a "button" HTML element configuration structure.

type Div

type Div struct {
	metas.Generic
	// contains filtered or unexported fields
}

Div is a controlling structure for "div" HTML element.

func NewDiv

func NewDiv(divOptions *DivOptions) *Div

NewDiv creates new "div" HTML element controlling structure.

func (*Div) Build

func (d *Div) Build() *js.Object

Build builds element and calls Build() for all child elements.

type DivOptions

type DivOptions struct {
	Class string
	ID    string
}

DivOptions is a "div" HTML element configuration structure.

type HTML

type HTML struct {
	metas.Generic

	Head *Head
	Body *Body
}

HTML is a controlling structure for HTML page.

func NewHTML

func NewHTML() *HTML

NewHTML creates new HTML page.

func (*HTML) Build

func (h *HTML) Build() *js.Object

Build builds HTML and all it's childs. For HTML object it'll return nil.

type Head struct {
	metas.Generic
	// contains filtered or unexported fields
}

Head is a controlling structure for "head" HTML head element.

func NewHead

func NewHead(opts *HeadOptions) *Head

NewHeader creates new "head" HTML element controlling structure.

func (*Head) Build

func (hw *Head) Build() *js.Object

Build builds header.

func (*Head) SetTitle

func (h *Head) SetTitle(title string)

SetTitle sets title for whole page.

type HeadOptions

type HeadOptions struct{}

HeadOptions is a "head" HTML head element configuration structure.

type Link struct {
	// contains filtered or unexported fields
}

Link is a controlling structure for "link" HTML head element.

func NewLink(linkOptions *LinkOptions) *Link

NewLink creates new "link" HTML head controlling structure.

func (*Link) Build

func (l *Link) Build() *js.Object

Build builds element.

type LinkOptions

type LinkOptions struct {
	Href string
	ID   string
	Rel  string
}

LinkOptions is a "link" HTML head element configuration structure.

type Meta

type Meta struct {
	// contains filtered or unexported fields
}

Meta is a controlling structure for "meta" HTML head element.

func NewMeta

func NewMeta(metaOptions *MetaOptions) *Meta

NewMeta creates "meta" HTML head controlling structure.

func (*Meta) Build

func (m *Meta) Build() *js.Object

Build builds element.

type MetaOptions

type MetaOptions struct {
	Charset string
	Content string
	Name    string
}

MetaOptions is a "meta" HTML head element configuration structure.

type Nav struct {
	metas.Generic
	// contains filtered or unexported fields
}

Nav is a controlling structure for "nav" HTML element.

func NewNav

func NewNav(navOptions *NavOptions) *Nav

NewNav creates new "nav" HTML element controlling structure.

func (n *Nav) Build() *js.Object

Build builds element and calls Build() for all child elements.

type NavBar struct {
	// contains filtered or unexported fields
}

NavBar is a controlling structure for "nav" HTML body element.

func NewNavBar

func NewNavBar(opts *NavBarOptions) *NavBar

NewNavBar creates new "nav" HTML element controlling structure.

func (n *NavBar) Build() *js.Object

Build builds element and calls Build() for all child elements.

type NavBarOptions struct {
	IsDark bool
	Title  string
}

NavBarOptions is a "nav" HTML body element configuration structure.

type NavOptions struct {
	Class string
	Data  map[string]string
	Role  string
}

NavOptions is a "nav" HTML element configuration structure.

type P

type P struct {
	metas.Generic
	// contains filtered or unexported fields
}

P is a controlling structure for "p" HTML element.

func NewP

func NewP(opts *POptions) *P

NewP creates new "p" HTML element controlling structure.

func (*P) Build

func (p *P) Build() *js.Object

Build builds element and calls Build() for all child elements.

type POptions

type POptions struct {
	Class string
	ID    string
	Text  string
}

POptions is a "p" HTML element configuration structure.

type Section

type Section struct {
	metas.Generic
	// contains filtered or unexported fields
}

Section is a controlling structure for "section" HTML element.

func NewSection

func NewSection(sectionOptions *SectionOptions) *Section

NewSection creates new "section" HTML element controlling structure.

func (*Section) Build

func (s *Section) Build() *js.Object

Build builds element and calls Build() for all child elements.

type SectionOptions

type SectionOptions struct {
	Class string
}

SectionOptions is a "section" HTML element configuration structure.

type TBody

type TBody struct {
	metas.Generic
}

TBody is a controlling structure for "tbody" HTML element.

func NewTBody

func NewTBody() *TBody

NewTBody creates new "tbody" HTML element controlling structure.

func (*TBody) Build

func (t *TBody) Build() *js.Object

Build builds element and calls Build() for all child elements.

type TD

type TD struct {
	metas.Generic
}

TD is a controlling structure for "td" HTML element.

func NewTD

func NewTD() *TD

NewTD creates new "td" HTML element controlling structure.

func (*TD) Build

func (t *TD) Build() *js.Object

Build builds element and calls Build() for all child elements.

type TFoot

type TFoot struct {
	metas.Generic
}

TFoot is a controlling structure for "tfoot" HTML element.

func NewTFoot

func NewTFoot() *TFoot

NewTFoot creates new "tfoot" HTML element controlling structure.

func (*TFoot) Build

func (t *TFoot) Build() *js.Object

Build builds element and calls Build() for all child elements.

type TH

type TH struct {
	metas.Generic
}

TH is a controlling structure for "th" HTML element.

func NewTH

func NewTH() *TH

NewTH creates new "th" HTML element controlling structure.

func (*TH) Build

func (t *TH) Build() *js.Object

Build builds element and calls Build() for all child elements.

type THead

type THead struct {
	metas.Generic
}

THead is a controlling structure for "thead" HTML element.

func NewTHead

func NewTHead() *THead

NewTHead creates new "thead" HTML element controlling structure.

func (*THead) Build

func (t *THead) Build() *js.Object

Build builds element and calls Build() for all child elements.

type TR

type TR struct {
	metas.Generic
}

TR is a controlling structure for "tr" HTML element.

func NewTR

func NewTR() *TR

NewTR creates new "tr" HTML element controlling structure.

func (*TR) Build

func (t *TR) Build() *js.Object

Build builds element and calls Build() for all child elements.

type Table

type Table struct {
	metas.Generic
	// contains filtered or unexported fields
}

Table is a controlling structure for "table" HTML element.

func NewTable

func NewTable(tableOpts *TableOptions) *Table

NewTable creates new "table" HTML element controlling structure.

func (*Table) Build

func (t *Table) Build() *js.Object

Build builds element and calls Build() for all child elements.

type TableOptions

type TableOptions struct {
	Class       string
	IsBordered  bool
	IsFullWidth bool
	IsHoverable bool
	IsNarrow    bool
	IsStriped   bool

	Header []string
}

TableOptions is a "table" HTML element configuration structure.

Jump to

Keyboard shortcuts

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