758 lines
15 KiB
Go
758 lines
15 KiB
Go
// GENERATED BY gitlab.codemonkeysoftware.net/b/hatmill/internal/codegen
|
|
// DO NOT EDIT!
|
|
|
|
package attribute
|
|
|
|
import "gitlab.codemonkeysoftware.net/b/hatmill"
|
|
import "strings"
|
|
import "strconv"
|
|
|
|
// Accept creates a "accept" attribute
|
|
func Accept(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "accept",
|
|
Value: String(strings.Join(value, ",")),
|
|
}
|
|
}
|
|
|
|
// AcceptCharset creates a "accept-charset" attribute
|
|
func AcceptCharset(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "accept-charset",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Action creates a "action" attribute
|
|
func Action(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "action",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Alt creates a "alt" attribute
|
|
func Alt(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "alt",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Async creates a "async" attribute
|
|
func Async() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "async",
|
|
}
|
|
}
|
|
|
|
// Autocapitalize creates a "autocapitalize" attribute
|
|
func Autocapitalize(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "autocapitalize",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Autocomplete creates a "autocomplete" attribute
|
|
func Autocomplete(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "autocomplete",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Autofocus creates a "autofocus" attribute
|
|
func Autofocus() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "autofocus",
|
|
}
|
|
}
|
|
|
|
// Autoplay creates a "autoplay" attribute
|
|
func Autoplay() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "autoplay",
|
|
}
|
|
}
|
|
|
|
// Charset creates a "charset" attribute
|
|
func Charset(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "charset",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Checked creates a "checked" attribute
|
|
func Checked() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "checked",
|
|
}
|
|
}
|
|
|
|
// Cite creates a "cite" attribute
|
|
func Cite(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "cite",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Class creates a "class" attribute
|
|
func Class(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "class",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Cols creates a "cols" attribute
|
|
func Cols(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "cols",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Colspan creates a "colspan" attribute
|
|
func Colspan(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "colspan",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Content creates a "content" attribute
|
|
func Content(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "content",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Contenteditable creates a "contenteditable" attribute
|
|
func Contenteditable(value bool) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "contenteditable",
|
|
Value: String(strconv.FormatBool(value)),
|
|
}
|
|
}
|
|
|
|
// Contextmenu creates a "contextmenu" attribute
|
|
func Contextmenu(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "contextmenu",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Controls creates a "controls" attribute
|
|
func Controls() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "controls",
|
|
}
|
|
}
|
|
|
|
// Crossorigin creates a "crossorigin" attribute
|
|
func Crossorigin(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "crossorigin",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Datetime creates a "datetime" attribute
|
|
func Datetime(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "datetime",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Decoding creates a "decoding" attribute
|
|
func Decoding(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "decoding",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Default creates a "default" attribute
|
|
func Default() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "default",
|
|
}
|
|
}
|
|
|
|
// Defer creates a "defer" attribute
|
|
func Defer() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "defer",
|
|
}
|
|
}
|
|
|
|
// Dir creates a "dir" attribute
|
|
func Dir(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "dir",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Dirname creates a "dirname" attribute
|
|
func Dirname(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "dirname",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Disabled creates a "disabled" attribute
|
|
func Disabled() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "disabled",
|
|
}
|
|
}
|
|
|
|
// Download creates a "download" attribute
|
|
func Download(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "download",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Draggable creates a "draggable" attribute
|
|
func Draggable(value bool) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "draggable",
|
|
Value: String(strconv.FormatBool(value)),
|
|
}
|
|
}
|
|
|
|
// Enctype creates a "enctype" attribute
|
|
func Enctype(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "enctype",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// For creates a "for" attribute
|
|
func For(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "for",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Form creates a "form" attribute
|
|
func Form(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "form",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Formaction creates a "formaction" attribute
|
|
func Formaction(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "formaction",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Formmethod creates a "formmethod" attribute
|
|
func Formmethod(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "formmethod",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Headers creates a "headers" attribute
|
|
func Headers(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "headers",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Height creates a "height" attribute
|
|
func Height(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "height",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Hidden creates a "hidden" attribute
|
|
func Hidden() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "hidden",
|
|
}
|
|
}
|
|
|
|
// High creates a "high" attribute
|
|
func High(value float32) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "high",
|
|
Value: String(strconv.FormatFloat(float64(value), 'G', -1, 32)),
|
|
}
|
|
}
|
|
|
|
// Href creates a "href" attribute
|
|
func Href(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "href",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Hreflang creates a "hreflang" attribute
|
|
func Hreflang(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "hreflang",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// HttpEquiv creates a "http-equiv" attribute
|
|
func HttpEquiv(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "http-equiv",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Id creates a "id" attribute
|
|
func Id(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "id",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Ismap creates a "ismap" attribute
|
|
func Ismap() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "ismap",
|
|
}
|
|
}
|
|
|
|
// Itemprop creates a "itemprop" attribute
|
|
func Itemprop(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "itemprop",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Kind creates a "kind" attribute
|
|
func Kind(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "kind",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Label creates a "label" attribute
|
|
func Label(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "label",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Lang creates a "lang" attribute
|
|
func Lang(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "lang",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// List creates a "list" attribute
|
|
func List(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "list",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Loop creates a "loop" attribute
|
|
func Loop() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "loop",
|
|
}
|
|
}
|
|
|
|
// Low creates a "low" attribute
|
|
func Low(value float32) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "low",
|
|
Value: String(strconv.FormatFloat(float64(value), 'G', -1, 32)),
|
|
}
|
|
}
|
|
|
|
// Max creates a "max" attribute
|
|
func Max(value float32) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "max",
|
|
Value: String(strconv.FormatFloat(float64(value), 'G', -1, 32)),
|
|
}
|
|
}
|
|
|
|
// Maxlength creates a "maxlength" attribute
|
|
func Maxlength(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "maxlength",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Media creates a "media" attribute
|
|
func Media(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "media",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Method creates a "method" attribute
|
|
func Method(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "method",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Min creates a "min" attribute
|
|
func Min(value float32) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "min",
|
|
Value: String(strconv.FormatFloat(float64(value), 'G', -1, 32)),
|
|
}
|
|
}
|
|
|
|
// Minlength creates a "minlength" attribute
|
|
func Minlength(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "minlength",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Multiple creates a "multiple" attribute
|
|
func Multiple() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "multiple",
|
|
}
|
|
}
|
|
|
|
// Muted creates a "muted" attribute
|
|
func Muted() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "muted",
|
|
}
|
|
}
|
|
|
|
// Name creates a "name" attribute
|
|
func Name(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "name",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Novalidate creates a "novalidate" attribute
|
|
func Novalidate() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "novalidate",
|
|
}
|
|
}
|
|
|
|
// Open creates a "open" attribute
|
|
func Open() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "open",
|
|
}
|
|
}
|
|
|
|
// Optimum creates a "optimum" attribute
|
|
func Optimum(value float32) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "optimum",
|
|
Value: String(strconv.FormatFloat(float64(value), 'G', -1, 32)),
|
|
}
|
|
}
|
|
|
|
// Pattern creates a "pattern" attribute
|
|
func Pattern(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "pattern",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Ping creates a "ping" attribute
|
|
func Ping(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "ping",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Placeholder creates a "placeholder" attribute
|
|
func Placeholder(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "placeholder",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Poster creates a "poster" attribute
|
|
func Poster(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "poster",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Preload creates a "preload" attribute
|
|
func Preload(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "preload",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Readonly creates a "readonly" attribute
|
|
func Readonly() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "readonly",
|
|
}
|
|
}
|
|
|
|
// Referrerpolicy creates a "referrerpolicy" attribute
|
|
func Referrerpolicy(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "referrerpolicy",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Rel creates a "rel" attribute
|
|
func Rel(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "rel",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Required creates a "required" attribute
|
|
func Required() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "required",
|
|
}
|
|
}
|
|
|
|
// Reversed creates a "reversed" attribute
|
|
func Reversed() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "reversed",
|
|
}
|
|
}
|
|
|
|
// Rows creates a "rows" attribute
|
|
func Rows(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "rows",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Rowspan creates a "rowspan" attribute
|
|
func Rowspan(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "rowspan",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Sandbox creates a "sandbox" attribute
|
|
func Sandbox(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "sandbox",
|
|
Value: String(strings.Join(value, " ")),
|
|
}
|
|
}
|
|
|
|
// Scope creates a "scope" attribute
|
|
func Scope(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "scope",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Selected creates a "selected" attribute
|
|
func Selected() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "selected",
|
|
}
|
|
}
|
|
|
|
// Shape creates a "shape" attribute
|
|
func Shape(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "shape",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Size creates a "size" attribute
|
|
func Size(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "size",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Sizes creates a "sizes" attribute
|
|
func Sizes(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "sizes",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Span creates a "span" attribute
|
|
func Span(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "span",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Spellcheck creates a "spellcheck" attribute
|
|
func Spellcheck(value bool) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "spellcheck",
|
|
Value: String(strconv.FormatBool(value)),
|
|
}
|
|
}
|
|
|
|
// Src creates a "src" attribute
|
|
func Src(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "src",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Srcdoc creates a "srcdoc" attribute
|
|
func Srcdoc(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "srcdoc",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Srclang creates a "srclang" attribute
|
|
func Srclang(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "srclang",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Srcset creates a "srcset" attribute
|
|
func Srcset(value ...string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "srcset",
|
|
Value: String(strings.Join(value, ",")),
|
|
}
|
|
}
|
|
|
|
// Start creates a "start" attribute
|
|
func Start(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "start",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Style creates a "style" attribute
|
|
func Style(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "style",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Tabindex creates a "tabindex" attribute
|
|
func Tabindex(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "tabindex",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Target creates a "target" attribute
|
|
func Target(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "target",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Title creates a "title" attribute
|
|
func Title(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "title",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Type creates a "type" attribute
|
|
func Type(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "type",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Usemap creates a "usemap" attribute
|
|
func Usemap(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "usemap",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Value creates a "value" attribute
|
|
func Value(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "value",
|
|
Value: String(value),
|
|
}
|
|
}
|
|
|
|
// Width creates a "width" attribute
|
|
func Width(value int) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "width",
|
|
Value: String(strconv.FormatInt(int64(value), 10)),
|
|
}
|
|
}
|
|
|
|
// Wrap creates a "wrap" attribute
|
|
func Wrap(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "wrap",
|
|
Value: String(value),
|
|
}
|
|
}
|