<%~ -include("src/item.hrl"). %> <%! beginning of template %> <% {Items, Abridge, Comments} = Data, [ item(Item, Abridge, Comments) || Item <- Items ] %> <%! end of template %> <%@ item(Item, Abridge, Comments) %>
<% anchor(by_pubdate(Item#item.pubdate), Item#item.title) %>
<% date(Item#item.pubdate) %>
<% markup:to_html(Item#item.body, Abridge) %>
<% case Abridge of true -> anchor(by_pubdate(Item#item.pubdate), "read more..."); false -> "" end %>
<% [ anchor(by_tag(Tag), Tag) || Tag <- Item#item.tags ] %>
<% case Comments of true -> disquss(); false -> "" end %>
<%@ date(Pubdate) %> <%? {{Year,Month,Day},_} = calendar:now_to_universal_time(Pubdate) %> <% io_lib:format("~4.10.0B/~2.10.0B/~2.10.0B", [Year,Month,Day]) %> <%@ by_pubdate(Pubdate) %> <%? {Mega,One,Micro} = Pubdate %> <% io_lib:format("/one/~w/~w/~w", [Mega,One,Micro]) %> <%@ by_tag(Tag) %> /all?order=desc&tag=<%Tag%>&abridge=true <%@ anchor(Href, Text) %> ><% Text %> <%@ disquss() %>
blog comments powered by Disqus