_search.scss 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. .search-backdrop {
  2. position: fixed;
  3. right: 0;
  4. left: 0;
  5. bottom: 0;
  6. top: $navbarHeight;
  7. z-index: $zindex-modal-backdrop;
  8. background-color: $black;
  9. @include opacity(75);
  10. }
  11. .search-container {
  12. left: 0;
  13. top: 0;
  14. right: 0;
  15. bottom: 0;
  16. z-index: ($zindex-modal-backdrop + 10);
  17. position: fixed;
  18. }
  19. // Search
  20. .search-dropdown {
  21. display: flex;
  22. flex-direction: column;
  23. height: calc(100% - #{$navbarHeight});
  24. }
  25. .search-dropdown__col_1 {
  26. background: $page-bg;
  27. max-width: 700px;
  28. display: flex;
  29. flex-direction: column;
  30. flex-grow: 1;
  31. height: 100%; // Chrome 74 needs this to make the element scrollable
  32. .search-item--indent {
  33. margin-left: 14px;
  34. }
  35. }
  36. .search-dropdown__col_2 {
  37. flex-grow: 1;
  38. height: 100%;
  39. padding-top: 16px;
  40. display: none;
  41. flex-direction: column;
  42. }
  43. .search-filter-box {
  44. background: $search-filter-box-bg;
  45. border-radius: 2px;
  46. padding: $spacer * 1.5;
  47. min-width: 340px;
  48. margin-bottom: $spacer * 1.5;
  49. }
  50. .search-filter-box__header {
  51. border-bottom: 1px solid $hr-border-color;
  52. margin-bottom: $spacer * 1.5;
  53. }
  54. .search-filter-box-link {
  55. display: block;
  56. margin-bottom: 16px;
  57. &:last-child {
  58. margin-bottom: 0;
  59. }
  60. i,
  61. img {
  62. font-size: 20px;
  63. margin-right: 5px;
  64. }
  65. }
  66. .search-results-scroller {
  67. display: flex;
  68. position: relative;
  69. }
  70. .search-results-container {
  71. display: block;
  72. padding: $spacer;
  73. position: relative;
  74. flex-grow: 10;
  75. margin-bottom: $space-md;
  76. // Fix for search scroller in mobile view
  77. height: unset;
  78. .label-tag {
  79. margin-left: 6px;
  80. font-size: 11px;
  81. padding: 2px 6px;
  82. }
  83. .selected {
  84. .search-result-tag {
  85. opacity: 0.7;
  86. color: white;
  87. }
  88. }
  89. }
  90. .search-section {
  91. background: $panel-bg;
  92. border: $panel-border;
  93. padding: 0px 4px 4px 4px;
  94. margin-bottom: 3px;
  95. border-radius: 5px;
  96. }
  97. .search-section__header {
  98. font-size: $font-size-h6;
  99. padding: 7px 4px 3px 0;
  100. color: $text-color-weak;
  101. display: flex;
  102. flex-grow: 1;
  103. &:hover,
  104. &.selected {
  105. color: $text-color;
  106. }
  107. &:hover {
  108. .search-section__header__link {
  109. opacity: 1;
  110. }
  111. }
  112. }
  113. .search-section__header__icon {
  114. padding: 5px 0px;
  115. width: 43px;
  116. text-align: center;
  117. }
  118. .search-section__header__toggle {
  119. padding: 5px;
  120. }
  121. .search-section__header__text {
  122. flex-grow: 1;
  123. line-height: 24px;
  124. }
  125. .search-section__header__link {
  126. padding: 2px 10px 0;
  127. color: $text-muted;
  128. opacity: 0;
  129. transition: opacity 150ms ease-in-out;
  130. }
  131. .search-item {
  132. @include list-item();
  133. display: flex;
  134. flex-grow: 1;
  135. height: 37px;
  136. white-space: nowrap;
  137. padding: 0px;
  138. &:hover,
  139. &.selected {
  140. background: $list-item-hover-bg;
  141. .search-item__body-title {
  142. color: $text-color-strong;
  143. }
  144. }
  145. }
  146. .search-item__body {
  147. flex: 1 1 auto;
  148. overflow: hidden;
  149. display: flex;
  150. flex-direction: column;
  151. justify-content: center;
  152. padding: 0 10px;
  153. }
  154. .search-item__body-title {
  155. color: $list-item-link-color;
  156. }
  157. .search-item__body-folder-title {
  158. color: $text-color-weak;
  159. font-size: $font-size-xs;
  160. line-height: 11px;
  161. position: relative;
  162. top: -1px;
  163. }
  164. .search-item__icon {
  165. display: flex;
  166. align-items: center;
  167. flex: 0 0 auto;
  168. font-size: 19px;
  169. padding: 0 2px 0 10px;
  170. }
  171. .search-item__tags {
  172. display: none;
  173. padding: 10px;
  174. }
  175. .search-item__actions {
  176. flex: 0 0 auto;
  177. padding: 0 10px 0 0;
  178. }
  179. .search-item__actions__item {
  180. display: inline-block;
  181. opacity: 0;
  182. width: 0;
  183. transition: all 0.2s ease-in-out;
  184. .fa-star,
  185. .fa-star-o {
  186. color: $orange;
  187. line-height: 37px;
  188. }
  189. }
  190. .search-item:hover {
  191. .search-item__actions__item {
  192. width: 15px;
  193. opacity: 1;
  194. }
  195. }
  196. .search-button-row {
  197. text-align: center;
  198. padding: $spacer * 2 $spacer;
  199. background: $panel-bg;
  200. }
  201. @include media-breakpoint-up(md) {
  202. .search-container {
  203. left: $side-menu-width;
  204. }
  205. .search-item__tags {
  206. display: block;
  207. }
  208. .search-dropdown__col_2 {
  209. display: flex;
  210. margin-bottom: $space-md;
  211. }
  212. }
  213. @include media-breakpoint-up(md) {
  214. .search-dropdown__col_2 {
  215. flex-direction: row;
  216. justify-content: space-between;
  217. max-width: 700px;
  218. height: 260px;
  219. align-items: flex-start;
  220. }
  221. .search-filter-box {
  222. margin: 0;
  223. }
  224. }
  225. @include media-breakpoint-up(lg) {
  226. .search-dropdown {
  227. flex-direction: row;
  228. }
  229. .search-dropdown__col_2 {
  230. flex-direction: column;
  231. }
  232. .search-filter-box {
  233. margin-left: $spacer * 1.5;
  234. margin-bottom: $spacer * 1.5;
  235. }
  236. }