grafana/public/sass/components/_sidemenu.scss
2016-03-28 10:23:36 +02:00

229 lines
3.8 KiB
SCSS

.sidemenu-canvas {
position: relative;
}
.sidemenu-wrapper {
position: absolute;
top: 52px;
left: 0;
width: $side-menu-width;
background-color: rgba($side-menu-bg,$side-menu-opacity);
z-index: 101;
transform: translate3d(0, -100%, 0);
visibility: hidden;
a:focus {
text-decoration: none;
}
}
.sidemenu-open {
.sidemenu-wrapper {
visibility: visible;
transform: translate3d(0, 0, 0);
transition: all 0.2s;
}
}
.sidemenu-pinned {
.sidemenu-wrapper {
min-height: calc(100% - 54px);
}
.dashboard-container {
padding-left: $side-menu-width + 0.5rem;
}
.page-container {
margin-left: $side-menu-width;
}
.search-container {
left: auto;
}
}
.sidemenu {
list-style: none;
margin: 0;
padding: 0;
> li {
position: relative;
@include left-brand-border();
&.active,
&:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();
.dropdown-menu {
display: block;
opacity: 0;
top: 0px;
// important to overlap it otherwise it can be hidden
// again by the mouse getting outside the hover space
left: $side-menu-width - 0.2rem;
background-color: rgba($side-menu-bg,$side-menu-opacity);
@include animation('dropdown-anim 150ms ease-in-out 100ms forwards');
z-index: -9999;
}
}
}
}
@include keyframes(dropdown-anim) {
0% {
opacity: 0;
transform: translate3d(-5%,0,0);
}
100% {
opacity: 1;
transform: translate3d(0,0,0);
}
}
.sidemenu-main-link {
font-size: 16px;
}
.sidemenu-item-text {
width: 110px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon-circle {
width: 40px;
height: 40px;
display: inline-block;
i {
color: $link-color;
opacity: .7;
position: relative;
left: 7px;
top: 5px;
font-size: 150%;
}
img {
left: 7px;
position: relative;
}
}
.sidemenu-item {
color: $link-color;
line-height: 47px;
padding: 0px 10px 0px 10px;
display: block;
border-left: 1px solid transparent;
.sidemenu-item-text {
padding-left: 11px;
}
img {
border-radius: 50%;
width: 28px;
height: 28px;
box-shadow: 0 0 14px 2px rgba(255,255,255, 0.05);
}
}
.sidemenu-section-tagline {
font-style: italic;
line-height: 10px;
}
.sidemenu-section-text-wrapper {
padding-top: 4px;
}
.sidemenu-org-section .dropdown-menu-title {
margin: 0 10px 0 6px;
padding: 7px 0 7px;
overflow: hidden;
color: $dropdownTitle;
}
.sidemenu-org-section .dropdown-menu-title > span {
display: inline-block;
position: relative;
&:after {
display: block;
position: absolute;
top: 50%;
right: 0;
left: 100%;
width: 200px;
height: 1px;
margin-left: 5px;
background: $dropdownDivider;
content: '';
}
}
.sidemenu-org {
padding: 17px 10px 15px 14px;
box-sizing: border-box;
cursor: pointer;
display: table;
position: relative;
width: 100%;
}
.sidemenu .fa-caret-right {
position: absolute;
top: 38%;
right: 6px;
font-size: 14px;
color: $text-color-weak;
}
.sidemenu-org-avatar,
.sidemenu-org-details {
display: table-cell;
vertical-align: top;
}
.sidemenu-org-avatar {
width: 40px;
height: 40px;
background-color: $gray-2;
border-radius: 50%;
text-align: center;
>img {
position: absolute;
width: 40px;
height: 40px;
border-radius: 50%;
left: 14px;
}
}
.sidemenu-org-avatar--missing {
color: $gray-4;
text-shadow: 0 1px 0 $dark-1;
line-height: 40px;
font-size: $font-size-lg;
}
.sidemenu-org-details {
padding-left: 10px;
color: $link-color;
}
.sidemenu-org-name {
display: block;
font-size: 13px;
color: $link-color-disabled;
}
.sidemenu-org-user {
display: block;
}