sidebar.scss 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. #body, #body.adenGreen {
  2. .sidebar-container {
  3. background-color: $menuBg;
  4. // menu hover
  5. .submenu-title-noDropdown,
  6. .el-submenu__title {
  7. &:hover {
  8. background-color: $menuHover !important;
  9. color: $menuActiveText2 !important;
  10. &::after{
  11. background-color: $menuActiveText2;
  12. }
  13. }
  14. }
  15. .is-active>.el-submenu__title {
  16. color: $subMenuActiveText !important;
  17. }
  18. & .nest-menu .el-submenu>.el-submenu__title,
  19. & .el-submenu .el-menu-item {
  20. background-color: $subMenuBg!important;
  21. &:hover {
  22. background-color: $subMenuHover!important;
  23. color: $menuActiveText2 !important;
  24. &::after{
  25. background-color: $menuActiveText2;
  26. }
  27. }
  28. }
  29. & .el-menu-item {
  30. &:hover {
  31. background-color: $subMenuHover!important;
  32. color: $menuActiveText2 !important;
  33. &::after{
  34. background-color: $menuActiveText2;
  35. }
  36. }
  37. }
  38. }
  39. .el-submenu .el-menu-item.is-active {
  40. background-color: $subMenuActiveBg!important;
  41. &::after{
  42. background-color: $menuActiveText2;
  43. }
  44. }
  45. .el-menu-item.is-active {
  46. background-color: $menuHover !important;
  47. color: $menuActiveText2 !important;
  48. &::after {
  49. background-color: $menuActiveAfter;
  50. }
  51. }
  52. .el-submenu .el-menu-item.is-active {
  53. color: $menuActiveText2 !important;
  54. }
  55. .el-menu-item.is-active {
  56. // font-weight: bold;
  57. position: relative;
  58. &::after {
  59. position: absolute;
  60. top: 0;
  61. right: 0;
  62. content: " ";
  63. width: 6px;
  64. display: block;
  65. height: 100%;
  66. }
  67. }
  68. .main-container {
  69. min-height: 100%;
  70. transition: margin-left .28s;
  71. margin-left: $sideBarWidth;
  72. position: relative;
  73. }
  74. .sidebar-container {
  75. transition: width 0.28s;
  76. width: $sideBarWidth !important;
  77. height: 100%;
  78. position: fixed;
  79. font-size: 0px;
  80. top: 0;
  81. bottom: 0;
  82. left: 0;
  83. z-index: 1001;
  84. overflow: hidden;
  85. .el-menu-item {
  86. &:hover {
  87. color: #fff;
  88. }
  89. }
  90. // reset element-ui css
  91. .horizontal-collapse-transition {
  92. transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  93. }
  94. .scrollbar-wrapper {
  95. overflow-x: hidden !important;
  96. }
  97. .el-scrollbar__bar.is-vertical {
  98. right: 0px;
  99. }
  100. .el-scrollbar {
  101. height: 100%;
  102. }
  103. &.has-logo {
  104. .el-scrollbar {
  105. height: calc(100% - 90px);
  106. border-right: 1px solid #EDEDED;
  107. }
  108. }
  109. .is-horizontal {
  110. display: none;
  111. }
  112. a {
  113. display: inline-block;
  114. width: 100%;
  115. overflow: hidden;
  116. }
  117. .svg-icon, .iconfont {
  118. margin-right: 12px;
  119. &.noIcon {
  120. margin-right: 20px;
  121. }
  122. }
  123. .el-menu {
  124. border: none;
  125. height: 100%;
  126. width: 100% !important;
  127. }
  128. // menu hover
  129. .submenu-title-noDropdown,
  130. .el-submenu__title {
  131. display: flex;
  132. flex-direction: row;
  133. align-items: center;
  134. &:hover {
  135. position: relative;
  136. &::after{
  137. position: absolute;
  138. top: 0;
  139. right: 0;
  140. content: ' ';
  141. width: 6px;
  142. display: block;
  143. height: 100%;
  144. }
  145. }
  146. }
  147. .is-active>.el-submenu__title {
  148. i{color: #909399;}
  149. }
  150. & .nest-menu .el-submenu>.el-submenu__title,
  151. & .el-submenu .el-menu-item {
  152. min-width: $sideBarWidth !important;
  153. &:hover {
  154. position: relative;
  155. &::after{
  156. position: absolute;
  157. top: 0;
  158. right: 0;
  159. content: ' ';
  160. width: 6px;
  161. display: block;
  162. height: 100%;
  163. }
  164. }
  165. }
  166. & .el-menu-item {
  167. &:hover {
  168. position: relative;
  169. &::after{
  170. position: absolute;
  171. top: 0;
  172. right: 0;
  173. content: ' ';
  174. width: 6px;
  175. display: block;
  176. height: 100%;
  177. }
  178. }
  179. }
  180. }
  181. .el-submenu .el-menu-item.is-active {
  182. position: relative;
  183. &::after{
  184. position: absolute;
  185. top: 0;
  186. right: 0;
  187. content: ' ';
  188. width: 6px;
  189. display: block;
  190. height: 100%;
  191. }
  192. }
  193. .hideSidebar {
  194. .sidebar-container {
  195. width: $sideBarWidth !important;
  196. }
  197. .main-container {
  198. margin-left:$sideBarWidth!important;
  199. }
  200. .submenu-title-noDropdown {
  201. padding: 0 !important;
  202. position: relative;
  203. .el-tooltip {
  204. padding: 0 !important;
  205. .svg-icon {
  206. margin-left: 20px;
  207. }
  208. }
  209. }
  210. .el-submenu {
  211. overflow: hidden;
  212. &>.el-submenu__title {
  213. padding: 0 !important;
  214. .svg-icon {
  215. margin-left: 20px;
  216. }
  217. .el-submenu__icon-arrow {
  218. color: #fff;
  219. display: none;
  220. }
  221. }
  222. }
  223. .el-menu--collapse {
  224. .el-submenu {
  225. &>.el-submenu__title {
  226. &>span {
  227. height: 0;
  228. width: 0;
  229. overflow: hidden;
  230. visibility: hidden;
  231. display: inline-block;
  232. }
  233. }
  234. }
  235. }
  236. }
  237. .el-menu--collapse .el-menu .el-submenu {
  238. min-width: $sideBarWidth !important;
  239. }
  240. // mobile responsive
  241. .mobile {
  242. .main-container {
  243. margin-left: 0px;
  244. }
  245. .sidebar-container {
  246. transition: transform .28s;
  247. width: $sideBarWidth !important;
  248. }
  249. &.hideSidebar {
  250. .sidebar-container {
  251. pointer-events: none;
  252. transition-duration: 0.3s;
  253. transform: translate3d(-$sideBarWidth, 0, 0);
  254. }
  255. }
  256. }
  257. .withoutAnimation {
  258. .main-container,
  259. .sidebar-container {
  260. transition: none;
  261. }
  262. }
  263. .el-menu-item.is-active {
  264. // font-weight: bold;
  265. position: relative;
  266. &::after {
  267. position: absolute;
  268. top: 0;
  269. right: 0;
  270. content: " ";
  271. width: 6px;
  272. display: block;
  273. height: 100%;
  274. }
  275. }
  276. .navbar {
  277. background: $menuPrimary;
  278. .left-menu {
  279. color: #fff;
  280. }
  281. }
  282. .indexlayout-top-menu-li {
  283. &:hover, &.active {
  284. color: $menuActiveText !important;
  285. background-color: $menuActiveBg !important;
  286. }
  287. }
  288. }
  289. // when menu collapsed
  290. // .el-menu--vertical {
  291. // &>.el-menu {
  292. // .svg-icon {
  293. // margin-right: 16px;
  294. // }
  295. // }
  296. // // .nest-menu .el-submenu>.el-submenu__title,
  297. // .el-menu-item {
  298. // &:hover {
  299. // // you can use $subMenuHover
  300. // background-color: $menuHover !important;
  301. // color: var(--color-primary) !important;
  302. // position: relative;
  303. // &::after{
  304. // position: absolute;
  305. // top: 0;
  306. // right: 0;
  307. // content: ' ';
  308. // width: 6px;
  309. // background-color: $menuActiveText2;
  310. // display: block;
  311. // height: 100%;
  312. // }
  313. // }
  314. // .is-active {
  315. // background-color:$subMenuActiveBg !important;
  316. // }
  317. // }
  318. // // the scroll bar appears when the subMenu is too long
  319. // >.el-menu--popup {
  320. // max-height: 100vh;
  321. // overflow-y: auto;
  322. // &::-webkit-scrollbar-track-piece {
  323. // background: #d3dce6;
  324. // }
  325. // &::-webkit-scrollbar {
  326. // width: 6px;
  327. // }
  328. // &::-webkit-scrollbar-thumb {
  329. // background: #99a9bf;
  330. // border-radius: 20px;
  331. // }
  332. // }
  333. // }