docs/layouts/dev-toc.html

82 строки
2.5 KiB
HTML

<!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>