xref: /linux/Documentation/sphinx/templates/kernel-toc.html (revision 4b660dbd9ee2059850fd30e0df420ca7a38a1856)
1<!-- SPDX-License-Identifier: GPL-2.0 -->
2{# Create a local TOC the kernel way #}
3<p>
4<h3 class="kernel-toc-contents">Contents</h3>
5<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
6<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
7
8<div class="kerneltoc" id="kerneltoc">
9{{ toctree(maxdepth=3) }}
10</div>
11{# hacky script to try to position the left column #}
12<script type="text/javascript"> <!--
13  var sbar = document.getElementsByClassName("sphinxsidebar")[0];
14  let currents = document.getElementsByClassName("current")
15  if (currents.length) {
16    sbar.scrollTop = currents[currents.length - 1].offsetTop;
17  }
18  --> </script>
19