forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoc.html
More file actions
20 lines (17 loc) · 1.03 KB
/
Copy pathtoc.html
File metadata and controls
20 lines (17 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<nav class="docs-nav visible-md visible-lg affix-top" id="docs-navbar">
<ul class="nav" id="main-nav">
<li class="panel"><a class="docs-home" href="/docs/home.html">Documentation</a></li>
{% for section in site.data.doctoc %}
<li class="panel collapsed">
<a class="area collapsed" aria-expanded="false" href="#toc-{{ section.id }}" data-toggle="collapse" data-parent="#main-nav">{{ section.title }}</a>
<ul class="collapse" id="toc-{{ section.id }}" aria-expanded="false">
{% assign url_prefix = "/docs/" | append: section.directory | append: "/" %}{% for item in section.items %}{% for doc in site.docs %}{% assign item_url = item | prepend: url_prefix | append:".html" %}{% if doc.url == item_url %}
<li class="toc-item">
<a href={{item_url}}{% if page.url == item_url %} class="active"{% endif %}>{{ doc.title }}</a>
</li>
{% endif %}{% endfor %}{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</nav>