_search.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. @import "./page_list";
  2. .search-listpage-icon {
  3. font-size: 16px;
  4. color: #999;
  5. }
  6. .search-listpage-clear {
  7. z-index: 3;
  8. display: none;
  9. position: absolute;
  10. right: 8px;
  11. z-index: 10;
  12. font-size: 0.6em;
  13. width: 22px;
  14. height: 22px;
  15. color: #ccc;
  16. padding: 8px;
  17. }
  18. .search-input-group {
  19. display: inline-block;
  20. margin-left: 20px;
  21. margin-bottom: 0;
  22. width: 200px;
  23. vertical-align: bottom;
  24. }
  25. .search-top {
  26. flex-grow: 1;
  27. display: flex;
  28. %flexgrow {
  29. flex-grow: 1;
  30. display: flex;
  31. }
  32. // set flex-grow
  33. .search-box {
  34. @extend %flexgrow;
  35. .form-group {
  36. @extend %flexgrow;
  37. }
  38. .input-group {
  39. @extend %flexgrow;
  40. }
  41. }
  42. .search-top-input-group {
  43. // using react-bootstrap-typeahead
  44. // see: https://github.com/ericgio/react-bootstrap-typeahead
  45. .bootstrap-typeahead {
  46. @extend %flexgrow;
  47. max-width: 480px;
  48. .bootstrap-typeahead-input {
  49. @extend %flexgrow;
  50. input {
  51. @extend %flexgrow;
  52. }
  53. }
  54. }
  55. .input-group-btn {
  56. flex-basis: 39px;
  57. }
  58. .search-top-clear {
  59. position: absolute;
  60. right: 40px;
  61. z-index: 10;
  62. width: 22px;
  63. height: 22px;
  64. top: 7px;
  65. color: #ccc;
  66. padding: 0;
  67. }
  68. }
  69. // using react-bootstrap-typeahead
  70. // see: https://github.com/ericgio/react-bootstrap-typeahead
  71. .bootstrap-typeahead-menu {
  72. li a span {
  73. .picture {
  74. width: 14px;
  75. height: 14px;
  76. }
  77. .page-path {
  78. display: inline;
  79. padding: 0 4px;
  80. color: inherit;
  81. }
  82. .page-list-meta {
  83. font-size: .9em;
  84. color: #999;
  85. >span {
  86. margin-right: .3rem;
  87. }
  88. }
  89. }
  90. }
  91. }
  92. .search-result {
  93. .search-result-list {
  94. nav {
  95. &.affix {
  96. top: 8px;
  97. width: 32%;
  98. padding-right: 0;
  99. padding-bottom: 50px;
  100. height: 100%;
  101. overflow-y: scroll;
  102. }
  103. .nav {
  104. > li {
  105. padding: 0px 11px 0 8px;
  106. &.active {
  107. padding: 0px 8px;
  108. border-right: solid 3px #666;
  109. background: #f0f0f0;
  110. }
  111. }
  112. }
  113. }
  114. }
  115. .search-result-content {
  116. padding-bottom: 32px;
  117. .search-result-meta {
  118. margin-bottom: 16px;
  119. font-weight: bold;
  120. }
  121. .search-result-page {
  122. > h2 {
  123. font-size: 20px;
  124. }
  125. &:first-child > h2 {
  126. margin-top: 0;
  127. }
  128. .wiki {
  129. border: solid 1px #ccc;
  130. padding: 16px;
  131. border-radius: 3px;
  132. font-size: 13px;
  133. }
  134. }
  135. }
  136. }
  137. // Smartphone and Tablet
  138. @media (max-width: $screen-sm-max) {
  139. .search-top {
  140. padding: 0;
  141. margin-right: 0;
  142. border-style: none !important;
  143. box-shadow: none !important;
  144. -webkit-box-shadow: none !important;
  145. }
  146. .search-result {
  147. .search-result-content {
  148. .search-result-page {
  149. .wiki {
  150. h1, h2, h3, h4, h5, h6 {
  151. font-size: medium;
  152. }
  153. height: 250px;
  154. overflow: scroll;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. // Smartphone
  161. @media (max-width: $screen-xs-max) {
  162. .search-top {
  163. .search-top-input-group {
  164. .btn {
  165. z-index: 10;
  166. }
  167. }
  168. }
  169. }