grafana/public/sass/components/_sidemenu.scss

292 lines
5.0 KiB
SCSS
Raw Normal View History

.sidemenu {
2017-08-17 07:00:41 -05:00
position: fixed;
display: flex;
flex-flow: column;
flex-direction: column;
2016-02-18 12:47:00 -06:00
width: $side-menu-width;
z-index: $zindex-sidemenu;
2016-02-15 08:27:41 -06:00
a:focus {
text-decoration: none;
}
.sidemenu__logo_small_breakpoint {
display: none;
2017-08-17 07:00:41 -05:00
}
.sidemenu__close {
display: none;
2017-08-17 07:00:41 -05:00
}
}
// body class that hides sidemenu
.sidemenu-hidden {
.sidemenu {
display: none;
}
}
@include media-breakpoint-up(sm) {
.sidemenu-open {
.sidemenu {
background: $side-menu-bg;
position: initial;
height: auto;
box-shadow: $side-menu-shadow;
position: relative;
z-index: $zindex-sidemenu;
}
.sidemenu__top,
.sidemenu__bottom {
display: block;
}
2017-08-17 07:00:41 -05:00
}
}
2017-08-15 07:49:12 -05:00
.sidemenu__top {
2017-08-17 07:59:10 -05:00
padding-top: 3rem;
2017-08-15 07:49:12 -05:00
flex-grow: 1;
2017-08-17 07:00:41 -05:00
display: none;
2017-08-15 07:49:12 -05:00
}
.sidemenu__bottom {
padding-bottom: $spacer;
2017-08-17 07:00:41 -05:00
display: none;
2017-08-15 07:49:12 -05:00
}
.sidemenu-item {
position: relative;
@include left-brand-border();
@include media-breakpoint-up(sm) {
&.active,
&:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();
2017-08-15 07:49:12 -05:00
.dropdown-menu {
margin: 0;
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 - 2px;
@include animation('dropdown-anim 150ms ease-in-out 100ms forwards');
2017-12-19 09:22:41 -06:00
z-index: $zindex-sidemenu;
}
2016-02-15 08:27:41 -06:00
}
}
}
2017-08-15 07:49:12 -05:00
.dropup.sidemenu-item:hover .dropdown-menu {
top: auto !important;
}
.sidemenu-link {
color: $link-color;
line-height: 42px;
padding: 0px 10px 0px 10px;
display: block;
position: relative;
font-size: 16px;
border: 1px solid transparent;
2017-10-14 14:17:16 -05:00
text-align: center;
2017-08-15 07:49:12 -05:00
img {
border-radius: 50%;
width: 28px;
height: 28px;
2017-12-19 09:22:41 -06:00
box-shadow: 0 0 14px 2px rgba(255, 255, 255, 0.05);
2017-08-15 07:49:12 -05:00
}
}
@include keyframes(dropdown-anim) {
2016-02-20 08:02:12 -06:00
0% {
opacity: 0;
//transform: translate3d(-5%,0,0);
2016-02-20 08:02:12 -06:00
}
100% {
opacity: 1;
//transform: translate3d(0,0,0);
2016-02-20 08:02:12 -06:00
}
}
2016-02-15 08:27:41 -06:00
.icon-circle {
width: 35px;
height: 35px;
2016-02-15 08:27:41 -06:00
display: inline-block;
2017-10-14 14:17:16 -05:00
2017-12-19 09:22:41 -06:00
.fa,
.icon-gf,
.gicon {
2017-12-04 06:12:32 -06:00
color: $side-menu-link-color;
2016-02-15 08:27:41 -06:00
position: relative;
2017-12-19 09:22:41 -06:00
opacity: 0.7;
font-size: 130%;
height: 22px;
width: 22px;
2016-02-15 08:27:41 -06:00
}
2017-06-12 09:46:02 -05:00
.fa {
top: 2px;
2017-10-14 14:17:16 -05:00
position: relative;
2017-06-12 09:46:02 -05:00
}
.icon-gf {
top: 5px;
}
2016-02-15 08:27:41 -06:00
img {
position: relative;
}
}
2017-06-08 16:13:38 -05:00
.side-menu-header {
2017-06-12 14:11:22 -05:00
padding: 10px 10px 10px 20px;
2017-06-22 17:11:29 -05:00
white-space: nowrap;
2017-06-08 16:13:38 -05:00
background-color: $side-menu-item-hover-bg;
2017-08-15 07:49:12 -05:00
font-size: 17px;
2017-12-04 06:12:32 -06:00
color: #ebedf2;
2016-02-15 08:27:41 -06:00
}
2018-04-16 09:25:28 -05:00
.sidemenu-subtitle {
padding: 0.5rem 1rem 0.5rem;
font-size: $font-size-sm;
color: $text-color-weak;
2018-04-16 09:25:28 -05:00
border-bottom: 1px solid $dropdownDividerBottom;
margin-bottom: 0.25rem;
white-space: nowrap;
}
li.sidemenu-org-switcher {
border-bottom: 1px solid $dropdownDividerBottom;
2016-02-15 08:27:41 -06:00
}
.sidemenu-org-switcher__org-name {
font-size: $font-size-base;
2016-02-15 08:27:41 -06:00
}
.sidemenu-org-switcher__org-current {
font-size: $font-size-xs;
color: $text-color-weak;
position: relative;
top: -2px;
2016-02-15 08:27:41 -06:00
}
.sidemenu-org-switcher__switch {
font-size: $font-size-sm;
padding-left: 1.5rem;
display: flex;
align-items: center;
> i.fa.fa-random {
margin-right: 4px;
top: 1px;
}
}
2017-08-17 07:00:41 -05:00
.sidemenu__logo {
2017-08-17 07:00:41 -05:00
display: block;
2017-12-19 09:22:41 -06:00
padding: 0.4rem 1rem 0.4rem 0.65rem;
2017-08-17 07:00:41 -05:00
min-height: $navbarHeight;
2017-11-01 08:23:46 -05:00
position: relative;
height: $navbarHeight - 1px;
2017-08-17 07:00:41 -05:00
&:hover {
background: $navbarButtonBackgroundHighlight;
}
img {
width: 30px;
position: relative;
2017-10-16 02:55:55 -05:00
top: 5px;
2017-08-17 07:00:41 -05:00
left: 4px;
}
}
@include media-breakpoint-down(xs) {
.sidemenu-open--xs {
li {
font-size: $font-size-lg;
}
.sidemenu {
width: 100%;
background: $side-menu-bg-mobile;
position: initial;
height: auto;
box-shadow: $side-menu-shadow;
position: relative;
z-index: $zindex-sidemenu;
}
.sidemenu__close {
display: block;
font-size: $font-size-md;
position: relative;
top: -3px;
}
.sidemenu__top,
.sidemenu__bottom {
display: block;
}
.sidemenu-item {
border-right: 2px solid transparent;
}
}
.sidemenu {
.sidemenu__logo {
display: none;
}
.sidemenu__logo_small_breakpoint {
padding: 16px 10px 26px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: baseline;
.fa-bars {
font-size: 25px;
}
}
.sidemenu__top {
padding-top: 0rem;
}
.side-menu-header {
padding-left: 10px;
}
.sidemenu-link {
text-align: left;
}
.sidemenu-icon {
2017-12-19 09:22:41 -06:00
display: none;
}
.dropdown-menu--sidemenu {
display: block;
position: unset;
width: 100%;
float: none;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
> li > a {
padding-left: 15px;
}
}
.sidemenu__bottom {
.dropdown-menu--sidemenu {
display: flex;
flex-direction: column-reverse;
}
}
}
}