stch.html documentation
DSL for HTML generation.
->Doctype
(->Doctype declaration)
Positional factory function for class stch.html.Doctype.
->Element
(->Element tag attrs children)
Positional factory function for class stch.html.Element.
->RawHTML
(->RawHTML html)
Positional factory function for class stch.html.RawHTML.
->html
(->html arg1)
(->html arg1 arg2)
(->html arg1 arg2 & args)
Convert one or more elements to an HTML string.
IHTMLBuilder
Build HTML from elements.
deffrag
macro
(deffrag name bindings & body)
Define a function that returns a list of Elements.
defhtml
macro
(defhtml name bindings & body)
Define a function that returns an HTML string.
escape
(escape s)
Inputs: [s :- String]
Returns: String
Convert special characters into HTML character entities.
html4-strict
(html4-strict)
Inputs: []
Returns: Doctype
HTML 4.01 Strict Doctype.
html4-trans
(html4-trans)
Inputs: []
Returns: Doctype
HTML 4.01 Transitional Doctype.
html5
(html5)
Inputs: []
Returns: Doctype
HTML5 Doctype.
map->Doctype
(map->Doctype m1608)
Factory function for class Doctype, taking a map of keywords to field values, but not 400x slower than ->x like the clojure.core version
map->Element
(map->Element m__5818__auto__)
Factory function for class stch.html.Element, taking a map of keywords to field values.
map->RawHTML
(map->RawHTML m__5818__auto__)
Factory function for class stch.html.RawHTML, taking a map of keywords to field values.
mapjoin
(mapjoin f coll)
Inputs: [f :- (Fn), coll :- [Any]]
Returns: String
mk-elem-fn
(mk-elem-fn tag)
Inputs: [tag :- String]
Returns: (Fn Element [& [Any]])
Make en element fn given a tag.
raw
(raw html)
Inputs: [html]
Returns: RawHTML
Prevent HTML from being escaped.
strict-map->Doctype
(strict-map->Doctype m1609 & [drop-extra-keys?__535__auto__])
Factory function for class Doctype, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->