onlyurei/knockout-spa

View on GitHub
app/files/files.html

Summary

Maintainability
Test Coverage
<section class="row">
  <!-- ko template: 'app/shared/error' --><!-- /ko -->
  <page-source-display params="js: 'app/files/files.js', html: 'app/files/files.html', css: 'app/files/files.css'">
  </page-source-display>
  <ul data-bind="foreach: files" class="col m3">
    <li>
      <a data-bind="attr: { href: '?file=' + $data },
                    text: $data, css: { bold: $parent.file === $data }"
         class="hoverable"></a>
    </li>
  </ul>
  <div class="col m9">
    <h6 class="file-path">
      <span data-bind="text: file"></span>
      <span class="right">
      <!-- ko if: prev -->
      <a data-bind="string: 'nav.prev', attr: { href: '?file=' + prev }"></a>
      <!-- /ko -->
      <!-- ko if: next -->
      <a data-bind="string: 'nav.next', attr: { href: '?file=' + next }"></a>
      <!-- /ko -->
      </span>
    </h6>
    <file-display params="url: '/' + file"></file-display>
  </div>
</section>