-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtree.html
More file actions
45 lines (38 loc) · 1.51 KB
/
Copy pathtree.html
File metadata and controls
45 lines (38 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<ul {% if subsection %}style="display: none; opacity: 0; margin-left: 15px;"{% endif %}>
{% for item in tree %}
{% if item.status %}
{% capture statusHTML %} <sup style="color: red">{{item.status}}</sup>{% endcapture %}
{% else %}
{% assign statusHTML = "" %}
{% endif %}
{% if item.section %}
{% capture sectionHTML %}<a class="tlw-control tlw-collapsed">▸</a>{% endcapture %}
{% else %}
{% assign sectionHTML = "" %}
{% endif %}
{% if item.path %}
{% if page.url | remove: ".html" | remove "index" == item.path %}
{% capture tocItemColor %}style="color:red;"{% endcapture %}
{% else %}
{% capture tocItemColor %}{% endcapture %}
{% endif %}
<li {{ tocItemColor }}>{{ sectionHTML }}<a href="{{ item.path }}" title="{{ item.title }}" data-title="{{ item.title }} - {{ item.path }}"><span>{{ item.title }} {{ statusHTML }}</span></a></li>
{% else %}
{% if item.include %}
{% assign tree = site.data[item.include].toc %}
{% assign subsection=false %}
{% include tree.html %}
{% else %}
<li>{{ sectionHTML }}<span class="tlw-title tlw-control-title" data-title="{{ item.title }}">{{ item.title }}{{ statusHTML }}</span></li>
{% endif %}
{% endif %}
{% if item.break %}
<hr>
{% endif %}
{% if item.section %}
{% assign tree = item.section %}
{% assign subsection=true %}
{% include tree.html %}
{% endif %}
{% endfor %}
</ul>