icingaweb2/public/css/icinga/configmenu.less
2022-07-26 14:01:14 +02:00

240 lines
4.0 KiB
Plaintext

#menu {
margin-bottom: 3em;
}
.sidebar-collapsed #menu {
margin-bottom: 8em;
}
#menu .config-menu {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: @menu-bg-color;
margin-top: auto;
> ul {
display: flex;
flex-wrap: nowrap;
padding: 0;
> li {
> a {
padding: 0.5em 0.5em 0.5em 0.75em;
line-height: 2.167em;
white-space: nowrap;
text-decoration: none;
}
&:hover .nav-level-1 {
display: block;
}
}
li.active a:after {
display: none;
}
.user-nav-item {
width: 100%;
overflow: hidden; // necessary for .text-ellipsis of <a>
> a {
overflow: hidden;
text-overflow: ellipsis;
}
&:not(.active):hover a,
&:not(.active) a:focus {
background: @menu-hover-bg-color;
}
}
.config-nav-item {
line-height: 2;
display: flex;
align-items: center;
position: relative;
> button {
background: none;
border: none;
display: block;
.rounded-corners();
> .state-badge {
position: absolute;
pointer-events: none;
}
.icon {
opacity: .8;
font-size: 1.25em;
&:before {
margin-right: 0;
}
}
}
&:hover > button {
background: fade(@menu-hover-bg-color, 25);
> .state-badge {
display: none;
}
}
button:focus {
background: fade(@menu-hover-bg-color, 25);
}
&.active > button {
color: @text-color-inverted;
background: @icinga-blue;
}
}
.nav-level-1 li a {
// Match effective padding left of level-2 flyouts. (1.5 + .5 em)
font-size: 11/12em;
}
.state-badge {
line-height: 1.2;
padding: .25em;
font-family: @font-family-wide;
}
}
.user-ball {
.ball();
.ball-size-l();
.ball-solid(@icinga-blue);
// icingadb-web/public/css/common.less: .user-ball
font-weight: bold;
text-transform: uppercase;
// compensate border vertically and add space to the right;
margin: -1px .2em -2px 0;
border: 1px solid @text-color-inverted;
font-style: normal;
line-height: 1.2;
}
}
#layout:not(.sidebar-collapsed) #menu .config-menu {
.user-nav-item {
> a {
padding-right: 4.75em;
}
&.active.selected + .config-nav-item {
> button {
color: @text-color-inverted;
}
}
}
.config-nav-item {
position: absolute;
right: 2.5em;
bottom: 0;
top: 0;
.state-badge {
left: -1em;
top: 0;
}
}
.nav-level-1 {
bottom: 100%;
right: -2em;
width: 15em;
}
}
.sidebar-collapsed #menu .config-menu {
ul {
flex-direction: column;
.user-ball {
margin-left: .25em * 1.5/2;
margin-right: .5em + .25em * 1.5/2;
width: 2em * 1.5/2 ;
height: 2em * 1.5/2;
font-size: 2/1.5em;
line-height: 1;
}
.config-nav-item {
padding-right: 0;
margin-bottom: 3em;
.icon {
font-size: 1.5em;
}
button {
position: relative;
width: 3em;
margin: .125em .5em;
padding: .5em .75em;
.state-badge {
right: -.25em;
bottom: -.25em;
font-size: .75em;
overflow: hidden;
text-overflow: ellipsis;
max-width: 4em;
}
}
}
}
.nav-level-1 {
bottom: 0;
left: 100%;
width: 14em;
&:before {
left: -.6em;
bottom: 1em;
transform: rotate(135deg);
}
}
}
// Prevent flyout to vanish on autorefresh
#layout.config-flyout-open .config-nav-item {
.flyout {
display: block;
}
> button > .state-badge {
display: none;
}
}
#layout.minimal-layout .config-menu {
display: none;
}
#layout.minimal-layout #menu {
margin-bottom: 0;
}
#layout:not(.minimal-layout) #menu .primary-nav {
.user-nav-item,
.configuration-nav-item,
.system-nav-item {
display: none;
}
}