Add recursive template for toc
Depends-On: I5ceec7f7bdea8b16ba0b300486ec0c4f2202b602 Bug: T299065 Change-Id: I0205596f0f7c0f452e80bd6a1f49e59e8388b4b8
This commit is contained in:
parent
029110810e
commit
e1f1899dae
|
@ -3,14 +3,8 @@
|
|||
<h2 class="sidebar-toc-title" aria-hidden="true">Contents</h2>
|
||||
</div>
|
||||
<ul id="table-of-contents">
|
||||
{{#array-sections}}
|
||||
<li id="toc-{{anchor}}" class="sidebar-toc-list-item sidebar-toc-level-{{toclevel}}">
|
||||
<a class="sidebar-toc-link" href="#{{anchor}}">
|
||||
<div class="sidebar-toc-text">
|
||||
<span class="sidebar-toc-numb">{{number}}</span>{{{line}}}</div>
|
||||
</a>
|
||||
{{#has-subsections}}<ul>{{/has-subsections}}
|
||||
{{#is-last-item}}</li></ul>{{/is-last-item}}
|
||||
{{/array-sections}}
|
||||
{{#array-sections}}
|
||||
{{>TableOfContents__line}}
|
||||
{{/array-sections}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<li id="toc-{{anchor}}" class="sidebar-toc-list-item sidebar-toc-level-{{toclevel}}">
|
||||
<a class="sidebar-toc-link" href="#{{anchor}}">
|
||||
<div class="sidebar-toc-text">
|
||||
<span class="sidebar-toc-numb">{{number}}</span>{{{line}}}</div>
|
||||
</a>
|
||||
<ul>
|
||||
{{#array-sections}}
|
||||
{{>TableOfContents__line}}
|
||||
{{/array-sections}}
|
||||
</ul>
|
||||
</li>
|
Loading…
Reference in New Issue