M template/head.html => template/head.html +3 -0
@@ 44,6 44,9 @@
h3:hover a {
visibility: visible;
}
+ details summary {
+ cursor: pointer;
+ }
</style>
</head>
<body>
M template/unit.html => template/unit.html +15 -1
@@ 3,7 3,21 @@
<main>
<h2>{{ .Title }}</h2>
- <a href="{{ .IndexHref }}">Back to index</a>
+ <p>
+ <a href="{{ .IndexHref }}">Back to index</a>
+ </p>
+
+ <details open>
+ <summary>Table of contents</summary>
+
+ <ul>
+ {{ range .Decls }}
+ <li>
+ <a href="#{{ .Kind }}-{{ .Name }}">{{ .Title }}</a>
+ </li>
+ {{ end }}
+ <ul>
+ </details>
{{ range .Decls }}
<section class="{{ .Kind }}">