_search.scss 4.4 KB

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