<% render_hfeed(options?) do ... end %>
<% render_hentry(id, options?) do ... end %>Render ol with class hfeed, or li with the class hentry and id. Options passed to HTML element.
<%= hentry_title(title?, options?) { ... } %>
<%= hentry_content(content?, options?) { ... } %>Returns header with class entry-title, or element with class entry-content. Content pass as argument or returned from block, options passed to wrapping element. Use :level to specify header level (default 2), :tag to specify content element (default p).
<%= hcard(values) %>Values:
:fn):fn)img tag<%= Time.microformat(type, format?) { ... } %>Formats time using the date/time pattern, returns abbr element. First argument is date/time type (e.g. :published). Human formatted: using second argument (see strftime), result of block, or self.to_s.
<% render_hfeed do
posts.each do |post|
render_hentry "post-#{post.id}" do %>
<%= hentry_title post.title %>
<%= hentry_content post.content %>
<p>Published on <%= post.created_on.microformat :published %> by
<%= hcard :fn=>post.author, :url=>post.author_url, :class=>"author" %>
</p><%
end
end
end %>
© 2006 Assaf Arkin http://labnotes.org
Released under Creative Commons Attribution