html

package
v0.0.0-...-f683405 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ViewKey = "html"

Functions

func Icon

func Icon(icon string) string

func Render

func Render(el interface{}) string

Types

type Attributes

type Attributes map[string]interface{}

func (Attributes) Render

func (attrs Attributes) Render() string

func (Attributes) Set

func (attrs Attributes) Set(key string, value interface{})

type Element

type Element struct {
	Tag        string
	Body       interface{}
	Attributes Attributes
}

func Tag

func Tag(tag string, inner interface{}) *Element

func (Element) Render

func (el Element) Render() string

func (*Element) Set

func (el *Element) Set(key string, value interface{}) *Element

type InputStruct

type InputStruct struct {
	Type       string
	Label      string
	Name       string
	Pre        string
	Post       string
	Hint       string
	Size       int
	LabelSize  int
	InputSize  int
	Horizontal bool
	Attributes Attributes
	Options    []KeyValue
	Sub        string
	Value      interface{}
}

func Input

func Input(_type, name, label string) *InputStruct

func (*InputStruct) AddClass

func (i *InputStruct) AddClass(s string) *InputStruct

func (InputStruct) Attr

func (i InputStruct) Attr(key string) string

func (*InputStruct) Class

func (i *InputStruct) Class(s string) *InputStruct

func (*InputStruct) Depend

func (i *InputStruct) Depend(s string) *InputStruct

func (*InputStruct) Disabled

func (i *InputStruct) Disabled() *InputStruct

func (*InputStruct) ID

func (i *InputStruct) ID(s string) *InputStruct

func (InputStruct) IsSelected

func (i InputStruct) IsSelected(inputs ...interface{}) bool

func (*InputStruct) Max

func (i *InputStruct) Max(s interface{}) *InputStruct

func (*InputStruct) MaxLength

func (i *InputStruct) MaxLength(s string) *InputStruct

func (*InputStruct) Min

func (i *InputStruct) Min(s interface{}) *InputStruct

func (*InputStruct) MinLength

func (i *InputStruct) MinLength(s string) *InputStruct

func (*InputStruct) Multiple

func (i *InputStruct) Multiple() *InputStruct

func (*InputStruct) Placeholder

func (i *InputStruct) Placeholder(s string) *InputStruct

func (*InputStruct) PostText

func (i *InputStruct) PostText(s string) *InputStruct

func (*InputStruct) PreText

func (i *InputStruct) PreText(s string) *InputStruct

func (*InputStruct) Readonly

func (i *InputStruct) Readonly(s int) *InputStruct

func (InputStruct) Render

func (i InputStruct) Render() string

func (*InputStruct) Required

func (i *InputStruct) Required(s string) *InputStruct

func (*InputStruct) SetAttr

func (i *InputStruct) SetAttr(k string, s interface{}) *InputStruct

func (*InputStruct) SetInputSize

func (i *InputStruct) SetInputSize(s int) *InputStruct

func (*InputStruct) SetLabel

func (i *InputStruct) SetLabel(s string) *InputStruct

func (*InputStruct) SetLabelSize

func (i *InputStruct) SetLabelSize(s int) *InputStruct

func (*InputStruct) SetName

func (i *InputStruct) SetName(s string) *InputStruct

func (*InputStruct) SetOptions

func (i *InputStruct) SetOptions(options []KeyValue) *InputStruct

func (*InputStruct) SetSize

func (i *InputStruct) SetSize(s int) *InputStruct

func (*InputStruct) SetSub

func (i *InputStruct) SetSub(s string) *InputStruct

func (*InputStruct) SetValue

func (i *InputStruct) SetValue(s interface{}) *InputStruct

func (InputStruct) String

func (i InputStruct) String() string

type KeyValue

type KeyValue struct {
	Key   interface{}
	Value interface{}
}

type Renderable

type Renderable interface {
	Render() string
}

Jump to

Keyboard shortcuts

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