_search.scss 3.4 KB

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