toc-date.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <div class="book-summary">
  2. <nav role="navigation">
  3. <div id="book-search-input" role="search">
  4. <input type="text" placeholder="Type to search" />
  5. </div>
  6. <div id="book-search-input-link" role="search">
  7. <a href="{{site.baseurl}}/assets/search.html">Click to Search</a>
  8. </div>
  9. <ul class="summary">
  10. {% if page.url == "/index.html" or page.url == "/" %}
  11. <li class="chapter active" data-level="1.1" data-path="{{site.baseurl}}">
  12. {% else %}
  13. <li class="chapter" data-level="1.1" data-path="{{site.baseurl}}">
  14. {% endif %}
  15. <a href="{{site.baseurl}}/">
  16. {{ site.title | escape }}
  17. </a>
  18. </li>
  19. <li class="divider"></li>
  20. {% for collection in site.collections %}
  21. <!-- <p>{{ collection.label }}</p> -->
  22. {% if collection.output %}
  23. {% if collection.label == "posts" %}
  24. {% assign reversed_posts = site[collection.label] | reverse %}
  25. {% else %}
  26. {% assign reversed_posts = site[collection.label] %}
  27. {% endif %}
  28. {% for post in reversed_posts %}
  29. {% if page.url == post.url %}
  30. <li class="chapter active" data-level="1.2" data-path="{{site.baseurl}}{{post.url}}">
  31. {% else %}
  32. <li class="chapter" data-level="1.1" data-path="{{site.baseurl}}{{post.url}}">
  33. {% endif %}
  34. <a href="{{site.baseurl}}{{post.url}}">
  35. {{ post.title | escape }}
  36. </a>
  37. {% if site.toc.enabled %}
  38. {% if page.url == post.url %}
  39. {% include toc.html html=content h_min=site.toc.h_min h_max=site.toc.h_max %}
  40. {% endif %}
  41. {% endif %}
  42. </li>
  43. {% endfor %}
  44. {% if reversed_posts.size > 0 %}
  45. <li class="divider"></li>
  46. {% endif %}
  47. {% endif %}
  48. {% endfor %}
  49. </ul>
  50. </nav>
  51. </div>