sidebar.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. .sidebar-section {
  2. order: 1;
  3. flex: 20%;
  4. max-width: 20%;
  5. @include transition();
  6. .sidebar-holder {
  7. top: 2.5rem;
  8. position: sticky;
  9. background-color: get-light-color('bg-primary');
  10. height: 100vh;
  11. overflow: auto;
  12. box-shadow: $box-shadow;
  13. @include transition();
  14. .sidebar {
  15. background: get-light-color('bg-primary');
  16. height: 100vh;
  17. @include transition();
  18. #search-box {
  19. margin-left: 5%;
  20. margin-right: 5%;
  21. width: -webkit-fill-available;
  22. height: 35px;
  23. padding-left: 15px;
  24. margin-top: 30px;
  25. margin-bottom: 10px;
  26. border-radius: 5px;
  27. background-color: get-light-color('bg-secondary');
  28. @include transition();
  29. border: 1px solid rgba(get-light-color('accent-color'), 0.1);
  30. &:focus {
  31. border: 1pt solid get-light-color('accent-color');
  32. outline: none;
  33. }
  34. }
  35. #list-heading {
  36. padding-left: 0px !important;
  37. }
  38. .sidebar-tree {
  39. padding-left: 1rem;
  40. position: relative;
  41. width: -moz-max-content;
  42. width: max-content;
  43. .tree {
  44. margin: 0;
  45. padding: 0;
  46. list-style: none;
  47. li {
  48. margin: 0;
  49. padding: 0 1em;
  50. line-height: 2em;
  51. color: get-light-color('heading-color');
  52. position: relative;
  53. i {
  54. color: get-light-color('heading-color');
  55. font-size: 12px;
  56. margin-right: 5px;
  57. }
  58. }
  59. .shift-right {
  60. margin-left: 5px;
  61. }
  62. .subtree {
  63. padding-left: 0.7rem;
  64. &:before {
  65. content: '';
  66. display: block;
  67. width: 0;
  68. position: absolute;
  69. top: 2.5rem;
  70. left: 1.5rem;
  71. bottom: 0.9rem;
  72. border-left: 1px solid get-light-color('text-color');
  73. }
  74. li {
  75. &:before {
  76. content: '';
  77. display: block;
  78. width: 18px;
  79. height: 0;
  80. border-top: 1px solid get-light-color('text-color');
  81. margin-top: -1px;
  82. position: absolute;
  83. top: 18px;
  84. left: -2px;
  85. }
  86. &:last-child:before {
  87. background: get-light-color('bg-primary');
  88. height: auto;
  89. top: 1.1rem;
  90. bottom: 0;
  91. }
  92. ul {
  93. position: relative;
  94. padding-left: 0.5rem;
  95. display: none;
  96. list-style: none;
  97. &.active {
  98. display: block;
  99. }
  100. &:before {
  101. content: '';
  102. display: block;
  103. width: 0;
  104. position: absolute;
  105. top: -8px;
  106. left: 6px;
  107. bottom: 0.8rem;
  108. border-left: 1px solid;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. @include media('<=ultra-large') {
  118. flex: 15%;
  119. max-width: 15%;
  120. .sidebar-holder {
  121. max-width: 100%;
  122. }
  123. }
  124. @include media('<=extra-large') {
  125. .sidebar-holder {
  126. max-width: 20rem;
  127. }
  128. }
  129. @include media('<=very-large') {
  130. .sidebar-tree {
  131. margin-left: 1rem;
  132. }
  133. }
  134. @include media('<very-large') {
  135. flex: 0%;
  136. max-width: 0%;
  137. min-height: 100vh;
  138. @include transition();
  139. .sidebar-holder {
  140. position: sticky;
  141. top: 2.5rem;
  142. width: 100%;
  143. padding-bottom: 1rem;
  144. max-height: calc(100vh - 2.5rem);
  145. }
  146. &.expanded {
  147. flex: 30%;
  148. max-width: 30%;
  149. margin-right: 0.5rem;
  150. @include transition();
  151. }
  152. }
  153. @include media('<=medium') {
  154. flex: 0%;
  155. max-width: 0%;
  156. min-height: 100vh;
  157. @include transition();
  158. .sidebar-holder {
  159. position: sticky;
  160. top: 2.5rem;
  161. width: 100%;
  162. }
  163. &.expanded {
  164. flex: 40%;
  165. max-width: 40%;
  166. margin-right: 0.5rem;
  167. @include transition();
  168. }
  169. }
  170. @include media('<=small') {
  171. width: 100%;
  172. min-height: 0;
  173. max-height: 0;
  174. max-width: 100%;
  175. @include transition();
  176. .sidebar-holder {
  177. max-height: 0;
  178. height: -moz-fit-content;
  179. height: fit-content;
  180. overflow: hidden;
  181. max-width: 100%;
  182. @include transition();
  183. .sidebar {
  184. position: relative;
  185. height: -moz-fit-content;
  186. height: fit-content;
  187. max-height: -moz-fit-content;
  188. max-height: fit-content;
  189. width: 100vw;
  190. min-height: 0;
  191. overflow: hidden;
  192. @include transition();
  193. .sidebar-tree {
  194. margin-left: 0rem;
  195. max-height: 0;
  196. @include transition();
  197. }
  198. }
  199. }
  200. &.expanded {
  201. margin-top: 2rem;
  202. position: relative;
  203. height: -moz-fit-content;
  204. height: fit-content;
  205. flex: none;
  206. max-height: 300vh;
  207. max-width: 100%;
  208. @include transition();
  209. .sidebar-holder {
  210. max-height: 200vh;
  211. @include transition();
  212. .sidebar-tree {
  213. max-height: 200vh;
  214. @include transition();
  215. }
  216. }
  217. }
  218. }
  219. }
  220. .feather-plus-circle,
  221. .feather-minus-circle {
  222. width: 1rem;
  223. height: 1rem;
  224. }
  225. html[data-theme='dark'] {
  226. .sidebar-section {
  227. .sidebar-holder {
  228. background-color: get-dark-color('bg-primary');
  229. .sidebar {
  230. background: get-dark-color('bg-primary');
  231. #search-box {
  232. background-color: get-dark-color('bg-secondary');
  233. border: 1px solid rgba(get-dark-color('accent-color'), 0.1);
  234. &:focus {
  235. border: 1pt solid get-dark-color('accent-color');
  236. }
  237. }
  238. .sidebar-tree {
  239. .tree {
  240. li {
  241. color: get-dark-color('heading-color');
  242. i {
  243. color: get-dark-color('heading-color');
  244. }
  245. }
  246. .subtree {
  247. &:before {
  248. border-left: 1px solid get-dark-color('text-color');
  249. }
  250. li {
  251. &:before {
  252. border-top: 1px solid get-dark-color('text-color');
  253. }
  254. &:last-child:before {
  255. background: get-dark-color('bg-primary');
  256. }
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }