Exdot.Html (exdot v0.1.0) View Source
Convenience macros to create HTML string.
It takes attributes and body as input and returns HTML a map which represent the html. html_label/1
then converts it to correct string which can used as HTML like label
It is of the form:
html_tag attribute_list do
body
end
Macros have more verbose name than the corresponding html tag to avoid unintentional name collision.
Example:
table bgcolor: "#D0E0D0", border: "0", cellborder: "1", cellspacing: "0" do
table_row do
table_data align: "LEFT" do
"Foo"
end
end
table_row do
table_data align: "LEFT" do
"Bar"
end
end
end
Produces
<TABLE BGCOLOR="#D0E0D0" BORDER="0" CELLBORDER="1" CELLSPACING="0" >
<TR ><TD ALIGN="LEFT" >Foo</TD></TR>
<TR ><TD ALIGN="LEFT" >Bar</TD></TR>
</TABLE>
See Exdot.ERD
for example
Link to this section Summary
Functions
takes attributes and do-block and returns <b>
HTML tag
takes attributes and do-block and returns <br>
HTML tag
takes attributes and do-block and returns <font>
HTML tag
takes attributes and do-block and returns <hr>
HTML tag
Takes html map constructed using the macros and produces formatted string which can be used as html_label
takes attributes and do-block and returns <img>
HTML tag
takes attributes and do-block and returns <i>
HTML tag
takes attributes and do-block and returns <o>
HTML tag
takes attributes and do-block and returns <s>
HTML tag
takes attributes and do-block and returns <sub>
HTML tag
takes attributes and do-block and returns <sup>
HTML tag
takes attributes and do-block and returns <table>
HTML tag
takes attributes and do-block and returns <td>
HTML tag
takes attributes and do-block and returns <th>
HTML tag
takes attributes and do-block and returns <tr>
HTML tag
takes attributes and do-block and returns <u>
HTML tag
takes attributes and do-block and returns <vr>
HTML tag
Link to this section Types
Specs
html_tag() :: map()
Link to this section Functions
Specs
takes attributes and do-block and returns <b>
HTML tag
Specs
takes attributes and do-block and returns <br>
HTML tag
Specs
takes attributes and do-block and returns <font>
HTML tag
Specs
takes attributes and do-block and returns <hr>
HTML tag
Specs
Takes html map constructed using the macros and produces formatted string which can be used as html_label
html_label(
font "point-size": "16", face: "Helvetica" do
"Foo "
end
)
Produces
"<<FONT POINT-SIZE=\"16\" FACE=\"Helvetica\" >Foo</FONT>>"
Specs
takes attributes and do-block and returns <img>
HTML tag
Specs
takes attributes and do-block and returns <i>
HTML tag
Specs
takes attributes and do-block and returns <o>
HTML tag
Specs
takes attributes and do-block and returns <s>
HTML tag
Specs
takes attributes and do-block and returns <sub>
HTML tag
Specs
takes attributes and do-block and returns <sup>
HTML tag
Specs
takes attributes and do-block and returns <table>
HTML tag
Specs
takes attributes and do-block and returns <td>
HTML tag
Specs
takes attributes and do-block and returns <th>
HTML tag
Specs
takes attributes and do-block and returns <tr>
HTML tag
Specs
takes attributes and do-block and returns <u>
HTML tag
Specs
takes attributes and do-block and returns <vr>
HTML tag