_search.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. height: 100vh;
  155. overflow-y: scroll;
  156. .nav.nav-pills {
  157. > .page-list-li {
  158. > a {
  159. height: 123px;
  160. padding: 2px 4px;
  161. color: $gray-600;
  162. word-break: break-all;
  163. border-radius: 0;
  164. &:hover {
  165. color: inherit;
  166. text-decoration: none;
  167. }
  168. &.active {
  169. padding-right: 5px;
  170. border-left: solid 3px transparent;
  171. }
  172. > * {
  173. margin-right: 3px;
  174. }
  175. }
  176. .page-list-meta {
  177. > span {
  178. margin-right: 12px;
  179. }
  180. .footstamp-icon {
  181. margin-right: 2px;
  182. }
  183. }
  184. }
  185. }
  186. .search-result-meta {
  187. font-weight: bold;
  188. }
  189. .search-result-select-group {
  190. > select {
  191. max-width: 8rem;
  192. }
  193. }
  194. .search-result-list-delete-checkbox {
  195. margin: 0 10px 0 0;
  196. vertical-align: middle;
  197. }
  198. }
  199. .search-result-content {
  200. padding-bottom: 36px;
  201. .search-result-page {
  202. padding-top: 64px;
  203. // adjust for anchor links by the height of fixed .search-page-input
  204. margin-top: -64px;
  205. > h2 {
  206. margin-right: 10px;
  207. font-size: 22px;
  208. line-height: 1em;
  209. }
  210. &:first-child > h2 {
  211. margin-top: 0;
  212. }
  213. .wiki {
  214. padding: 16px;
  215. font-size: 13px;
  216. border: solid 1px $gray-300;
  217. }
  218. }
  219. }
  220. }
  221. // 2021/9/22 TODO: Remove after moving to SearchResult
  222. .search-page-input {
  223. position: sticky;
  224. top: 15px;
  225. // placed at front-most
  226. z-index: 15;
  227. margin-bottom: 15px;
  228. .input-group-btn .btn {
  229. height: 34px;
  230. padding: 0px 10px;
  231. }
  232. }
  233. // support for your search
  234. .grw-search-table {
  235. caption {
  236. display: table-header-group;
  237. }
  238. }
  239. .search-page-item {
  240. height: 130px;
  241. }
  242. @include media-breakpoint-down(sm) {
  243. .grw-search-table {
  244. th {
  245. text-align: right;
  246. }
  247. td {
  248. overflow-wrap: anywhere;
  249. white-space: normal !important;
  250. }
  251. @include media-breakpoint-down(xs) {
  252. th,
  253. td {
  254. display: block;
  255. }
  256. th {
  257. text-align: left;
  258. }
  259. td {
  260. padding-top: 0 !important;
  261. border-top: none !important;
  262. }
  263. }
  264. }
  265. }