add a crude responsive collapsible sidebar

This commit is contained in:
El RIDO
2020-06-27 13:36:53 +02:00
parent e35a26c916
commit 8537f396b3
4 changed files with 65 additions and 7 deletions

View File

@@ -12,9 +12,9 @@
*/
// global Base64, DOMPurify, FileReader, RawDeflate, history, navigator, prettyPrint, prettyPrintOne, showdown, kjua
'use strict';
jQuery.fn.draghover = function() {
'use strict';
return this.each(function() {
let collection = $(),
self = $(this);
@@ -37,14 +37,11 @@ jQuery.fn.draghover = function() {
// main application start, called when DOM is fully loaded
jQuery(document).ready(function() {
'use strict';
// run main controller
$.PrivateBin.Controller.init();
});
jQuery.PrivateBin = (function($, RawDeflate) {
'use strict';
/**
* zlib library interface
*
@@ -5364,6 +5361,13 @@ jQuery.PrivateBin = (function($, RawDeflate) {
});
});
// attach memory sidebar toggle
$("#menu-toggle").on('click', function(e) {
e.preventDefault();
$("#menu-toggle .glyphicon").toggleClass("glyphicon glyphicon-menu-down glyphicon glyphicon-menu-up")
$("main").toggleClass("toggled");
});
// initialize other modules/"classes"
Alert.init();
Model.init();