_search.scss 4.9 KB

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