
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
advanced-menus
Advanced tools
NOTE: Package is in development.
There already are a lot of menu packages available across the web. So why build another one? Well, A lot of packages focus on a specific menu layout, are at some point incomplete or not flexibel enough. We would like to change that and create a single menu package that gives front-end developers a set of predefined, responsive menu layouts to start their project with.
DONE
TODO
EXAMPLE: menudemo.rehabproject.nl
ps. Like to join the fun? contact us at info@code.rehab;
npm install advanced-menus --save-dev
/*
DEFAULT CONFIG
{
options:{
disable_page_scroll: false,
autoclose: true,
parent_clickable: true
},
events: {
swipeLeft: function(){},
swipeRight: function(){},
swipeUp: function(){},
swipeDown: function(){}
},
selectors:{
menu_id: 'main-menu',
menuitem: 'li',
submenu: 'li > ul',
toggle_button: false,
open_button: false,
close_button: false,
}
}
*/
const Menu = require('advanced-menus');
//menu config;
var config = {
selectors:{
toggle_button: ".menu-toggle-button",
},
options:{
disable_scroll: true,
parent_clickable:true,
},
events:{
swipeLeft: function(menu, e){
menu.close();
},
swipeRight: function(menu, e){
menu.open();
}
}
}
//config not required
var mainmenu = new Menu(config);
/*
Available themes:
- aside-left
- aside-right
- plain-horizontal
- dropdown
*/
$registered-menus: (
main-menu: (
selector:"#main-menu",
themes:(
aside-left: (
min:0px,
max:750px,
autohide: 750px
),
aside-right: (
min:750px,
max:1024px,
),
plain-horizontal: (min:1024px)
)
)
//, another menu
//, another menu
);
@import "node_modules/advanced-menus/scss/menu";
@include generate-menus();
/*
=============================================
USEFUL MIXINS
=============================================
*/
// experimental
// menu-breakpoint :
// Use this mixin to add styles at the specified menu theme breakpoint
@include menu-breakpoint($menu, $theme){
//styles
}
/*
=============================================
Custom themes
=============================================
*/
// experimental
// ./themes/_theme-name.scss
@include register_menu_theme($some-theme-name)
// your styles here.
}
// experimental
//hides menu at certain resolution;
@include menu-autohide($theme-name){
// initial styles to hide menu.
}
<nav id="main-menu">
<ul class='menu'>
<li class="menu-item">
<a href="#item1">Item 1</a>
<ul class='sub-menu'>
<li class="menu-item"><a href="#item1">Item 1</a></li>
<li class="menu-item">
<a href="#item2">Item 2</a>
<ul class='sub-menu'>
<li class="menu-item"><a href="#item1">Item 1</a></li>
<li class="menu-item"><a href="#item2">Item 2</a></li>
<li class="menu-item"><a href="#item3">Item 3</a></li>
<li class="menu-item"><a href="#item4">Item 4</a></li>
<li class="menu-item"><a href="#item5">Item 5</a></li>
</ul>
</li>
<li class="menu-item"><a href="#item1">Item 3</a></li>
<li class="menu-item"><a href="#item2">Item 4</a></li>
<li class="menu-item"><a href="#item3">Item 5</a></li>
</ul>
</li>
<li class="menu-item">
<a href="#item2">Item 2</a>
<ul class='sub-menu'>
<li class="menu-item"><a href="#item1">Item 1</a></li>
<li class="menu-item"><a href="#item2">Item 2</a></li>
</ul>
</li>
<li class="menu-item"><a href="#item3">Item 3</a></li>
<li class="menu-item"><a href="#item4">Item 4</a></li>
</ul>
</nav>
<button class="menu-toggle-button">=</button>
FAQs
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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.