# Flax.prepare_templateFunction.

prepare_template(s::String)
prepare_template{T}(v::Vector{T})

Cleans up the template before rendering (ex by removing empty nodes).

source

# Flax.attributesFunction.

attributes(attrs::Vector{Pair{Symbol,String}} = Vector{Pair{Symbol,String}}()) :: Vector{String}

Parses HTML attributes.

source

# Flax.normal_elementFunction.

normal_element(f::Function, elem::String, attrs::Vector{Pair{Symbol,String}} = Vector{Pair{Symbol,String}}()) :: HTMLString

Generates a regular HTML element in the form <...>

source

# Flax.void_elementFunction.

void_element(elem::String, attrs::Vector{Pair{Symbol,String}} = Vector{Pair{Symbol,String}}()) :: HTMLString

Generates a void HTML element in the form <...>

source

# Flax.skip_elementFunction.

skip_element(f::Function) :: HTMLString
skip_element() :: HTMLString

Cleans up empty elements.

source

# Flax.include_templateFunction.

include_template(path::String; partial = true, func_name = "") :: String

Includes a template inside another.

source

# Flax.htmlFunction.

html(resource::Symbol, action::Symbol, layout::Symbol; vars...) :: Dict{Symbol,String}

Renders a HTML view corresponding to a resource and a controller action.

source

# Flax.flaxFunction.

flax(resource::Symbol, action::Symbol, layout::Symbol; vars...) :: Dict{Symbol,String}

Renders a Flax view corresponding to a resource and a controller action.

source

# Flax.jsonFunction.

json(resource::Symbol, action::Symbol; vars...) :: Dict{Symbol,String}

Renders a JSON view corresponding to a resource and a controller action.

source

# Flax.function_nameFunction.

function_name(file_path::String)

Generates random functions names for generated Flax views functions.

source

# Flax.html_to_flaxFunction.

html_to_flax(file_path::String; partial = true) :: String

Converts a HTML document to a Flax document.

source

# Flax.read_template_fileFunction.

read_template_file(file_path::String) :: String

Reads file_path template from disk.

source

# Flax.parse_templateFunction.

parse_template(file_path::String; partial = true) :: String

Parses a HTML file into a string of Flax code.

source

# Flax.parse_treeFunction.

parse_tree(elem, output, depth; partial = true) :: String

Parses a Gumbo tree structure into a string of Flax code.

source

# Flax.parse_tagsFunction.

parse_tags(line::Tuple{Int64,String}, strip_close_tag = false) :: String

Parses special Flax tags.

source

# Flax.doctypeFunction.

doctype(doctype::Symbol = :html) :: String

Outputs document's doctype.

source

# Flax.docFunction.

doc(html::String) :: String
doc(doctype::Symbol, html::String) :: String

Outputs document's doctype.

source

# Flax.register_elementsFunction.

register_elements() :: Void

Generated functions that represent Flax functions definitions corresponding to HTML elements.

source

# Flax.include_helpersFunction.

include_helpers() :: Void

Loads helpers and makes them available in the view layer.

source

# Flax.foreachvarFunction.

foreachvar(f::Function, key::Symbol, v::Vector) :: String

Utility function for looping over a vector v in the view layer.

source

# Flax.var_dumpFunction.

var_dump(var, html = true) :: String

Utility function for dumping a variable.

source