_search.scss 5.2 KB

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