website/_includes/tree.html

68 lines
2.7 KiB
HTML

<!--
Here's your API ref for this accordion element:
Each line is class "item". Use the data-title attribute for the text label.
Use a.item for direct links; use div.item to wrap containers.
A div.container inside a div.item is a nested accordion. The clickable text which toggles the
container open/closed is the data-title attribute of the parent div.item.
<a class="item" data-title="Overview" href="path-to-page"></a>
<div class="item" data-title="Quickstarts">
<div class="container">
<a class="item" data-title="Setting Up Your Local Environment" href="path-to-page"></a>
<a class="item" data-title="5-minute Quickstart" href="path-to-page"></a>
<a class="item" data-title="Kubernetes 101" href="path-to-page"></a>
<a class="item" data-title="Kubernetes 201" href="path-to-page"></a>
</div>
</div>
<div class="item" data-title="Running Kubernetes">
<div class="container">
<a class="item" data-title="Running Kubernetes on Your Local Machine" href="path-to-page"></a>
<a class="item" data-title="Running Kubernetes on Google Container Engine" href="path-to-page"></a>
<div class="item" data-title="Third-level Schtuff">
<div class="container">
<a class="item" data-title="Third Level One" href="path-to-page"></a>
<a class="item" data-title="Third Level Two" href="path-to-page"></a>
<a class="item" data-title="Third Level Three" href="path-to-page"></a>
<a class="item" data-title="Third Level Four" href="path-to-page"></a>
</div>
</div>
<a class="item" data-title="Running Kubernetes on Turn-Key Cloud Solutions" href="path-to-page"></a>
<a class="item" data-title="Running Kubernetes on Custom Solutions" href="path-to-page"></a>
</div>
</div>
-->
{% for item in tree %}
{% if item.section %}
<div class="item" data-title="{{ item.title }}">
<div class="container">
{% assign tree = item.section %}
{% assign subsection=true %}
{% include tree.html %}
</div>
<div>
{% else %}
{% if item.status %}
{% capture statusHTML %} <sup style="color: red">{{item.status}}</sup>{% endcapture %}
{% else %}
{% assign statusHTML = "" %}
{% endif %}
{% if item.path %}
{% if page.url | remove: ".html" | remove "index" == item.path %}
{% capture tocItemColor %}style="color:red;"{% endcapture %}
{% else %}
{% assign tocItemColor = "" %}
{% endif %}
{% endif %}
<a class="item" {{ tocItemColor }} href="{{ item.path }}" title="{{ item.title }}" data-title="{{ item.title }} - {{ item.path }}">{{ item.title }}{{ statusHTML }}</a>
{% endif %}
{% endfor %}