Liking cljdoc? Tell your friends :D

re-html-template.core

Macro that generates Reagent components from HTML files.

Macro that generates Reagent components from HTML files.
raw docstring

define-html-templatecljmacro

(define-html-template & args)

Define HTML template component with the given name and arguments. Expands to a function with the specified name and arguments that returns the HTML as hiccup.

Options map supports to following keys: :file a file (in the classpath) to load HTML from :selector a CSS selector string to take as the root element of the component

Selectors and transformations are an alternating list of selectors and transformation maps. Each selector is either a keyword (matching an element with a class and id, like: :div.main-content) or a vector of keywords (path of matching elements) A transformation is a map of supported transformation types to forms. The forms are spliced to the function body and may refer to the arguments.

Supported transformation types are: :when Only show element if form yields truthy value :omit Unconditionally remove this element :replace Replace the whole element with the form. :prepend-children Prepend children to the beginning of the element :append-children Append children to the end of the element :replace-children Replace all children :set-attributes Set attributes generated by for (must yield an attribute map) :for Repeat this node for a each element of a given collection

Define HTML template component with the given name and arguments.
Expands to a function with the specified name and arguments that returns
the HTML as hiccup.

Options map supports to following keys:
:file        a file (in the classpath) to load HTML from
:selector    a CSS selector string to take as the root element of the component

Selectors and transformations are an alternating list of selectors and transformation
maps.
Each selector is either a keyword (matching an element with a class and id, like: :div.main-content)
or a vector of keywords (path of matching elements)
A transformation is a map of supported transformation types to forms. The forms are spliced to the
function body and may refer to the arguments.

Supported transformation types are:
:when               Only show element if form yields truthy value
:omit               Unconditionally remove this element
:replace            Replace the whole element with the form.
:prepend-children   Prepend children to the beginning of the element
:append-children    Append children to the end of the element
:replace-children   Replace all children
:set-attributes     Set attributes generated by for (must yield an attribute map)
:for                Repeat this node for a each element of a given collection

sourceraw docstring

handlebar-patternclj

source

ordered-transformation-typesclj

source

transformcljmultimethod

source

transformation-orderclj

(transformation-order t)
source

transformation-typeclj

source

wrapping-transformation?clj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close