_search.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. .search-listpage-icon {
  2. font-size: 16px;
  3. color: $gray-400;
  4. }
  5. .search-listpage-clear {
  6. position: absolute;
  7. right: 8px;
  8. display: none;
  9. width: 22px;
  10. height: 22px;
  11. padding: 8px;
  12. font-size: 0.6em;
  13. color: $gray-300;
  14. }
  15. .search-typeahead {
  16. position: relative;
  17. width: 100%;
  18. .search-clear {
  19. position: absolute;
  20. top: 5px;
  21. right: 4px;
  22. z-index: 3;
  23. width: 24px;
  24. height: 24px;
  25. padding: 0;
  26. color: $gray-400;
  27. }
  28. .rbt-menu {
  29. max-height: none !important;
  30. margin-top: 3px;
  31. @extend .dropdown-menu-right;
  32. @extend .dropdown-menu-md-left;
  33. @include media-breakpoint-down(sm) {
  34. left: auto !important;
  35. width: 90vw;
  36. }
  37. li a span {
  38. .page-path {
  39. display: inline;
  40. padding: 0 4px;
  41. color: inherit;
  42. }
  43. .page-list-meta {
  44. font-size: 0.9em;
  45. color: $gray-400;
  46. > span {
  47. margin-right: 0.3rem;
  48. }
  49. }
  50. }
  51. }
  52. }
  53. // input styles
  54. .grw-global-search {
  55. .search-clear {
  56. top: 3px;
  57. right: 26px;
  58. }
  59. .dropdown-toggle {
  60. min-width: 95px;
  61. padding-left: 1.5rem;
  62. border-top-left-radius: 40px;
  63. border-bottom-left-radius: 40px;
  64. }
  65. .search-typeahead {
  66. // corner radius
  67. border-top-right-radius: 40px;
  68. border-bottom-right-radius: 40px;
  69. .rbt-input-main {
  70. padding-right: 58px;
  71. // corner radius
  72. border-top-right-radius: 40px;
  73. border-bottom-right-radius: 40px;
  74. }
  75. }
  76. // using react-bootstrap-typeahead
  77. // see: https://github.com/ericgio/react-bootstrap-typeahead
  78. .rbt-input.form-control {
  79. height: 30px;
  80. .rbt-input-wrapper {
  81. margin-left: 8px;
  82. }
  83. }
  84. .form-group:not(.has-error) {
  85. .rbt-input.form-control {
  86. border: none;
  87. }
  88. }
  89. .btn-group-submit-search {
  90. position: absolute;
  91. top: 0;
  92. right: 0;
  93. z-index: 3;
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. width: 32px;
  98. height: 32px;
  99. }
  100. }
  101. // layout
  102. .grw-global-search-top {
  103. // centering on navbar
  104. top: $grw-navbar-height / 2;
  105. left: 50vw;
  106. z-index: $zindex-fixed + 1;
  107. transform: translate(-50%, -50%);
  108. .rbt-input.form-control {
  109. width: 200px;
  110. transition: 0.3s ease-out;
  111. // focus
  112. &.focus {
  113. width: 300px;
  114. }
  115. @include media-breakpoint-up(md) {
  116. width: 300px;
  117. }
  118. @include media-breakpoint-up(lg) {
  119. // focus
  120. &.focus {
  121. width: 400px;
  122. }
  123. }
  124. @include media-breakpoint-up(xl) {
  125. width: 350px;
  126. // focus
  127. &.focus {
  128. width: 450px;
  129. }
  130. }
  131. }
  132. .search-typeahead {
  133. border-radius: 0 25px 25px 0;
  134. }
  135. }
  136. .search-result {
  137. .search-result-list {
  138. position: sticky;
  139. top: 64px;
  140. height: 100vh;
  141. overflow-y: scroll;
  142. .nav.nav-pills {
  143. > li {
  144. > a {
  145. padding: 2px 8px;
  146. border-radius: 0;
  147. &:hover {
  148. color: inherit;
  149. text-decoration: none;
  150. }
  151. &.active {
  152. padding-right: 5px;
  153. border-right: solid 3px transparent;
  154. }
  155. > * {
  156. margin-right: 3px;
  157. }
  158. }
  159. }
  160. }
  161. .search-result-meta {
  162. margin-bottom: 10px;
  163. font-weight: bold;
  164. }
  165. .search-result-list-delete-checkbox {
  166. margin: 0 10px 0 0;
  167. vertical-align: middle;
  168. }
  169. }
  170. .search-result-content {
  171. padding-bottom: 36px;
  172. .search-result-page {
  173. padding-top: 64px;
  174. // adjust for anchor links by the height of fixed .search-page-input
  175. margin-top: -64px;
  176. > h2 {
  177. margin-right: 10px;
  178. font-size: 22px;
  179. line-height: 1em;
  180. }
  181. &:first-child > h2 {
  182. margin-top: 0;
  183. }
  184. .wiki {
  185. padding: 16px;
  186. font-size: 13px;
  187. border: solid 1px $gray-300;
  188. }
  189. }
  190. }
  191. }
  192. .search-page-input {
  193. position: sticky;
  194. top: 15px;
  195. // placed at front-most
  196. z-index: 15;
  197. margin-bottom: 15px;
  198. .input-group-btn .btn {
  199. height: 34px;
  200. padding: 0px 10px;
  201. }
  202. }
  203. // support for your search
  204. .grw-search-table {
  205. caption {
  206. display: table-header-group;
  207. }
  208. }
  209. @include media-breakpoint-down(sm) {
  210. .grw-search-table {
  211. th {
  212. text-align: right;
  213. }
  214. td {
  215. overflow-wrap: anywhere;
  216. white-space: normal !important;
  217. }
  218. @include media-breakpoint-down(xs) {
  219. th,
  220. td {
  221. display: block;
  222. }
  223. th {
  224. text-align: left;
  225. }
  226. td {
  227. padding-top: 0 !important;
  228. border-top: none !important;
  229. }
  230. }
  231. }
  232. }