mirror of https://github.com/docker/docs.git
Move tab highlighting to Liquid instead of JS
This commit is contained in:
parent
544ecfcf27
commit
2be1e89e27
|
@ -1,11 +1,12 @@
|
||||||
{% for section in site.data.toc.horizontalnav %}
|
{% for section in site.data.toc.horizontalnav %}
|
||||||
{% assign topicFound="false" %}
|
{% assign topicFound="false" %}
|
||||||
|
{% assign activeCSS = "" %}
|
||||||
{% assign tree = site.data.toc[section.node] %}
|
{% assign tree = site.data.toc[section.node] %}
|
||||||
<!-- path comparison: item.path: {{ item.path }} == page.path: {{ page.url }} -->
|
<!-- path comparison: item.path: {{ item.path }} == page.path: {{ page.url }} -->
|
||||||
{% capture thisSection %}{% include tree.html %}{% endcapture %}
|
{% capture thisSection %}{% include tree.html %}{% endcapture %}
|
||||||
{% if section.path == page.url or thisSection contains "active currentPage" %}
|
{% if section.path == page.url or thisSection contains "active currentPage" %}
|
||||||
<span id="currentSection" style="display:none;">{{ section.node }}</span>
|
{% capture leftnav %}{{ thisSection }}{% endcapture %}
|
||||||
{{ thisSection }}
|
{% capture activeCSS %} class="active"{% endcapture %}
|
||||||
{% break %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<li id="{{ section.node }}"{{ activeCSS }}><a href="{{ section.path }}">{{ section.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -193,8 +193,8 @@ ng\:form {
|
||||||
<section class="title_section darkblue"> </section>
|
<section class="title_section darkblue"> </section>
|
||||||
<div class="col-md-12" style="background-color: #254356">
|
<div class="col-md-12" style="background-color: #254356">
|
||||||
<!-- tabs -->
|
<!-- tabs -->
|
||||||
<ul class="tabs">{% for section in site.data.toc.horizontalnav %}
|
<ul class="tabs">
|
||||||
<li id="{{ section.node }}"><a href="{{ section.path }}">{{ section.title }}</a></li>{% endfor %}
|
{% include treebuilder.html %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
|
@ -205,7 +205,7 @@ ng\:form {
|
||||||
{% if page.tree == false %}
|
{% if page.tree == false %}
|
||||||
<li class="leaf"><a href="/">Back to the index</a></li>
|
<li class="leaf"><a href="/">Back to the index</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include treebuilder.html %}
|
{{ leftnav }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
---
|
|
||||||
layout: null
|
|
||||||
---
|
|
||||||
var metadata;
|
var metadata;
|
||||||
var autoCompleteShowing = false;
|
var autoCompleteShowing = false;
|
||||||
var displayingAutcompleteResults = new Array();
|
var displayingAutcompleteResults = new Array();
|
||||||
|
|
Loading…
Reference in New Issue