Close tutorial ToC after clicking a link

This commit is contained in:
Richard Feldman 2022-12-08 22:00:57 -05:00
parent 74b3d14277
commit 1fc8f1df37
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 6 additions and 0 deletions

5
www/public/site.js Normal file
View file

@ -0,0 +1,5 @@
document.querySelectorAll("#tutorial-toc li a").forEach((elem) => {
elem.addEventListener("click", (event) => {
document.querySelector("#tutorial-toc-toggle").checked = false;
})
});

View file

@ -1859,5 +1859,6 @@ For example, <code>[Foo Str][Bar Bool][Baz (List Str)]</code> is equivalent to <
</table>
</main>
<footer>Made by people who like to make nice things. © 2022</footer>
<script src="/site.js"></script>
</body>
</html>