github.com/xiaq/elvish@v0.12.0/website/pandoc-data/templates/toc-and-body.html (about)

     1  <div class="toc">
     2    <p>Table of Content: <a id="toc-toggle" href="">[Hide]</a></p>
     3    <div id="toc-list">
     4      $toc$
     5    </div>
     6    <script>
     7    (function() {
     8      var shown = true,
     9          tocToggle = document.getElementById('toc-toggle'),
    10          tocList = document.getElementById('toc-list');
    11      tocToggle.onclick = function(ev) {
    12        shown = !shown;
    13        if (shown) {
    14          tocToggle.innerText = "[Hide]";
    15          tocList.className = "";
    16        } else {
    17          tocToggle.innerText = "[Show]";
    18          tocList.className = "no-display";
    19        }
    20        ev.preventDefault();
    21      };
    22    })();
    23    </script>
    24  </div>
    25  $body$