Current section

Files

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

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

<%= head_template(config, module.title, false) %>
<%= sidebar_template(config, module.type) %>
<div id="top-content">
<div class="heading-with-actions top-heading">
<h1>
<span translate="no"><%= breakable_module_title(module.title) %></span> <%= module_type(module) %>
<small class="app-vsn" translate="no">(<%= config.project %> v<%= config.version %>)</small>
<%= for annotation <- module.annotations do %>
<span class="note">(<%= annotation %>)</span>
<% end %>
</h1>
<%= if module.source_format == "text/markdown" do %>
<%= copy_markdown_link(config, "#{module.id}.md") %>
<% end %>
<%= if module.source_url do %>
<a href="<%= module.source_url %>" title="View Source" class="icon-action" rel="help nofollow">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
<% end %>
</div>
<%= if deprecated = module.deprecated do %>
<div class="deprecated">
This <%= module.type %> is deprecated. <%= h(deprecated) %>.
</div>
<% end %>
<%= if doc = module.doc do %>
<section id="moduledoc">
<%= render_doc(doc) %>
</section>
<% end %>
</div>
<%= if module.docs_groups != [] do %>
<section id="summary" class="details-list">
<h2 class="section-heading">
<a class="hover-link" href="#summary">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
<span class="text">Summary</span>
</h2>
<%= for group <- module.docs_groups, do: summary_template(group.title, group.docs) %>
</section>
<% end %>
<%= for group <- module.docs_groups, key = text_to_id(group.title) do %>
<section id="<%= key %>" class="details-list">
<h2 class="section-heading">
<a class="hover-link" href="#<%= key %>">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
<span class="text"><%= group.title %></span>
</h2>
<%= if doc = group.doc do %>
<div class="group-description" id="group-description-<%= key %>">
<%= render_doc(doc) %>
</div>
<% end %>
<div class="<%= key %>-list">
<%= for node <- group.docs, do: detail_template(node, module) %>
</div>
</section>
<% end %>
<%= footer_template(config, module.source_path) %>