2019-03-25 01:56:24 +00:00
|
|
|
package html5
|
|
|
|
|
2019-03-29 02:21:04 +00:00
|
|
|
//go:generate go run ../internal/codegen/codegen.go -input defs.json -output generated.go -package html5 -import
|
|
|
|
|
2019-03-25 01:56:24 +00:00
|
|
|
import "gitlab.codemonkeysoftware.net/b/hatmill"
|
|
|
|
|
|
|
|
// Data creates an attribute of the form "data-suffix='value'".
|
|
|
|
func Data(suffix, value string) hatmill.Attrib {
|
|
|
|
return hatmill.Attrib{
|
|
|
|
Key: "data-" + suffix,
|
|
|
|
Value: value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Text converts a string to a hatmill.Text. Text(s) is functionally identical
|
|
|
|
// to hatmill.Text(s) and is reproduced here for convenience.
|
|
|
|
func Text(s string) hatmill.Text {
|
|
|
|
return hatmill.Text(s)
|
|
|
|
}
|