_search.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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: 2;
  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. .input-group-btn {
  54. position: absolute;
  55. top: 0;
  56. right: 0;
  57. .btn {
  58. padding: 4px 10px;
  59. }
  60. }
  61. // using react-bootstrap-typeahead
  62. // see: https://github.com/ericgio/react-bootstrap-typeahead
  63. .rbt-input.form-control {
  64. border: none;
  65. border-radius: 40px;
  66. border-top-right-radius: 40px;
  67. border-bottom-right-radius: 40px;
  68. padding-top: 6px;
  69. height: 30px;
  70. .rbt-input-wrapper {
  71. margin-left: 8px;
  72. }
  73. }
  74. }
  75. // layout
  76. .search-top {
  77. margin-top: 10px;
  78. margin-bottom: 10px;
  79. .rbt-input.form-control {
  80. width: 180px;
  81. transition: 0.3s ease-out;
  82. // focus
  83. &.focus {
  84. width: 300px;
  85. }
  86. }
  87. }
  88. .search-sidebar {
  89. .search-form, .form-group, .rbt-input.form-control, .input-group {
  90. width: 100%;
  91. }
  92. .input-group-btn {
  93. right: 30px;
  94. }
  95. }
  96. .search-result {
  97. .search-result-list {
  98. nav {
  99. padding-right: 0;
  100. &.affix {
  101. top: 8px;
  102. width: 33%;
  103. padding-right: 5px;
  104. padding-bottom: 50px;
  105. height: 100%;
  106. overflow-y: scroll;
  107. }
  108. .nav {
  109. > li {
  110. padding: 2px 8px;
  111. &.active {
  112. padding-right: 5px;
  113. border-right: solid 3px transparent;
  114. }
  115. }
  116. }
  117. }
  118. .search-result-meta {
  119. margin-bottom: 10px;
  120. font-weight: bold;
  121. }
  122. .search-result-list-delete-checkbox {
  123. margin: 0 10px 0 0;
  124. vertical-align: middle;
  125. }
  126. }
  127. .search-result-content {
  128. padding-bottom: 32px;
  129. .search-result-page {
  130. > h2 {
  131. font-size: 20px;
  132. line-height: 1em;
  133. }
  134. &:first-child > h2 {
  135. margin-top: 0;
  136. }
  137. .wiki {
  138. border: solid 1px #ccc;
  139. padding: 16px;
  140. border-radius: 3px;
  141. font-size: 13px;
  142. }
  143. }
  144. }
  145. }