class Asciidoctor::HTML5::BlockColistTemplate

Public Instance Methods

template() click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 660
  def template
    @template ||= @eruby.new <<-EOS
<%#encoding:UTF-8%><div#{id} class="colist#{style_class}#{role_class}">
#{title_div}<%
if attr? :icons %>
<table><%
  content.each_with_index do |item, i| %>
<tr>
<td><%
    if attr? :icons, 'font' %><i class="conum"><%= i + 1 %></i><%
    else %><img src="<%= icon_uri("callouts/\#{i + 1}") %>" alt="<%= i + 1 %>"><%
    end %></td>
<td><%= item.text %></td>
</tr><%
  end %>
</table><%
else %>
<ol><%
  content.each do |item| %>
<li>
<p><%= item.text %></p>
</li><%
  end %>
</ol><%
end %>
</div>
    EOS
  end