diff options
| author | 2018-06-02 14:45:11 +0100 | |
|---|---|---|
| committer | 2018-06-02 14:45:11 +0100 | |
| commit | 7cfd6a72491a300f4f599d2b531e9f1dc215c7a0 (patch) | |
| tree | 876d6e9236c38fd4407a6a86a534feb55a33be65 /static | |
| parent | [Wiki] Fix UX bug relating to current article headers (diff) | |
[Wiki] Attempt to fix page views on mobile
Diffstat (limited to 'static')
| -rw-r--r-- | static/js/wiki.js | 15 | ||||
| -rw-r--r-- | static/style.css | 20 | 
2 files changed, 35 insertions, 0 deletions
| diff --git a/static/js/wiki.js b/static/js/wiki.js new file mode 100644 index 00000000..6ef4efa9 --- /dev/null +++ b/static/js/wiki.js @@ -0,0 +1,15 @@ +"use strict"; + +(function(){  // Use a closure to avoid polluting global scope +    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) +        } +    } +}()); diff --git a/static/style.css b/static/style.css index b404ced3..b76b2e57 100644 --- a/static/style.css +++ b/static/style.css @@ -226,4 +226,24 @@ td.right-border, th.right-border {  textarea.fira-code {      line-height: 1.3 !important; +} + +#wiki-sidebar { +    transition: width ease 1s; +} + +#wiki-sidebar-button { +    color: white; +    height: 3rem; +    width: 3rem; +    min-height: 3rem; +    min-width: 3rem; +    align-items: center; +    justify-content: center; +    /*box-shadow: unset; */ +    border: 1px solid rgba(0, 0, 0, 0.11); +} + +.code{ +    overflow-x: scroll;  }
\ No newline at end of file | 
