module Fluid::HTMLable
Defined in:
fluid/htmlable.crConstant Summary
-
HTML_DOC_TEMPLATE =
"<!DOCTYPE html>\n<html>\n<head>\n {{html_head}}\n</head>\n<body>\n {{html_body}}\n</body>\n</html>"
Instance Method Summary
-
#before_render
A hook that is executed during the output of any
Fluid
mixin. -
#before_to_html
A hook that is executing during the
#to_html
method. -
#css : String | Nil
Returns the unminified CSS for this document.
-
#full_css : String
Returns the CSS for this document and all included partials.
-
#html_head(minify : Bool) : String
Returns the contents of the element for the html output.
-
#to_html : String
Generates and returns the html output of the document.
-
#to_html_doc(minify = true) : String
Generates and returns a complete HTML document with the output from
#to_html
forming the element.
Instance Method Detail
A hook that is executed during the output of any Fluid
mixin. Unlike '#before_to_text', this hook is called during all Fluid
mixin output methods.
Generates and returns the html output of the document.
Executes 2 hooks, #before_render
and #before_to_html
, in that order.
Generates and returns a complete HTML document with the output from #to_html
forming the element.
For example:
greeting.to_html #=> %(<p class="salutation">Hello {{name}}</p>)
greeting.to_html_doc #=> %(<!DOCTYPE html><html><head><style>.salutation{font-style:italic;}</style></head><body><p class="salutation">Hello {{name}}</p></body></html>)
Like #to_html
, this method executes the #before_render
and #before_to_html
hooks, in that order.