%~
%% @title erlyweb_html.et
%% @doc This file contains functions for generating common HTML elements.
%% You can import them into your templates or use them directly.
%%
%% @license for license information see LICENSE.txt
-author("Yariv Sadan (yarivsblog@gmail.com, http://yarivsblog.com").
%% A helper function
join(Args) ->
join(Args, []).
join([], Acc) -> [];
join([Last], Acc) ->
lists:reverse([Last | Acc]);
join([First | Rest], Acc) ->
join(Rest, [[First, $/] | Acc]).
%>
<%@ a(PathElems, Text) %><% Text %><%@ a(PathElems, Text, Props) %>>,Value,<<"\"">>] || {Name, Value} <- Props] %>><%
Text %><%@ table(Records) %>
<% table(Records, undefined) %>
<%@ table(Records, Headers) %>
<% headers(Headers) %>
<% [row(R) || R <- Records] %>