Versions in this module Expand all Collapse all v0 v0.0.6 May 7, 2023 Changes in this version + type Pre string + func (p Pre) HTML() ([]byte, error) + type PreByte []byte + func (p PreByte) HTML() ([]byte, error) type StringSlice + func (ss StringSlice) HTML() ([]byte, error) v0.0.5 Apr 15, 2023 Changes in this version + var BR = Bytes("<br/>") + var ErrEmptyTagName = errors.New("empty tag name") + var HR = Bytes("<hr/>") + var NL = Bytes("\n") + func Add(to HasChildren, add ...Element) + func AddClass(w AttrsMapper, class ...string) + func DeleteAttr(w AttrsMapper, key string, values ...string) + func DeleteClass(w AttrsMapper, class ...string) + func SetAccept(w AttrsMapper, accept string) + func SetAction(w AttrsMapper, action string) + func SetAsync(w AttrsMapper) + func SetAttr(w AttrsMapper, key string, value ...string) + func SetAttrNoValue(w AttrsMapper, key string) + func SetAutoComplete(w AttrsMapper, on bool) + func SetChecked(w AttrsMapper, checked bool) + func SetClass(w AttrsMapper, class ...string) + func SetDisabled(w AttrsMapper, disabled bool) + func SetForm(w AttrsMapper, form string) + func SetFormAction(w AttrsMapper, formAction string) + func SetHeight(w AttrsMapper, height string) + func SetID(w AttrsMapper, id string) + func SetLang(w AttrsMapper, lang string) + func SetList(w AttrsMapper, list string) + func SetMax(w AttrsMapper, max string) + func SetMaxLength(w AttrsMapper, maxLen int) + func SetMethod(w AttrsMapper, method string) + func SetMin(w AttrsMapper, min string) + func SetMinLength(w AttrsMapper, minLen int) + func SetName(w AttrsMapper, name string) + func SetOnBlur(w AttrsMapper, script string) + func SetOnChange(w AttrsMapper, script string) + func SetOnClick(w AttrsMapper, script string) + func SetOnFocus(w AttrsMapper, script string) + func SetOnFormChange(w AttrsMapper, script string) + func SetOnFormInput(w AttrsMapper, script string) + func SetOnInput(w AttrsMapper, script string) + func SetOnInvalid(w AttrsMapper, script string) + func SetOnKeyDown(w AttrsMapper, script string) + func SetOnKeyPress(w AttrsMapper, script string) + func SetOnKeyUp(w AttrsMapper, script string) + func SetOnReset(w AttrsMapper, script string) + func SetOnSelect(w AttrsMapper, script string) + func SetOnSubmit(w AttrsMapper, script string) + func SetReadOnly(w AttrsMapper, readonly bool) + func SetRequired(w AttrsMapper, required bool) + func SetSelected(w AttrsMapper, checked bool) + func SetSize(w AttrsMapper, size int) + func SetSrc(w AttrsMapper, src string) + func SetTarget(w AttrsMapper, target string) + func SetTitle(w AttrsMapper, title string) + func SetType(w AttrsMapper, tp string) + func SetValue(w AttrsMapper, value string) + func SetWidth(w AttrsMapper, width string) + type A struct + func NewA(href string) *A + func (a *A) HTML() ([]byte, error) + func (a *A) Href(href string) *A + func (a *A) HrefLang(hrefLang string) *A + func (a *A) Ping(ping string) *A + func (a *A) Rel(rel string) *A + func (a *A) Target(target string) *A + func (a *A) Title(title string) *A + func (a *A) Type(tp string) *A + type Any struct + Body Elements + SelfClose bool + Tag string + func NewAny(tag string) *Any + func NewArticle() *Any + func NewBody() *Any + func NewButton(value string) *Any + func NewCode() *Any + func NewDL() *Any + func NewDT() *Any + func NewDiv() *Any + func NewFieldSet() *Any + func NewFigCaption() *Any + func NewFigure() *Any + func NewForm(method string, action string) *Any + func NewHTML() *Any + func NewHead() *Any + func NewInput(tp string, name string) *Any + func NewLabel(e Element) *Any + func NewLegend(e Element) *Any + func NewNav() *Any + func NewOl(values StringSlice) *Any + func NewOption(value string, b Element) *Any + func NewP() *Any + func NewPre() *Any + func NewScript() *Any + func NewSelect(opts ...Element) *Any + func NewStyle() *Any + func NewSubmit(value string) *Any + func NewTd(val ...Element) *Any + func NewTh(val ...Element) *Any + func NewTitle(c Element) *Any + func NewUl(values StringSlice) *Any + func WithAny(a *Any, fn func(*Any)) *Any + func (c *Any) Add(values ...Element) + func (c *Any) HTML() ([]byte, error) + type Attr struct + Key string + Values fstypes.StringSlice + func (a *Attr) Add(value ...string) + func (a *Attr) Delete(value ...string) + func (a *Attr) First() string + func (a *Attr) Set(value ...string) + type Attrs struct + KVSep string + Sep string + func (a *Attrs) Attr(key string) *Attr + func (a *Attrs) Delete(keys ...string) + func (a *Attrs) GetKVSep() string + func (a *Attrs) GetSep() string + func (a *Attrs) HTML() ([]byte, error) + func (a *Attrs) Keys() []string + func (a *Attrs) MustAttr(key string) *Attr + func (a *Attrs) Set(attr ...*Attr) + type AttrsMapper interface + FindAttrs func() *Attrs + MustAttrs func() *Attrs + type Bytes []byte + func (b Bytes) HTML() ([]byte, error) + type Comment string + func (c Comment) HTML() ([]byte, error) + type Element interface + HTML func() ([]byte, error) + type Elements []Element + func ToElements(es ...Element) Elements + func (hs *Elements) Add(values ...Element) + func (hs *Elements) InsertFront(values ...Element) + func (hs *Elements) Set(values ...Element) + func (hs Elements) HTML() ([]byte, error) + type HasChildren interface + Add func(values ...Element) + type IMG struct + func NewIMG(src string) *IMG + func (m *IMG) ALT(alt string) *IMG + func (m *IMG) HTML() ([]byte, error) + func (m *IMG) SRC(src string) *IMG + type Link struct + func NewLink() *Link + func (a *Link) HTML() ([]byte, error) + func (a *Link) Href(href string) *Link + func (a *Link) Rel(rel string) *Link + func (a *Link) Type(tp string) *Link + type Meta struct + func NewMeta() *Meta + func (a *Meta) Charset(charset string) *Meta + func (a *Meta) Content(content string) *Meta + func (a *Meta) HTML() ([]byte, error) + func (a *Meta) HTTPEquiv(equiv string) *Meta + func (a *Meta) Media(media string) *Meta + func (a *Meta) Name(name string) *Meta + type String string + func (s String) HTML() ([]byte, error) + type StringSlice []string + func (ss StringSlice) ToElements(tag string, fn func(b *Any)) Elements + type StyleAttr struct + func (s *StyleAttr) BackgroundColor(color string) *StyleAttr + func (s *StyleAttr) Border(val string) *StyleAttr + func (s *StyleAttr) Color(color string) *StyleAttr + func (s *StyleAttr) Font(val string) *StyleAttr + func (s *StyleAttr) FontFamily(val string) *StyleAttr + func (s *StyleAttr) FontSize(val string) *StyleAttr + func (s *StyleAttr) FontWeight(val string) *StyleAttr + func (s *StyleAttr) Get(key string) string + func (s *StyleAttr) HTML() ([]byte, error) + func (s *StyleAttr) Height(h string) *StyleAttr + func (s *StyleAttr) Margin(val string) *StyleAttr + func (s *StyleAttr) MaxHeight(h string) *StyleAttr + func (s *StyleAttr) MaxWidth(w string) *StyleAttr + func (s *StyleAttr) MinHeight(h string) *StyleAttr + func (s *StyleAttr) MinWidth(w string) *StyleAttr + func (s *StyleAttr) Padding(val string) *StyleAttr + func (s *StyleAttr) SetTo(a AttrsMapper) error + func (s *StyleAttr) TextAlign(align string) *StyleAttr + func (s *StyleAttr) Width(w string) *StyleAttr + type Table1 struct + func (t *Table1) AddRow(cells ...Element) + func (t *Table1) AddRows(rows ...[]Element) + func (t *Table1) HTML() ([]byte, error) + func (t *Table1) SetFooter(cells ...Element) + func (t *Table1) SetHeader(cells ...Element) + type Text String + func (b Text) HTML() ([]byte, error) + type WithAttrs struct + Attrs *Attrs + func (w *WithAttrs) FindAttrs() *Attrs + func (w *WithAttrs) MustAttrs() *Attrs