diff --git a/book.toml b/book.toml index 861d5f2..eaeb4f8 100755 --- a/book.toml +++ b/book.toml @@ -18,4 +18,5 @@ additional-js = [ "theme/js/highlight.min.js", "theme/js/mathjax.js", "theme/js/tocrender.js", + "theme/js/page.js", ] diff --git a/theme/index.hbs b/theme/index.hbs index d61aa55..50c96ab 100755 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -84,7 +84,7 @@ {{/if}} - + {{/unless}} @@ -201,6 +201,8 @@ + + \ No newline at end of file diff --git a/theme/js/page.js b/theme/js/page.js new file mode 100644 index 0000000..7597071 --- /dev/null +++ b/theme/js/page.js @@ -0,0 +1,3 @@ +if (window.innerWidth > 640) { + document.getElementById("toc-drawer").setAttribute('open', true) +}