Methods

Files

Class/Module Index [+]

Quicksearch

Asciidoctor::HTML5::BlockAdmonitionTemplate

Public Instance Methods

result(node) click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 487
  def result(node)
    id = node.id
    name = node.attr 'name'
    role = node.role
    title = node.title? ? node.title : nil
    if node.document.attr? 'icons'
      if node.document.attr? 'icons', 'font'
        caption = %(<i class="icon-#{name}" title="#{node.caption}"></i>)
      else
        caption = %(<img src="#{node.icon_uri(name)}" alt="#{node.caption}">)
      end
    else
      caption = %(<div class="title">#{node.caption}</div>)
    end
    %(<div#{id && " id=\"#{id}\""} class="admonitionblock #{name}#{role && " #{role}"}">
<table>
<tr>
<td class="icon">
#{caption}
</td>
<td class="content">#{title ? "
<div class=\"title\">#{title}</div>" : nil}
#{node.content}
</td>
</tr>
</table>
</div>)
  end
template() click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 516
def template
  :invoke_result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.