_search.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. .search-clear {
  19. position: absolute;
  20. z-index: 2;
  21. right: 28px;
  22. width: 24px;
  23. height: 24px;
  24. top: 7px;
  25. color: #999;
  26. padding: 0;
  27. }
  28. .rbt-menu {
  29. li a span {
  30. .page-path {
  31. display: inline;
  32. padding: 0 4px;
  33. color: inherit;
  34. }
  35. .page-list-meta {
  36. font-size: .9em;
  37. color: #999;
  38. >span {
  39. margin-right: .3rem;
  40. }
  41. }
  42. }
  43. }
  44. }
  45. // top and sidebar input styles
  46. .search-top, .search-sidebar {
  47. .search-clear {
  48. top: 3px;
  49. }
  50. .input-group-btn {
  51. position: absolute;
  52. top: 0;
  53. right: 0;
  54. .btn {
  55. padding: 4px 10px;
  56. }
  57. }
  58. // using react-bootstrap-typeahead
  59. // see: https://github.com/ericgio/react-bootstrap-typeahead
  60. .rbt-input.form-control {
  61. background-color: rgba(255, 255, 255, 0.9);
  62. border-radius: 40px;
  63. border-top-right-radius: 40px;
  64. border-bottom-right-radius: 40px;
  65. padding-top: 4px;
  66. height: 30px;
  67. .rbt-input-wrapper {
  68. margin-left: 8px;
  69. }
  70. }
  71. }
  72. // layout
  73. .search-top {
  74. margin-top: 10px;
  75. margin-bottom: 10px;
  76. .rbt-input.form-control {
  77. width: 180px;
  78. transition: 0.3s ease-out;
  79. // focus
  80. &.focus {
  81. width: 300px;
  82. }
  83. }
  84. }
  85. .search-sidebar {
  86. .search-form, .form-group, .rbt-input.form-control, .input-group {
  87. width: 100%;
  88. }
  89. .input-group-btn {
  90. right: 30px;
  91. }
  92. }
  93. .search-result {
  94. .search-result-list {
  95. nav {
  96. padding-right: 0;
  97. &.affix {
  98. top: 8px;
  99. width: 33%;
  100. padding-right: 5px;
  101. padding-bottom: 50px;
  102. height: 100%;
  103. overflow-y: scroll;
  104. }
  105. .nav {
  106. > li {
  107. padding: 0px 10px 0 0;
  108. &.active {
  109. padding-right: 7px;
  110. border-right: solid 3px #666;
  111. background: $gray-light;
  112. }
  113. }
  114. }
  115. }
  116. .search-result-meta {
  117. margin-bottom: 10px;
  118. font-weight: bold;
  119. }
  120. .search-result-list-delete-checkbox {
  121. margin: 0 10px 0 0;
  122. vertical-align: middle;
  123. }
  124. }
  125. .search-result-content {
  126. padding-bottom: 32px;
  127. .search-result-page {
  128. > h2 {
  129. font-size: 20px;
  130. line-height: 1em;
  131. }
  132. &:first-child > h2 {
  133. margin-top: 0;
  134. }
  135. .wiki {
  136. border: solid 1px #ccc;
  137. padding: 16px;
  138. border-radius: 3px;
  139. font-size: 13px;
  140. }
  141. }
  142. }
  143. }