diff options
author | 2018-06-13 16:43:42 +0100 | |
---|---|---|
committer | 2018-06-13 16:43:42 +0100 | |
commit | be2bbe35cf49763ad0258c005f3cbdddd7a21d75 (patch) | |
tree | 962d5e52f4bb57c397c068ae6a11b57952cfc459 /js/src/wiki.js | |
parent | [DB] Attempt reconnection if current connection was lost (diff) |
Compile as much JS with Gulp as possible
This will concatenate ALL of our JS, and minify it - thus leaving us with a single file to be loaded.
There's a few libraries we can't do this with, unfortunately - these are now added in fouc.js:
* Ace Editor
* Flatpickr
* Font-Awesome
Diffstat (limited to 'js/src/wiki.js')
-rw-r--r-- | js/src/wiki.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/wiki.js b/js/src/wiki.js new file mode 100644 index 00000000..f4bc18e8 --- /dev/null +++ b/js/src/wiki.js @@ -0,0 +1,17 @@ +"use strict"; + +/* exported wiki_sidebar */ + +function wiki_sidebar(){ + const visible_class = "uk-visible@s"; + const sidebar = document.getElementById("wiki-sidebar"); + const display_button = document.getElementById("wiki-sidebar-button"); + + display_button.onclick = function() { + if (sidebar.classList.contains(visible_class)) { + sidebar.classList.remove(visible_class); + } else { + sidebar.classList.add(visible_class); + } + }; +} |