2018-02-28 12:00:51 +00:00
|
|
|
@import 'constants';
|
2018-02-20 18:00:09 +00:00
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
|
|
|
|
@keyframes menu-label{
|
|
|
|
0%{ display: none; opacity: 0; left: 0; transform: translateX(-100%) translateY(-50%); }
|
|
|
|
1%{ display: block; }
|
|
|
|
80%{ opacity: 0; }
|
|
|
|
100%{ opacity: 1; left: calc( 100% + 1em ); transform: translateX(0) translateY(-50%); }
|
|
|
|
}
|
|
|
|
|
2018-02-20 18:00:09 +00:00
|
|
|
#side-menu{
|
|
|
|
|
|
|
|
/* (1) Container
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
display: flex;
|
2018-03-03 21:18:36 +00:00
|
|
|
position: fixed;
|
2018-03-05 16:38:51 +00:00
|
|
|
top: $header-height;
|
2018-02-20 18:00:09 +00:00
|
|
|
left: 0;
|
2018-03-01 12:16:22 +00:00
|
|
|
width: calc( #{$menu-width} - 1px );
|
2018-03-05 16:38:51 +00:00
|
|
|
height: calc( 100% - #{$header-height} );
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
background-color: $menu-bg;
|
2018-03-01 12:16:22 +00:00
|
|
|
border-right: 1px solid #e3e7eb;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
// flex properties
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-around;
|
2018-03-13 18:23:22 +00:00
|
|
|
// justify-content: flex-start;
|
2018-02-20 18:00:09 +00:00
|
|
|
align-items: center;
|
|
|
|
|
2018-03-05 16:38:51 +00:00
|
|
|
z-index: 101;
|
2018-03-01 12:16:22 +00:00
|
|
|
|
2018-02-20 18:00:09 +00:00
|
|
|
/* (2) Items
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
.item{
|
|
|
|
display: block;
|
2018-02-27 13:33:04 +00:00
|
|
|
position: relative;
|
2018-03-01 12:16:22 +00:00
|
|
|
width: $menu-item-width;
|
|
|
|
height: $menu-item-width;
|
2018-02-28 12:00:51 +00:00
|
|
|
|
2018-03-13 18:23:22 +00:00
|
|
|
margin: .5em;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
background: $menu-bg center center no-repeat;
|
2018-02-28 12:00:51 +00:00
|
|
|
background-size: auto 50%;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
|
2018-03-13 18:23:22 +00:00
|
|
|
transition: background-position .1s ease-in-out;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
z-index: 1;
|
|
|
|
|
2018-02-20 18:00:09 +00:00
|
|
|
/* (1) Set icons */
|
2018-03-01 12:16:22 +00:00
|
|
|
&[data-icon='home']{ background-image: url('/asset/svg/home.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='teacher']{ background-image: url('/asset/svg/teacher.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='ue']{ background-image: url('/asset/svg/ue.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='settings']{ background-image: url('/asset/svg/settings.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='fiche']{ background-image: url('/asset/svg/fiche.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='login']{ background-image: url('/asset/svg/login.svg@#{$menu-item-inactive}'); }
|
|
|
|
&[data-icon='logout']{ background-image: url('/asset/svg/logout.svg@#{$menu-item-inactive}'); }
|
2018-02-20 18:37:45 +00:00
|
|
|
|
2018-02-20 20:32:03 +00:00
|
|
|
|
2018-02-28 12:00:51 +00:00
|
|
|
&[data-icon='home']:hover, &[data-icon='home'].active{ background-image: url('/asset/svg/home.svg@10d197'); }
|
|
|
|
&[data-icon='teacher']:hover, &[data-icon='teacher'].active{ background-image: url('/asset/svg/teacher.svg@edb910'); }
|
|
|
|
&[data-icon='ue']:hover, &[data-icon='ue'].active{ background-image: url('/asset/svg/ue.svg@1fc9ef'); }
|
2018-03-13 18:23:22 +00:00
|
|
|
&[data-icon='settings']:hover, &[data-icon='settings'].active{ background-image: url('/asset/svg/settings.svg@dab245'); }
|
2018-02-28 12:00:51 +00:00
|
|
|
&[data-icon='fiche']:hover, &[data-icon='fiche'].active{ background-image: url('/asset/svg/fiche.svg@ea4C3a'); }
|
|
|
|
&[data-icon='login']:hover, &[data-icon='login'].active{ background-image: url('/asset/svg/login.svg@dab245'); }
|
|
|
|
&[data-icon='logout']:hover, &[data-icon='logout'].active{ background-image: url('/asset/svg/logout.svg@dab245'); }
|
2018-02-20 18:00:09 +00:00
|
|
|
|
2018-03-13 18:23:22 +00:00
|
|
|
/* (2) Label */
|
2018-02-27 13:33:04 +00:00
|
|
|
&:after{
|
2018-02-20 18:00:09 +00:00
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
content: attr(data-label);
|
|
|
|
|
|
|
|
display: none;
|
2018-02-20 18:00:09 +00:00
|
|
|
position: absolute;
|
2018-02-27 13:33:04 +00:00
|
|
|
top: 50%;
|
|
|
|
left: 0;
|
2018-02-20 20:32:03 +00:00
|
|
|
opacity: 0;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
padding: .3em .7em;
|
|
|
|
|
2018-03-05 16:38:51 +00:00
|
|
|
background-color: #333;
|
|
|
|
border: 1px solid #222;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
2018-03-05 16:38:51 +00:00
|
|
|
color: #ccc;
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
border-radius: 3px / 3px;
|
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
transform: translateX(-100%) translateY(-50%);
|
2018-02-20 20:32:03 +00:00
|
|
|
|
2018-02-28 12:00:51 +00:00
|
|
|
// 1 line only
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
|
2018-02-20 20:32:03 +00:00
|
|
|
z-index: -1;
|
2018-02-20 18:00:09 +00:00
|
|
|
}
|
|
|
|
|
2018-03-13 18:23:22 +00:00
|
|
|
/* (3) Display label on item hover */
|
2018-02-27 13:33:04 +00:00
|
|
|
&:hover:after{
|
|
|
|
display: block;
|
|
|
|
left: calc( 100% + 1em );
|
2018-02-20 20:32:03 +00:00
|
|
|
opacity: 1;
|
2018-02-27 13:33:04 +00:00
|
|
|
transform: translateX(0) translateY(-50%);
|
|
|
|
animation: menu-label .2s ease-in-out 0s;
|
2018-02-20 20:32:03 +00:00
|
|
|
}
|
2018-02-20 18:00:09 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|