1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Better sidemenu style

This commit is contained in:
Nick O'Leary 2015-01-15 21:41:40 +00:00
parent c97ab18e62
commit dd5e851339
3 changed files with 59 additions and 43 deletions

View File

@ -301,33 +301,32 @@ var RED = (function() {
$(function() {
RED.menu.init({id:"btn-sidemenu",
options: [
{id:"btn-sidebar",icon:"fa fa-columns",label:"Sidebar",toggle:true,onselect:RED.sidebar.toggleSidebar, selected: true},
{id:"btn-sidebar",_icon:"fa fa-columns",label:"Sidebar",toggle:true,onselect:RED.sidebar.toggleSidebar, selected: true},
{id:"btn-node-status",_icon:"fa fa-info",label:"Node Status",toggle:true,onselect:toggleStatus},
null,
{id:"btn-node-status",icon:"fa fa-info",label:"Node Status",toggle:true,onselect:toggleStatus},
null,
{id:"btn-import-menu",icon:"fa fa-sign-in",label:"Import...",options:[
{id:"btn-import-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",onselect:RED.view.showImportNodesDialog},
{id:"btn-import-library",icon:"fa fa-book",label:"Library",options:[]}
{id:"btn-import-menu",_icon:"fa fa-sign-in",label:"Import...",options:[
{id:"btn-import-clipboard",_icon:"fa fa-clipboard",label:"Clipboard...",onselect:RED.view.showImportNodesDialog},
{id:"btn-import-library",_icon:"fa fa-book",label:"Library",options:[]}
]},
{id:"btn-export-menu",icon:"fa fa-sign-out",label:"Export...",disabled:true,options:[
{id:"btn-export-clipboard",icon:"fa fa-clipboard",label:"Clipboard...",disabled:true,onselect:RED.view.showExportNodesDialog},
{id:"btn-export-library",icon:"fa fa-book",label:"Library...",disabled:true,onselect:RED.view.showExportNodesLibraryDialog}
{id:"btn-export-menu",_icon:"fa fa-sign-out",label:"Export...",disabled:true,options:[
{id:"btn-export-clipboard",_icon:"fa fa-clipboard",label:"Clipboard...",disabled:true,onselect:RED.view.showExportNodesDialog},
{id:"btn-export-library",_icon:"fa fa-book",label:"Library...",disabled:true,onselect:RED.view.showExportNodesLibraryDialog}
]},
null,
{id:"btn-config-nodes",icon:"fa fa-th-list",label:"Configuration nodes...",onselect:RED.sidebar.config.show},
{id:"btn-config-nodes",_icon:"fa fa-th-list",label:"Configuration nodes...",onselect:RED.sidebar.config.show},
null,
{id:"btn-create-subflow",icon:"fa fa-share-alt",label:"Create subflow",onselect:RED.view.createSubflow},
{id:"btn-convert-subflow",icon:"fa fa-share-alt",label:"Convert to subflow",disabled:true,onselect:RED.view.convertToSubflow},
{id:"btn-create-subflow",_icon:"fa fa-share-alt",label:"Create subflow",onselect:RED.view.createSubflow},
{id:"btn-convert-subflow",_icon:"fa fa-share-alt",label:"Convert to subflow",disabled:true,onselect:RED.view.convertToSubflow},
null,
{id:"btn-workspace-menu",icon:"fa fa-th-large",label:"Workspaces",options:[
{id:"btn-workspace-add",icon:"fa fa-plus",label:"Add"},
{id:"btn-workspace-edit",icon:"fa fa-pencil",label:"Rename"},
{id:"btn-workspace-delete",icon:"fa fa-minus",label:"Delete"},
{id:"btn-workspace-menu",_icon:"fa fa-th-large",label:"Workspaces",options:[
{id:"btn-workspace-add",_icon:"fa fa-plus",label:"Add"},
{id:"btn-workspace-edit",_icon:"fa fa-pencil",label:"Rename"},
{id:"btn-workspace-delete",_icon:"fa fa-minus",label:"Delete"},
null
]},
null,
{id:"btn-keyboard-shortcuts",icon:"fa fa-keyboard-o",label:"Keyboard Shortcuts",onselect:showHelp},
{id:"btn-help",icon:"fa fa-question",label:"Help...", href:"http://nodered.org/docs"}
{id:"btn-keyboard-shortcuts",_icon:"fa fa-keyboard-o",label:"Keyboard Shortcuts",onselect:showHelp},
{id:"btn-help",_icon:"fa fa-question",label:"Help...", href:"http://nodered.org/docs"}
]
});

View File

@ -46,8 +46,12 @@ RED.menu = (function() {
} else {
item = $('<li></li>');
var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">'+
(opt.toggle?'<i class="fa fa-check pull-right"></i>':'');
var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">';
if (opt.toggle) {
linkContent += '<i class="fa fa-square pull-left"></i>';
linkContent += '<i class="fa fa-check-square pull-left"></i>';
}
if (opt.icon !== undefined) {
if (/\.png/.test(opt.icon)) {
linkContent += '<img src="'+opt.icon+'"/> ';

View File

@ -66,7 +66,7 @@ span.logo {
font-size: 30px;
line-height: 30px;
text-decoration: none;
color: #ccc;
color: #C7C7C7;
}
span.logo span {
vertical-align: middle;
@ -105,7 +105,7 @@ span.logo img {
font-size: 14px;
padding: 0px 12px;
text-decoration: none;
color: #ccc;
color: #C7C7C7;
margin: auto 5px;
vertical-align: middle;
border-left: 2px solid #000;
@ -132,7 +132,7 @@ span.logo img {
color: #ccc;
}
span.deploy-button-group.open > #btn-deploy + a {
background: #323232 !important;
background: #121212 !important;
}
#btn-deploy:not(.disabled):hover {
@ -166,7 +166,7 @@ span.deploy-button-group.open > #btn-deploy + a {
color: #ddd;
}
span.deploy-button-group.open > #btn-deploy.disabled + a {
background: #323232 !important;
background: #121212 !important;
}
@ -201,14 +201,14 @@ span.deploy-button-group.open > #btn-deploy.disabled + a {
font-size: 20px !important;
}
#btn-sidemenu:active, #btn-sidemenu.active {
background: #323232;
background: #121212;
}
#header .button:focus {
outline: none;
}
li.open #btn-sidemenu {
background: #323232 ;
border-color: #323232;
background: #121212;
border-color: #121212;
}
@ -831,14 +831,26 @@ div.node-info {
background: #999;
}
.dropdown-menu * .fa-check {
.dropdown-menu * .fa-check-square {
display: none;
margin-right: -15px;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-check {
.dropdown-menu * a.active > .fa-check-square {
display: inline-block;
}
.dropdown-menu * .fa-square {
display: inline-block;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-square {
display: none;
}
.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
background-image: url("bootstrap/img/glyphicons-halflings.png") !important;
}
@ -868,9 +880,9 @@ div.node-info {
width: 0;
height: 0;
margin-top: 5px;
margin-left: -35px;
margin-left: -30px;
border-color: transparent;
border-right-color: #ccc;
border-right-color: #e0e0e0;
border-style: solid;
border-width: 5px 5px 5px 0;
content: " ";
@ -1162,14 +1174,14 @@ i.spinner {
}
#header ul.dropdown-menu {
background: #000;
background: #121212;
width: 250px !important;
margin-top: 0;
}
#header ul.dropdown-menu li a {
color: white;
padding: 8px 40px;
color: #C7C7C7;
padding: 3px 40px;
}
#header ul.dropdown-menu li a img {
@ -1189,7 +1201,7 @@ i.spinner {
text-indent: 0px;
}
#header ul.dropdown-menu li a span.menu-label {
font-size: 13px;
font-size: 14px;
display: inline-block;
text-indent: 0px;
}
@ -1200,13 +1212,14 @@ i.spinner {
text-indent: 0px;
}
#header ul.dropdown-menu li a:hover {
background: #323232;
#header ul.dropdown-menu > li:hover > a,
#header ul.dropdown-menu > li:focus > a {
background: #323232 !important;
}
#header ul.dropdown-menu li.divider {
background: #5A5A5A;
border-bottom-color: #464646;
background: #464646;
border-bottom-color: #323232;
}
#header ul.dropdown-menu li.disabled a {
color: #666;
@ -1223,10 +1236,10 @@ i.spinner {
}
#header ul#btn-deploy-options-submenu li a {
padding: 10px 30px;
color: white;
color: #fff;
}
#header ul#btn-deploy-options-submenu li a.active > .fa-check {
display: none;
#header ul#btn-deploy-options-submenu li a > i.fa {
display: none !important;
}