trailsjs/trailpack-markdown-doc

View on GitHub
views/index.ejs

Summary

Maintainability
Test Coverage
<!doctype html>
<html lang="en">
<head>
  <title><% if ( meta && meta.Title ) { %><%= meta.Title %><% } else { %>Opps, no Title<% } %></title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
  <ul>
  <% for(var i=0; i < sitemap.length; i++) { %>
    <li>
      <a href="<%= sitemap[i].path %>"><%= sitemap[i].title %></a>
      <% if ( sitemap[i].children.length > 0 ) { %>
      <ul>
        <% for(var r=0; r < sitemap[i].children.length; r++) { %>
        <li>
          <a href="<%= sitemap[i].children[r].path %>"><%= sitemap[i].children[r].title %></a>
          <% if ( sitemap[i].children[r].children.length > 0 ) { %>
          <ul>
            <% for(var rr=0; rr < sitemap[i].children[r].children.length; rr++) { %>
            <li>
              <a href="<%= sitemap[i].children[r].children[rr].path %>"><%= sitemap[i].children[r].children[rr].title %></a>
            </li>
            <% } %>
          </ul>
          <% } %>
        </li>
        <% } %>
      </ul>
      <% } %>
   </li>
  <% } %>
  </ul>

  <%- content %>

</body>
</html>