medialize/ally.js

View on GitHub
build/metalsmith/partials/collection-navigation.html

Summary

Maintainability
Test Coverage
<nav id="collection-navigation">
{{collection-to-siblings}}
{{#each siblings}}
  {{#if @first}}<h1>More in <em>{{../currentCollectionName}}</em></h1><ul>{{/if}}
  {{#if this.layout}}
  <li class="{{#is this.title ../title}}active{{/is}}">
    <a
      class="{{#contains @key ../collection}}active{{/contains}}"
      href="{{../websiteRoot}}{{this.path.dir}}{{#if this.path.dir}}/{{/if}}{{this.path.base}}"
    >{{this.title}}</a>
  </li>
  {{/if}}
  {{#if @last}}</ul>{{/if}}
{{/each}}
</nav>