Current section

Files

Jump to
ex_doc lib ex_doc formatter html templates detail_template.eex
Raw

lib/ex_doc/formatter/html/templates/detail_template.eex

<section class="detail" id="<%=enc HTML.link_id(node.id, node.type) %>">
<%= for {default_name, default_arity} <- get_defaults(node) do %>
<span id="<%=enc HTML.link_id("#{default_name}/#{default_arity}", node.type) %>"></span>
<% end %>
<div class="detail-header">
<a href="#<%=enc HTML.link_id(node) %>" class="detail-link" title="Link to this <%= pretty_type(node) %>" aria-label="Link to <%= pretty_type(node) %> <%= node.id %>">
<span class="icon-link" aria-hidden="true"></span>
</a>
<h1 class="signature"><%=h node.signature %></h1>
<%= if node.source_url do %>
<a href="<%= node.source_url %>" class="view-source" rel="help" title="View source" aria-label="View source of <%= pretty_type(node) %> <%= node.id %>">
<span class="icon-code" aria-hidden="true"></span>
</a>
<% end %>
<%= for annotation <- node.annotations do %>
<span class="note">(<%= annotation %>)</span>
<% end %>
</div>
<%= if deprecated = node.deprecated do %>
<div class="deprecated">
This <%= node.type %> is deprecated. <%= h(deprecated) %>.
</div>
<% end %>
<section class="docstring">
<%= if specs = get_specs(node) do %>
<h2>Specs</h2>
<div class="specs">
<%= for spec <- specs do %>
<pre><%= spec %></pre>
<% end %>
</div>
<% end %>
<%= node.rendered_doc |> link_detail_headings(enc(HTML.link_id(node))) %>
</section>
</section>