class Asciidoctor::HTML5::BlockColistTemplate

Public Instance Methods

template() click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 469
  def template
    @template ||= @eruby.new "<%#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><img src="<%= icon_uri("callouts/\#{i + 1}") %>" alt="<%= i + 1 %>"></td>
      <td><%= item.text %></td>
    </tr>
    <% end %>
  </table>
  <% else %>
  <ol>
  <% content.each do |item| %>
    <li>
      <p><%= item.text %></p>
    </li>
  <% end %>
  </ol>
  <% end %>
</div>
"
  end