Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
mkg-sidebar
Advanced tools
Readme
mkg-sidebar is stylable navigation bar/pane/drawer with nested menu support for mobile and web UI. You can easily set up navigation items or custom html content. then u just need trigger to open.
npm install mkg-sidebar --save
import mSidebar from "mkg-sidebar";
import "mkg-sidebar/dist/mkg-sidebar.css";// if you use webpack with style loader
you can get the latest release of mkg-sidebar from repo
import script and css files
<script src="mkg-sidebar.min.js"></script>
<link rel="stylesheet" type="text/css" href="mkg-sidebar.min.css">
var items = [
{
text:'Main Page',
link:'Link1'
},
{
text:'Another Page',
link:'AnotherLink'
}
];
var menu = mSidebar({baseURL: 'http://site.com/'});
menu.addItem(items);
menu.open();
baseURL:'' // base url to every relative menu links
position:'left' // left, top, bottom, right
closeButton:true //
closeOnBackgroundClick:true //
animationType:'slide' // TODO:push, spread
defaultTitle:'' //default title attr value
defaultFollow:true, // default follow attr value
autoCollapse:false// auto collapse on close
onOpen:null // handler
onClose:null // handler
var menu = mSidebar(options);
menu.addItem({
text:'Test',
link:'/PageLink.html',
callback:function(){console.log(this);}
}); //add menu item
menu.collapse(); //collapse all submenus
menu.unCollapse(); //uncollapse all submenus
menu.open(); //open menu
menu.close(); //close menu
menu.toggle(); //toggle menu
menu.removeItems(); //clears all items
menu.setContentFrom('#divWithContent'); //sets the menu content from targeted element
menu.setHeaderFrom('#divWithContent'); //sets the menu header content from targeted element
menu.setFooterFrom('#divWithContent'); //sets the menu footer content from targeted element
menu.setContent('<div>test</div>'); //sets the menu content from targeted element
menu.setHeader('<div>test</div>'); //sets the menu header content from targeted element
menu.setFooter('<div>test</div>'); //sets the menu footer content from targeted element
menu.refreshItems();
.mSidebar{
& &-item{} //all menu items
& &-collapse{ //whole collapsable item container
//a collapsable item has 3 parts:
& &-header{} //header area is the part of without button and sub items
& &-items{} //items area is the sub-items container of collapsable item
& &-button{} // button area of the collapsable item
}
& &--d0{} //you can compine any class with mSidebar--d{level} class
& &--d1{}
& &--d2{}
}
.mSidebar .mSidebar-item{}
.mSidebar .mSidebar-collapse {}
.mSidebar .mSidebar-collapse-header {}
.mSidebar .mSidebar-collapse-items {}
.mSidebar .mSidebar-collapse-button {}
.mSidebar-collapse-button.mSidebar--d0 {} //you can combine any class with mSidebar--d{level} class
.mSidebar-collapse-button.mSidebar--d1 {}
.mSidebar-collapse-button.mSidebar--d2 {}
ensure that you have all dependency packes with 'npm install' and install gulp to gloval with npm install gulp -g
package using gulp for building. following tasks are avaliable:
gulp default
: watches src files and serves index.html for developinggulp minify
: creates minified version of package. don't forget to use it after development ends.FAQs
mkg-sidebar is stylable navigation bar/pane/drawer with nested menu support for mobile and web UI. You can easily set up navigation items or custom html content. then u just need trigger to open.
We found that mkg-sidebar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).