_search.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. // import react-bootstrap-typeahead
  2. @import '~react-bootstrap-typeahead/css/Typeahead';
  3. .search-listpage-icon {
  4. font-size: 16px;
  5. color: #999;
  6. }
  7. .search-listpage-clear {
  8. position: absolute;
  9. right: 8px;
  10. display: none;
  11. width: 22px;
  12. height: 22px;
  13. padding: 8px;
  14. font-size: 0.6em;
  15. color: #ccc;
  16. }
  17. .search-typeahead {
  18. position: relative;
  19. .search-clear {
  20. position: absolute;
  21. top: 4px;
  22. right: 4px;
  23. z-index: 3;
  24. width: 24px;
  25. height: 24px;
  26. padding: 0;
  27. color: #999;
  28. }
  29. .rbt-menu {
  30. max-height: none !important;
  31. margin-top: 3px;
  32. li a span {
  33. .page-path {
  34. display: inline;
  35. padding: 0 4px;
  36. color: inherit;
  37. }
  38. .page-list-meta {
  39. font-size: 0.9em;
  40. color: #999;
  41. > span {
  42. margin-right: 0.3rem;
  43. }
  44. }
  45. }
  46. }
  47. }
  48. // top and sidebar input styles
  49. .search-top,
  50. .search-sidebar {
  51. .search-clear {
  52. top: 3px;
  53. right: 26px;
  54. }
  55. .btn-group-dropdown-scope .dropdown-toggle {
  56. min-width: 95px;
  57. height: 30px;
  58. padding-top: 4px;
  59. padding-right: 4px;
  60. padding-bottom: 4px;
  61. border-top-left-radius: 40px;
  62. border-bottom-left-radius: 40px;
  63. }
  64. // using react-bootstrap-typeahead
  65. // see: https://github.com/ericgio/react-bootstrap-typeahead
  66. .rbt-input.form-control {
  67. height: 30px;
  68. border: none;
  69. border-top-right-radius: 40px;
  70. border-bottom-right-radius: 40px;
  71. .rbt-input-wrapper {
  72. margin-left: 8px;
  73. }
  74. }
  75. .btn-group-submit-search {
  76. position: absolute;
  77. top: 0;
  78. right: 0;
  79. .btn {
  80. padding: 4px 10px;
  81. }
  82. z-index: 3;
  83. }
  84. }
  85. // layout
  86. .search-top {
  87. margin-top: 10px;
  88. margin-bottom: 10px;
  89. .rbt-input.form-control {
  90. width: 200px;
  91. transition: 0.3s ease-out;
  92. // focus
  93. &.focus {
  94. width: 300px;
  95. }
  96. }
  97. }
  98. .search-sidebar {
  99. .search-form,
  100. .form-group,
  101. .rbt-input.form-control,
  102. .input-group {
  103. width: 100%;
  104. }
  105. .btn-group-submit-search {
  106. right: 30px;
  107. }
  108. }
  109. @mixin search-typeahead-rbtmenu-mt($margin-top) {
  110. .search-typeahead .rbt-menu {
  111. margin-top: $margin-top; // DIRTY HACK
  112. // note: 'transform: translate3d(0px, XXpx, 0px)' calculation has failed
  113. // since upgrade react-bootstrap-typeahead to v3.3.2 -- 2019.02.05 Yuki Takei
  114. }
  115. }
  116. #search-top,
  117. #renamePage,
  118. #duplicatePage,
  119. .search-page-input {
  120. @include search-typeahead-rbtmenu-mt(36px);
  121. }
  122. .search-result {
  123. .search-result-list {
  124. nav {
  125. padding-right: 0;
  126. &.affix {
  127. top: 64px;
  128. width: 33%;
  129. height: 100%;
  130. padding-right: 5px;
  131. padding-bottom: 50px;
  132. overflow-y: scroll;
  133. }
  134. .nav {
  135. > li {
  136. padding: 2px 8px;
  137. &.active {
  138. padding-right: 5px;
  139. border-right: solid 3px transparent;
  140. }
  141. }
  142. }
  143. }
  144. .search-result-meta {
  145. margin-bottom: 10px;
  146. font-weight: bold;
  147. }
  148. .search-result-list-delete-checkbox {
  149. margin: 0 10px 0 0;
  150. vertical-align: middle;
  151. }
  152. }
  153. .search-result-content {
  154. padding-bottom: 32px;
  155. .search-result-page {
  156. padding-top: 48px;
  157. // adjust for anchor links by the height of fixed .search-page-input
  158. margin-top: -48px;
  159. > h2 {
  160. margin-right: 10px;
  161. font-size: 22px;
  162. line-height: 1em;
  163. }
  164. &:first-child > h2 {
  165. margin-top: 0;
  166. }
  167. .wiki {
  168. padding: 16px;
  169. font-size: 13px;
  170. border: solid 1px #ccc;
  171. border-radius: 3px;
  172. }
  173. }
  174. }
  175. }
  176. .search-page-input {
  177. position: sticky;
  178. top: 0;
  179. z-index: 99;
  180. // for sticky layout
  181. padding-top: 15px;
  182. margin-bottom: 15px;
  183. .input-group-btn .btn {
  184. height: 34px;
  185. padding: 0px 10px;
  186. }
  187. }