mirror of
https://github.com/tonytins/tomas.git
synced 2025-06-25 01:54:43 -04:00
deploy: aaaad6faf9
This commit is contained in:
parent
01ef604533
commit
49dec67afb
7 changed files with 19 additions and 7 deletions
|
@ -71,10 +71,12 @@
|
|||
<!-- Hide / unhide sidebar before it is displayed -->
|
||||
<script>
|
||||
var html = document.querySelector('html');
|
||||
var sidebar = 'hidden';
|
||||
var sidebar = null;
|
||||
if (document.body.clientWidth >= 1080) {
|
||||
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||||
sidebar = sidebar || 'visible';
|
||||
} else {
|
||||
sidebar = 'hidden';
|
||||
}
|
||||
html.classList.remove('sidebar-visible');
|
||||
html.classList.add("sidebar-" + sidebar);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue