_nav.scss 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. #sidebar-toggle {
  2. display: none;
  3. @include breakpoint(mobile-only) {
  4. display: inline-block;
  5. }
  6. }
  7. #sidebar {
  8. @extend .default-animation;
  9. background-color: $sidebar-bg;
  10. position: fixed;
  11. top: 0;
  12. width: $sidebar-width;
  13. bottom: 0;
  14. left: 0;
  15. font-weight: $font-weight-medium;
  16. font-size: 15px;
  17. a {
  18. color: $sidebar-link;
  19. &:hover {
  20. color: lighten($sidebar-link, 10%);
  21. }
  22. &.subtitle {
  23. color: rgba($sidebar-link, 0.6);
  24. }
  25. }
  26. hr {
  27. border-bottom: 1px solid darken($sidebar-bg, 3%);
  28. }
  29. a.padding {
  30. padding: 0 1rem;
  31. }
  32. h5 {
  33. margin: 2rem 0 0;
  34. position: relative;
  35. line-height: 2;
  36. a {
  37. display: block;
  38. margin-left: 0;
  39. margin-right: 0;
  40. padding-left: 1rem;
  41. padding-right: 1rem;
  42. }
  43. i {
  44. color: rgba($sidebar-link, 0.6);
  45. position: absolute;
  46. right: 0.6rem;
  47. top: 0.7rem;
  48. font-size: 80%;
  49. }
  50. &.parent {
  51. a {
  52. background: darken($sidebar-bg, 7%);
  53. color: lighten($sidebar-link, 5%) !important;
  54. }
  55. }
  56. &.active {
  57. a {
  58. background: $white;
  59. color: $core-text !important;
  60. }
  61. i {
  62. color: $core-text !important;
  63. }
  64. }
  65. }
  66. h5 + ul.topics {
  67. display: none;
  68. margin-top: 0;
  69. }
  70. h5.parent, h5.active {
  71. + ul.topics {
  72. display: block;
  73. }
  74. }
  75. ul {
  76. @extend .default-animation;
  77. list-style: none;
  78. padding: 0;
  79. margin: 0;
  80. &.searched {
  81. a {
  82. color: darken($sidebar-link, 20%);
  83. }
  84. .search-match {
  85. a {
  86. color: lighten($sidebar-link, 10%);
  87. &:hover {
  88. color: lighten($sidebar-link, 20%);
  89. }
  90. }
  91. }
  92. }
  93. &.topics {
  94. margin: 0 1rem;
  95. &.searched {
  96. ul {
  97. display: block;
  98. }
  99. }
  100. ul {
  101. display: none;
  102. padding-bottom: 1rem;
  103. ul {
  104. padding-bottom: 0;
  105. }
  106. }
  107. li.parent ul, > li.active ul {
  108. display: block;
  109. }
  110. > li {
  111. > a {
  112. line-height: 2rem;
  113. font-size: 1.1rem;
  114. b {
  115. opacity: 0.5;
  116. font-weight: normal;
  117. }
  118. .fa {
  119. margin-top: 9px;
  120. }
  121. }
  122. &.parent, &.active {
  123. background: darken($sidebar-bg, 5%);
  124. margin-left: -1rem;
  125. margin-right: -1rem;
  126. padding-left: 1rem;
  127. padding-right: 1rem;
  128. }
  129. }
  130. }
  131. li.active > a {
  132. background: $white;
  133. color: $core-text !important;
  134. margin-left: -1rem;
  135. margin-right: -1rem;
  136. padding-left: 1rem;
  137. padding-right: 1rem;
  138. }
  139. li {
  140. padding: 0;
  141. &.visited + span {
  142. margin-right: 16px;
  143. }
  144. a {
  145. display: block;
  146. padding: 2px 0;
  147. span {
  148. text-overflow: ellipsis;
  149. overflow: hidden;
  150. white-space: nowrap;
  151. display: block;
  152. }
  153. }
  154. > a {
  155. padding: 4px 0;
  156. }
  157. .fa {
  158. display: none;
  159. float: right;
  160. font-size: 13px;
  161. min-width: 16px;
  162. margin: 4px 0 0 0;
  163. text-align: right;
  164. }
  165. &.visited {
  166. > a .read-icon {
  167. color: $core-accent;
  168. display: inline;
  169. }
  170. }
  171. li {
  172. padding-left: 1rem;
  173. text-indent: 0.2rem;
  174. }
  175. }
  176. }
  177. }