_search.less 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /**
  2. * This file provides styles for the search results page (?do=search)
  3. * and the AJAX search popup.
  4. */
  5. /* general
  6. ********************************************************************/
  7. /* search hit in normal text */
  8. .dokuwiki .search_hit {
  9. color: @ini_text;
  10. background-color: __highlight__;
  11. }
  12. /* "nothing found" at search + media */
  13. .dokuwiki div.nothing {
  14. margin-bottom: 1.4em;
  15. }
  16. /* search results page
  17. ********************************************************************/
  18. /*____________ advanced search form ____________*/
  19. .dokuwiki .search-results-form fieldset.search-form {
  20. width: 100%;
  21. margin: 1em 0;
  22. input[name="q"] {
  23. width: 50%;
  24. }
  25. button.toggleAssistant {
  26. float: right;
  27. }
  28. .advancedOptions {
  29. padding: 1em 0;
  30. > div {
  31. display: inline-block;
  32. position: relative;
  33. margin: 0 0.5em;
  34. }
  35. div.toggle {
  36. // default closed toggle state
  37. div.current {
  38. cursor: pointer;
  39. max-width: 10em;
  40. white-space: nowrap;
  41. overflow: hidden;
  42. text-overflow: ellipsis;
  43. &::after {
  44. content: '▼';
  45. font-size: smaller;
  46. color: @ini_text_alt;
  47. }
  48. }
  49. div.changed {
  50. font-weight: bold;
  51. }
  52. ul {
  53. display: none;
  54. position: absolute;
  55. border: 1px solid @ini_border;
  56. background-color: @ini_background;
  57. padding: 0.25em 0.5em;
  58. text-align: left;
  59. min-width: 10em;
  60. max-width: 15em;
  61. max-height: 50vh;
  62. overflow: auto;
  63. z-index: 100;
  64. li {
  65. margin: 0.25em 0;
  66. list-style: none;
  67. a {
  68. display: block;
  69. }
  70. }
  71. }
  72. // open toggle state
  73. &.open {
  74. div.current::after {
  75. content: '▲';
  76. }
  77. ul {
  78. display: block;
  79. }
  80. }
  81. }
  82. }
  83. }
  84. [dir=rtl] .search-results-form fieldset.search-form .advancedOptions {
  85. div.toggle ul {
  86. text-align: right;
  87. }
  88. }
  89. /*____________ matching pagenames ____________*/
  90. .dokuwiki div.search_quickresult {
  91. margin-bottom: 1.4em;
  92. ul {
  93. padding: 0;
  94. li {
  95. float: left;
  96. width: 12em;
  97. margin: 0 1.5em;
  98. }
  99. }
  100. }
  101. [dir=rtl] .dokuwiki div.search_quickresult ul li {
  102. float: right;
  103. }
  104. /*____________ search results ____________*/
  105. .dokuwiki dl.search_results {
  106. margin-bottom: 1.2em;
  107. /* search heading */
  108. dt {
  109. font-weight: normal;
  110. margin-bottom: .2em;
  111. }
  112. /* last modified line */
  113. dd.meta {
  114. margin: 0 0 .2em 0;
  115. }
  116. /* search snippet */
  117. dd.snippet {
  118. color: @ini_text_alt;
  119. background-color: inherit;
  120. margin: 0 0 1.2em 0;
  121. /* search hit in search results */
  122. strong.search_hit {
  123. font-weight: normal;
  124. /* color is set in general */
  125. }
  126. /* ellipsis separating snippets */
  127. .search_sep {
  128. color: @ini_text;
  129. background-color: inherit;
  130. }
  131. }
  132. }
  133. /* AJAX quicksearch popup
  134. ********************************************************************/
  135. .dokuwiki form.search {
  136. div.no {
  137. position: relative;
  138. }
  139. /* .JSpopup */
  140. div.ajax_qsearch {
  141. position: absolute;
  142. top: 0;
  143. left: -13.5em; /* -( width of #qsearch__in + padding of .ajax_qsearch + a bit more ) */
  144. width: 12em;
  145. padding: 0.5em;
  146. font-size: .9em;
  147. z-index: 20;
  148. text-align: left;
  149. display: none;
  150. strong {
  151. display: block;
  152. margin-bottom: .3em;
  153. }
  154. ul {
  155. margin: 0 !important;
  156. padding: 0 !important;
  157. li {
  158. margin: 0;
  159. padding: 0;
  160. display: block !important;
  161. }
  162. }
  163. }
  164. }
  165. [dir=rtl] .dokuwiki form.search div.ajax_qsearch {
  166. left: auto;
  167. right: -13.5em;
  168. text-align: right;
  169. }