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:
parent
c97ab18e62
commit
dd5e851339
@ -301,33 +301,32 @@ var RED = (function() {
|
|||||||
$(function() {
|
$(function() {
|
||||||
RED.menu.init({id:"btn-sidemenu",
|
RED.menu.init({id:"btn-sidemenu",
|
||||||
options: [
|
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,
|
null,
|
||||||
{id:"btn-node-status",icon:"fa fa-info",label:"Node Status",toggle:true,onselect:toggleStatus},
|
{id:"btn-import-menu",_icon:"fa fa-sign-in",label:"Import...",options:[
|
||||||
null,
|
{id:"btn-import-clipboard",_icon:"fa fa-clipboard",label:"Clipboard...",onselect:RED.view.showImportNodesDialog},
|
||||||
{id:"btn-import-menu",icon:"fa fa-sign-in",label:"Import...",options:[
|
{id:"btn-import-library",_icon:"fa fa-book",label:"Library",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-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-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-library",_icon:"fa fa-book",label:"Library...",disabled:true,onselect:RED.view.showExportNodesLibraryDialog}
|
||||||
]},
|
]},
|
||||||
null,
|
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,
|
null,
|
||||||
{id:"btn-create-subflow",icon:"fa fa-share-alt",label:"Create subflow",onselect:RED.view.createSubflow},
|
{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-convert-subflow",_icon:"fa fa-share-alt",label:"Convert to subflow",disabled:true,onselect:RED.view.convertToSubflow},
|
||||||
null,
|
null,
|
||||||
{id:"btn-workspace-menu",icon:"fa fa-th-large",label:"Workspaces",options:[
|
{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-add",_icon:"fa fa-plus",label:"Add"},
|
||||||
{id:"btn-workspace-edit",icon:"fa fa-pencil",label:"Rename"},
|
{id:"btn-workspace-edit",_icon:"fa fa-pencil",label:"Rename"},
|
||||||
{id:"btn-workspace-delete",icon:"fa fa-minus",label:"Delete"},
|
{id:"btn-workspace-delete",_icon:"fa fa-minus",label:"Delete"},
|
||||||
null
|
null
|
||||||
]},
|
]},
|
||||||
null,
|
null,
|
||||||
{id:"btn-keyboard-shortcuts",icon:"fa fa-keyboard-o",label:"Keyboard Shortcuts",onselect:showHelp},
|
{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-help",_icon:"fa fa-question",label:"Help...", href:"http://nodered.org/docs"}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,8 +46,12 @@ RED.menu = (function() {
|
|||||||
} else {
|
} else {
|
||||||
item = $('<li></li>');
|
item = $('<li></li>');
|
||||||
|
|
||||||
var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">'+
|
var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">';
|
||||||
(opt.toggle?'<i class="fa fa-check pull-right"></i>':'');
|
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 (opt.icon !== undefined) {
|
||||||
if (/\.png/.test(opt.icon)) {
|
if (/\.png/.test(opt.icon)) {
|
||||||
linkContent += '<img src="'+opt.icon+'"/> ';
|
linkContent += '<img src="'+opt.icon+'"/> ';
|
||||||
|
@ -66,7 +66,7 @@ span.logo {
|
|||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #ccc;
|
color: #C7C7C7;
|
||||||
}
|
}
|
||||||
span.logo span {
|
span.logo span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -105,7 +105,7 @@ span.logo img {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 0px 12px;
|
padding: 0px 12px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #ccc;
|
color: #C7C7C7;
|
||||||
margin: auto 5px;
|
margin: auto 5px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-left: 2px solid #000;
|
border-left: 2px solid #000;
|
||||||
@ -132,7 +132,7 @@ span.logo img {
|
|||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
span.deploy-button-group.open > #btn-deploy + a {
|
span.deploy-button-group.open > #btn-deploy + a {
|
||||||
background: #323232 !important;
|
background: #121212 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#btn-deploy:not(.disabled):hover {
|
#btn-deploy:not(.disabled):hover {
|
||||||
@ -166,7 +166,7 @@ span.deploy-button-group.open > #btn-deploy + a {
|
|||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
span.deploy-button-group.open > #btn-deploy.disabled + a {
|
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;
|
font-size: 20px !important;
|
||||||
}
|
}
|
||||||
#btn-sidemenu:active, #btn-sidemenu.active {
|
#btn-sidemenu:active, #btn-sidemenu.active {
|
||||||
background: #323232;
|
background: #121212;
|
||||||
}
|
}
|
||||||
#header .button:focus {
|
#header .button:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
li.open #btn-sidemenu {
|
li.open #btn-sidemenu {
|
||||||
background: #323232 ;
|
background: #121212;
|
||||||
border-color: #323232;
|
border-color: #121212;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -831,14 +831,26 @@ div.node-info {
|
|||||||
background: #999;
|
background: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu * .fa-check {
|
.dropdown-menu * .fa-check-square {
|
||||||
display: none;
|
display: none;
|
||||||
margin-right: -15px;
|
color: #e0e0e0;
|
||||||
|
margin-left: -25px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
.dropdown-menu * a.active > .fa-check {
|
.dropdown-menu * a.active > .fa-check-square {
|
||||||
display: inline-block;
|
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-"] {
|
.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
|
||||||
background-image: url("bootstrap/img/glyphicons-halflings.png") !important;
|
background-image: url("bootstrap/img/glyphicons-halflings.png") !important;
|
||||||
}
|
}
|
||||||
@ -868,9 +880,9 @@ div.node-info {
|
|||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-left: -35px;
|
margin-left: -30px;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-right-color: #ccc;
|
border-right-color: #e0e0e0;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 5px 5px 5px 0;
|
border-width: 5px 5px 5px 0;
|
||||||
content: " ";
|
content: " ";
|
||||||
@ -1162,14 +1174,14 @@ i.spinner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#header ul.dropdown-menu {
|
#header ul.dropdown-menu {
|
||||||
background: #000;
|
background: #121212;
|
||||||
width: 250px !important;
|
width: 250px !important;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header ul.dropdown-menu li a {
|
#header ul.dropdown-menu li a {
|
||||||
color: white;
|
color: #C7C7C7;
|
||||||
padding: 8px 40px;
|
padding: 3px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header ul.dropdown-menu li a img {
|
#header ul.dropdown-menu li a img {
|
||||||
@ -1189,7 +1201,7 @@ i.spinner {
|
|||||||
text-indent: 0px;
|
text-indent: 0px;
|
||||||
}
|
}
|
||||||
#header ul.dropdown-menu li a span.menu-label {
|
#header ul.dropdown-menu li a span.menu-label {
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-indent: 0px;
|
text-indent: 0px;
|
||||||
}
|
}
|
||||||
@ -1200,13 +1212,14 @@ i.spinner {
|
|||||||
text-indent: 0px;
|
text-indent: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header ul.dropdown-menu li a:hover {
|
#header ul.dropdown-menu > li:hover > a,
|
||||||
background: #323232;
|
#header ul.dropdown-menu > li:focus > a {
|
||||||
|
background: #323232 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header ul.dropdown-menu li.divider {
|
#header ul.dropdown-menu li.divider {
|
||||||
background: #5A5A5A;
|
background: #464646;
|
||||||
border-bottom-color: #464646;
|
border-bottom-color: #323232;
|
||||||
}
|
}
|
||||||
#header ul.dropdown-menu li.disabled a {
|
#header ul.dropdown-menu li.disabled a {
|
||||||
color: #666;
|
color: #666;
|
||||||
@ -1223,10 +1236,10 @@ i.spinner {
|
|||||||
}
|
}
|
||||||
#header ul#btn-deploy-options-submenu li a {
|
#header ul#btn-deploy-options-submenu li a {
|
||||||
padding: 10px 30px;
|
padding: 10px 30px;
|
||||||
color: white;
|
color: #fff;
|
||||||
}
|
}
|
||||||
#header ul#btn-deploy-options-submenu li a.active > .fa-check {
|
#header ul#btn-deploy-options-submenu li a > i.fa {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user