_sidebar.scss 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. @import "globals";
  2. .sidebar {
  3. position: fixed;
  4. width: $sidebar-width;
  5. top: 0;
  6. left: 0;
  7. bottom: 0;
  8. z-index: 4;
  9. background-color: $sidebar-background-color;
  10. color: $sidebar-text-color;
  11. transition: background-color $transitions-duration;
  12. padding-bottom: 32px;
  13. @include for-mobile {
  14. min-width: 280px;
  15. max-width: 360px;
  16. width: 80%;
  17. padding-bottom: 0;
  18. transform: translate3d(-100%, 0, 0);
  19. transition: transform $transitions-duration cubic-bezier(0, 0.5, 0.5, 1);
  20. }
  21. &.sidebar-opened {
  22. @include for-mobile {
  23. transform: none;
  24. box-shadow: 0 0 30px 10px rgba(0, 0, 0, 0.2);
  25. }
  26. }
  27. &-header {
  28. display: none;
  29. background-color: $sidebar-background-color;
  30. color: $sidebar-text-color;
  31. height: $sidebar-header-height;
  32. line-height: $sidebar-header-height;
  33. position: fixed;
  34. top: 0;
  35. right: 0;
  36. left: 0;
  37. z-index: 3;
  38. transition: background-color $transitions-duration, transform $transitions-duration;
  39. @include for-mobile {
  40. display: block;
  41. body.scroll-to-bottom & {
  42. transform: translate3d(0, -100%, 0);
  43. }
  44. }
  45. &-menu {
  46. &, &:visited, &:hover {
  47. display: inline-block;
  48. font-size: 14px;
  49. text-transform: uppercase;
  50. color: $sidebar-link-color;
  51. line-height: $sidebar-header-height;
  52. padding: 0 16px;
  53. border-right: 1px solid $sidebar-contrast-background-color;
  54. }
  55. &-icon {
  56. font-size: 16px;
  57. vertical-align: middle;
  58. }
  59. }
  60. }
  61. &-close {
  62. display: none;
  63. float: right;
  64. padding: 4px;
  65. margin: 12px 18px 0 12px;
  66. background: $sidebar-contrast-background-color;
  67. border-radius: 5px;
  68. z-index: 1;
  69. @include for-mobile {
  70. display: inline-block;
  71. }
  72. &.popup {
  73. background-color: $sidebar-popup-search-input-background-color;
  74. }
  75. &-icon {
  76. color: $sidebar-action-color;
  77. font-size: 28px;
  78. font-weight: bold;
  79. vertical-align: middle;
  80. }
  81. &.popup &-icon {
  82. color: $sidebar-popup-search-input-text-color;
  83. }
  84. }
  85. &-wrapper {
  86. height: 100%;
  87. overflow-y: auto;
  88. -webkit-overflow-scrolling: touch;
  89. }
  90. &-section {
  91. padding: 20px 0;
  92. border-bottom: 1px solid $sidebar-contrast-background-color;
  93. transition: border-bottom-color 0.3s;
  94. @include for-mobile {
  95. padding: 10px 0;
  96. }
  97. &:last-child {
  98. border-bottom: 0;
  99. }
  100. }
  101. &-title {
  102. display: block;
  103. color: $sidebar-text-color;
  104. text-transform: uppercase;
  105. font-size: 11px;
  106. font-weight: bold;
  107. overflow: hidden;
  108. text-overflow: ellipsis;
  109. white-space: nowrap;
  110. padding: 0 14px 0 24px;
  111. margin-bottom: 10px;
  112. transition: color $transitions-duration;
  113. @include for-mobile {
  114. padding: 12px 18px 12px 30px;
  115. margin-bottom: 0;
  116. html.touchevents & {
  117. padding-left: 20px;
  118. }
  119. }
  120. &-link {
  121. &, &:visited, &:hover {
  122. color: $sidebar-text-color;
  123. font-weight: bold;
  124. transition: color $transitions-duration;
  125. }
  126. &:hover {
  127. color: $sidebar-hover-title-action-item-color;
  128. }
  129. }
  130. }
  131. &-link {
  132. &, &:visited, &:hover {
  133. display: block;
  134. color: $sidebar-link-color;
  135. overflow: hidden;
  136. text-overflow: ellipsis;
  137. white-space: nowrap;
  138. padding: 8px 12px 8px 24px;
  139. vertical-align: middle;
  140. transition: color $transitions-duration, background-color $transitions-duration;
  141. position: relative;
  142. @include for-mobile {
  143. padding: 12px 18px 12px 30px;
  144. html.touchevents & {
  145. padding-left: 20px;
  146. }
  147. }
  148. &.icon {
  149. font-size: 11px;
  150. text-transform: uppercase;
  151. }
  152. }
  153. &:hover, &.selected {
  154. color: $sidebar-hover-link-color;
  155. background-color: $sidebar-hover-background-color;
  156. }
  157. &-icon {
  158. font-size: 18px;
  159. vertical-align: middle;
  160. margin-right: 6px;
  161. color: $sidebar-icon-color;
  162. transition: color $transitions-duration;
  163. }
  164. &-label {
  165. vertical-align: middle;
  166. display: inline-block;
  167. transition: transform $transitions-duration;
  168. html.touchevents .editing & {
  169. display: inline-block;
  170. transform: translate3d(20px, 0, 0);
  171. }
  172. }
  173. }
  174. &-center-link {
  175. &, &:visited, &:hover {
  176. display: block;
  177. color: $sidebar-action-color;
  178. font-size: 11px;
  179. text-align: center;
  180. padding: 8px 0;
  181. text-transform: uppercase;
  182. transition: color $transitions-duration, background-color $transitions-duration;
  183. @include for-mobile {
  184. padding: 12px 20px;
  185. }
  186. }
  187. &:hover {
  188. color: $sidebar-hover-action-color;
  189. background-color: $sidebar-hover-background-color;
  190. }
  191. }
  192. &-left {
  193. position: absolute;
  194. left: 4px;
  195. html.touchevents & {
  196. top: 0;
  197. bottom: 0;
  198. transition: opacity $transitions-duration, transform $transitions-duration;
  199. }
  200. &.collapsible {
  201. display: none;
  202. html.touchevents & {
  203. display: inline-block;
  204. width: 0;
  205. opacity: 0;
  206. transform: scale(0);
  207. overflow: hidden;
  208. }
  209. }
  210. &-pin, &-unpin {
  211. &, &:visited, &:hover {
  212. display: inline-block;
  213. position: absolute;
  214. top: 1px;
  215. font-size: 14px;
  216. color: $sidebar-action-color;
  217. transition: color $transitions-duration;
  218. html.touchevents & {
  219. position: static;
  220. padding: 6px;
  221. margin-top: 5px;
  222. font-size: 18px;
  223. }
  224. }
  225. &:hover {
  226. color: $sidebar-hover-action-color;
  227. }
  228. }
  229. .apps-list-pinned &-pin {
  230. display: none;
  231. }
  232. .apps-list &-unpin {
  233. display: none;
  234. }
  235. }
  236. html.no-touchevents &-link:hover &-left.collapsible {
  237. display: inline-block;
  238. }
  239. html.touchevents .editing &-left.collapsible {
  240. opacity: 1;
  241. transform: scale(1);
  242. width: auto;
  243. }
  244. &-right {
  245. float: right;
  246. margin-left: 10px;
  247. &.collapsible {
  248. display: none;
  249. html.touchevents & {
  250. display: inline;
  251. }
  252. }
  253. &-edit {
  254. display: none;
  255. font-size: 18px;
  256. html.touchevents & {
  257. display: inline;
  258. }
  259. }
  260. &-plus {
  261. font-size: 14px;
  262. outline: 0;
  263. }
  264. &-arrow {
  265. color: $sidebar-arrow-color;
  266. font-size: 16px;
  267. font-weight: bold !important;
  268. transition: color $transitions-duration, opacity $transitions-duration;
  269. html.touchevents .editing & {
  270. opacity: 0;
  271. }
  272. }
  273. &-remove {
  274. &, &:visited, &:hover {
  275. position: relative;
  276. color: $sidebar-action-color;
  277. transition: color $transitions-duration;
  278. }
  279. &:hover {
  280. color: $sidebar-hover-action-color;
  281. }
  282. }
  283. }
  284. &-link:hover &-right.collapsible {
  285. display: inline-block;
  286. }
  287. &-link:hover &-right-arrow {
  288. color: $sidebar-hover-arrow-color;
  289. }
  290. .clone {
  291. display: none;
  292. }
  293. .apps-hide {
  294. &-label {
  295. display: none;
  296. }
  297. &.apps-visible .apps-hide-label.apps-visible {
  298. display: inline;
  299. }
  300. &.apps-hidden .apps-hide-label.apps-hidden {
  301. display: inline;
  302. }
  303. }
  304. &-copyright {
  305. background-color: $sidebar-contrast-background-color;
  306. color: $sidebar-contrast-text-color;
  307. height: 32px;
  308. line-height: 32px;
  309. position: absolute;
  310. bottom: 0;
  311. left: 0;
  312. right: 0;
  313. text-align: center;
  314. font-size: 11px;
  315. font-weight: bold;
  316. transition: background-color $transitions-duration, color $transitions-duration;
  317. @include for-mobile {
  318. display: none;
  319. }
  320. }
  321. &-popup {
  322. position: absolute;
  323. top: 0;
  324. bottom: 0;
  325. left: 0;
  326. width: $sidebar-width;
  327. color: $sidebar-popup-text-color;
  328. background-color: $sidebar-popup-background-color;
  329. overflow-y: auto;
  330. @include for-mobile {
  331. min-width: 280px;
  332. max-width: 360px;
  333. width: 80%;
  334. }
  335. &-container {
  336. display: none;
  337. background-color: transparentize($sidebar-popup-overlay-color, 0.5);
  338. position: fixed;
  339. top: 0;
  340. left: $sidebar-width;
  341. bottom: 0;
  342. right: 0;
  343. z-index: 5;
  344. @include for-mobile {
  345. left: 0;
  346. }
  347. }
  348. &-section {
  349. display: none;
  350. }
  351. &-title {
  352. font-size: 12px;
  353. font-weight: bold;
  354. text-transform: uppercase;
  355. padding: 20px;
  356. overflow: hidden;
  357. text-overflow: ellipsis;
  358. white-space: nowrap;
  359. @include for-mobile {
  360. padding: 24px 20px;
  361. margin-bottom: 0;
  362. font-size: 14px;
  363. }
  364. }
  365. &-search {
  366. background-color: $sidebar-popup-search-input-background-color;
  367. color: $sidebar-popup-search-input-text-color;
  368. width: 100%;
  369. height: 32px;
  370. text-indent: 20px;
  371. border: 0;
  372. font-size: 13px;
  373. outline: 0;
  374. padding: 0;
  375. margin: 0 0 12px 0;
  376. border-radius: 0;
  377. //noinspection CssInvalidPseudoSelector
  378. &::placeholder {
  379. color: $sidebar-popup-search-input-placeholder-color;
  380. }
  381. @include for-mobile {
  382. font-size: 14px;
  383. height: 40px;
  384. }
  385. }
  386. &-list {
  387. margin: 0;
  388. padding: 0;
  389. list-style: none;
  390. &-item {
  391. a, a:visited, a:hover {
  392. color: $sidebar-popup-link-text-color;
  393. padding: 8px 20px;
  394. display: block;
  395. overflow: hidden;
  396. text-overflow: ellipsis;
  397. white-space: nowrap;
  398. @include for-mobile {
  399. padding: 12px 20px;
  400. }
  401. }
  402. &.selected a {
  403. background-color: $sidebar-popup-hover-link-background-color;
  404. color: $sidebar-popup-hover-link-color;
  405. }
  406. }
  407. }
  408. }
  409. }