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 %}
|
||||
{% assign topicFound="false" %}
|
||||
{% assign activeCSS = "" %}
|
||||
{% assign tree = site.data.toc[section.node] %}
|
||||
<!-- path comparison: item.path: {{ item.path }} == page.path: {{ page.url }} -->
|
||||
{% capture thisSection %}{% include tree.html %}{% endcapture %}
|
||||
{% if section.path == page.url or thisSection contains "active currentPage" %}
|
||||
<span id="currentSection" style="display:none;">{{ section.node }}</span>
|
||||
{{ thisSection }}
|
||||
{% break %}
|
||||
{% capture leftnav %}{{ thisSection }}{% endcapture %}
|
||||
{% capture activeCSS %} class="active"{% endcapture %}
|
||||
{% endif %}
|
||||
<li id="{{ section.node }}"{{ activeCSS }}><a href="{{ section.path }}">{{ section.title }}</a></li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -193,8 +193,8 @@ ng\:form {
|
|||
<section class="title_section darkblue"> </section>
|
||||
<div class="col-md-12" style="background-color: #254356">
|
||||
<!-- tabs -->
|
||||
<ul class="tabs">{% for section in site.data.toc.horizontalnav %}
|
||||
<li id="{{ section.node }}"><a href="{{ section.path }}">{{ section.title }}</a></li>{% endfor %}
|
||||
<ul class="tabs">
|
||||
{% include treebuilder.html %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="">
|
||||
|
@ -205,7 +205,7 @@ ng\:form {
|
|||
{% if page.tree == false %}
|
||||
<li class="leaf"><a href="/">Back to the index</a></li>
|
||||
{% else %}
|
||||
{% include treebuilder.html %}
|
||||
{{ leftnav }}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
---
|
||||
layout: null
|
||||
---
|
||||
var metadata;
|
||||
var autoCompleteShowing = false;
|
||||
var displayingAutcompleteResults = new Array();
|
||||
|
|
Loading…
Reference in New Issue