Test waka
This commit is contained in:
23
_includes/nav.html
Normal file
23
_includes/nav.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<h1><a href="index.html">{{ site.name }}</a></h1>
|
||||
<hr class="star-light">
|
||||
|
||||
{% for entry in site.data.toc.entries %}
|
||||
{% for node in entry.pages %}
|
||||
{% if page.url contains node.url %}
|
||||
{% assign chapter_title = entry.title %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for entry in site.data.toc.entries %}
|
||||
<h2 {% if chapter_title == entry.title %} class="active" {% endif %}>
|
||||
{{ entry.title }}
|
||||
</h2>
|
||||
<ul class="{{ entry.class }}">
|
||||
{% for node in entry.pages %}
|
||||
<li {% if page.url contains node.url %} class="active" {% endif %}>
|
||||
<a href="{{ node.url }}" target="{{ node.target }}">{{ node.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user