toc logic
parent
7b55b0b243
commit
a53cd45d08
|
@ -4,7 +4,7 @@ kramdown:
|
||||||
input: GFM
|
input: GFM
|
||||||
html_to_native: true
|
html_to_native: true
|
||||||
hard_wrap: false
|
hard_wrap: false
|
||||||
use_coderay: true
|
enable_coderay: true
|
||||||
baseurl: /
|
baseurl: /
|
||||||
|
|
||||||
safe: false
|
safe: false
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,53 @@
|
||||||
|
<!--
|
||||||
|
|
||||||
<ul {% if subsection %}style="display: none; opacity: 0; margin-left: 15px;"{% endif %}>
|
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 %}
|
{% 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 %}
|
{% if item.status %}
|
||||||
{% capture statusHTML %} <sup style="color: red">{{item.status}}</sup>{% endcapture %}
|
{% capture statusHTML %} <sup style="color: red">{{item.status}}</sup>{% endcapture %}
|
||||||
|
@ -8,38 +55,14 @@
|
||||||
{% assign statusHTML = "" %}
|
{% assign statusHTML = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if item.section %}
|
|
||||||
{% capture sectionHTML %}<a class="tlw-control tlw-collapsed">▸</a>{% endcapture %}
|
|
||||||
{% else %}
|
|
||||||
{% assign sectionHTML = "" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if item.path %}
|
{% if item.path %}
|
||||||
{% if page.url | remove: ".html" | remove "index" == item.path %}
|
{% if page.url | remove: ".html" | remove "index" == item.path %}
|
||||||
{% capture tocItemColor %}style="color:red;"{% endcapture %}
|
{% capture tocItemColor %}style="color:red;"{% endcapture %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% capture tocItemColor %}{% endcapture %}
|
{% assign tocItemColor = "" %}
|
||||||
{% 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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if item.break %}
|
<a class="item" {{ tocItemColor }} href="{{ item.path }}" title="{{ item.title }}" data-title="{{ item.title }} - {{ item.path }}">{{ item.title }}{{ statusHTML }}</a>
|
||||||
<hr>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if item.section %}
|
|
||||||
{% assign tree = item.section %}
|
|
||||||
{% assign subsection=true %}
|
|
||||||
{% include tree.html %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
|
|
|
@ -17,49 +17,10 @@ layout: headerfooter
|
||||||
|
|
||||||
<section id="encyclopedia">
|
<section id="encyclopedia">
|
||||||
<div id="docsToc">
|
<div id="docsToc">
|
||||||
|
<div class="pi-accordion">
|
||||||
{% comment %} assign tree = site.data[page.toc].toc
|
{% comment %} assign tree = site.data[page.toc].toc
|
||||||
{% assign tree = site.data[page.versionfilesafe][page.section].toc %}
|
{% assign tree = site.data[page.versionfilesafe][page.section].toc %}
|
||||||
{% include tree.html %}{% endcomment %}
|
{% include tree.html %}{% endcomment %}
|
||||||
<!--
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<div class="pi-accordion">
|
|
||||||
<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> <!-- /quickstarts -->
|
|
||||||
|
|
||||||
<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> <!-- /running kubernetes -->
|
|
||||||
</div> <!-- /pi-accordion -->
|
</div> <!-- /pi-accordion -->
|
||||||
</div> <!-- /docsToc -->
|
</div> <!-- /docsToc -->
|
||||||
<div id="docsContent">
|
<div id="docsContent">
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -74,19 +74,16 @@
|
||||||
|
|
||||||
<section id="encyclopedia">
|
<section id="encyclopedia">
|
||||||
<div id="docsToc">
|
<div id="docsToc">
|
||||||
|
<div class="pi-accordion">
|
||||||
|
|
||||||
|
</div> <!-- /pi-accordion -->
|
||||||
|
</div> <!-- /docsToc -->
|
||||||
<ul >
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="docsContent">
|
<div id="docsContent">
|
||||||
Yep.
|
Yep.
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<main class="light-text">
|
<main class="light-text">
|
||||||
<nav>
|
<nav>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue