forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-toc.html
82 lines (74 loc) · 2.53 KB
/
dev-toc.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!doctype html>
<html lang="{{currentLanguage}}">
<head>
<meta charset="utf-8" />
<title>Docs TOC</title>
<link rel="stylesheet" href="/dist/index.css">
<link rel="alternate icon" type="image/png" href="/assets/images/site/favicon.png">
<link rel="icon" type="image/svg+xml" href="/assets/images/site/favicon.svg">
</head>
<body class="dev-toc p-3 m-3">
<main class="width-full">
<h3>Versions</h3>
<ul class="versions-list">
{% for version in allVersions %}
<li><a href="/{{ version[0] }}/dev-toc">{{ version[1].versionTitle }}</a>
{% endfor %}
</ul>
{% if allVersions[currentVersion] %}
<h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versionTitle }}</h2>
<button class="btn mb-3 js-expand" type="button">Expand All</button>
<div/>
{% for product in siteTree[currentLanguage][currentVersion].products %}
<details class="mb-1"><summary>{{product[1].title}}</summary>
<ul class="products-list">
<li title="{{product[1].title}}">
<a href="/{{currentLanguage}}{{product[1].href}}">{{ product[1].title }}</a>
{% for category in product[1].categories %}
{% capture fullPathToCategory %}/{{currentLanguage}}{{category[1].href}}{% endcapture %}
<ul>
<li>
<a href="{{fullPathToCategory}}">{{ category[1].title }}</a>
<!-- some categories have maptopics with child articles -->
{% if category[1].maptopics %}
<ul">
{% for maptopic in category[1].maptopics %}
{% unless maptopic[1].hidden %}
{% capture fullPathToMaptopic %}/{{currentLanguage}}{{maptopic[1].href}}{% endcapture %}
<li>
<a href="{{fullPathToMaptopic}}">{{ maptopic[1].title }}</a>
<ul>
{% for article in maptopic[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
<li>
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endunless %}
{% endfor %}
</ul>
<!-- some categories have no maptopics, only articles -->
{% else %}
<ul>
{% for article in category[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
<li>
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</li>
</ul>
</details>
{% endfor %}
{% endif %}
{% include scripts %}
</main>
</body>
</html>