diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-20 10:52:14 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-09-30 15:58:29 +0200 |
commit | 27f922168ad828a990d2e73facc84935158df1a6 (patch) | |
tree | 5800c06703668829354795223b447313dd912002 /app/javascript/flavours/glitch/packs/public.js | |
parent | 6c8fefb0c9a0b968c7ab524b94a64056bf604823 (diff) |
[Glitch] Fix page body not being scrollable in admin layout
Port SCSS changes from b9a8b38844278f26b9d1d1d53256e0781ba3575a to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/packs/public.js')
-rw-r--r-- | app/javascript/flavours/glitch/packs/public.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 019de2167..5a15830df 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -114,6 +114,16 @@ function main() { this.parentElement.parentElement.nextElementSibling.classList.toggle('hidden'); }); }); + + delegate(document, '.sidebar__toggle__icon', 'click', () => { + const target = document.querySelector('.sidebar ul'); + + if (target.style.display === 'block') { + target.style.display = 'none'; + } else { + target.style.display = 'block'; + } + }); } loadPolyfills().then(main).catch(error => { |