_search.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. .search-backdrop {
  2. position: fixed;
  3. right: 0;
  4. bottom: 0;
  5. left: 0;
  6. top: $navbarHeight;
  7. z-index: $zindex-modal-backdrop;
  8. background-color: $black;
  9. @include opacity(70);
  10. }
  11. .search-container {
  12. left: 0;
  13. top: 0;
  14. right: 0;
  15. bottom: 0;
  16. z-index: ($zindex-modal-backdrop + 10);
  17. position: fixed;
  18. .label-tag {
  19. margin-left: 6px;
  20. font-size: 11px;
  21. padding: 2px 6px;
  22. }
  23. }
  24. // Search
  25. .search-field-wrapper {
  26. width: 100%;
  27. display: flex;
  28. background-color: $navbarButtonBackground;
  29. input {
  30. max-width: 653px;
  31. //padding: 0.5rem 1.5rem 0.5rem 0;
  32. padding: 1rem 1rem 0.75rem 1rem;
  33. height: 51px;
  34. line-height: 51px;
  35. box-sizing: border-box;
  36. outline: none;
  37. background: $side-menu-bg;
  38. background-color: $navbarButtonBackground;
  39. flex-grow: 10;
  40. }
  41. }
  42. .search-field-spacer {
  43. flex-grow: 1;
  44. }
  45. .search-switches {
  46. flex-grow: 1;
  47. padding: 1rem 1rem 0.75rem 1rem;
  48. white-space: nowrap;
  49. }
  50. .search-field-icon {
  51. font-size: $font-size-lg;
  52. padding: 1rem 1rem 0.75rem 1.5rem;
  53. }
  54. .search-dropdown {
  55. display: flex;
  56. flex-direction: column;
  57. max-width: 1100px;
  58. visibility: none;
  59. opacity: 0;
  60. height: 100%;
  61. &--fade-in {
  62. visibility: visible;
  63. opacity: 1;
  64. transition: opacity 0.3s;
  65. }
  66. }
  67. .search-results-container {
  68. height: 90%;
  69. overflow: auto;
  70. display: block;
  71. line-height: 28px;
  72. padding: $spacer;
  73. background: $panel-bg;
  74. flex-grow: 10;
  75. .selected {
  76. .search-result-tag {
  77. opacity: 0.70;
  78. color: white;
  79. }
  80. }
  81. .fa-star, .fa-star-o {
  82. padding-left: 13px;
  83. }
  84. .fa-star {
  85. color: $orange;
  86. }
  87. .search-result-link {
  88. color: $grafanaListMainLinkColor;
  89. .fa {
  90. padding-right: 10px;
  91. }
  92. }
  93. .search-item {
  94. word-wrap: break-word;
  95. display: block;
  96. padding: 3px 10px;
  97. white-space: nowrap;
  98. background-color: $tight-form-bg;
  99. margin-bottom: 4px;
  100. @include left-brand-border();
  101. .search-result-icon::before {
  102. content: "\f009";
  103. }
  104. &:hover {
  105. background-color: $tight-form-func-bg;
  106. @include left-brand-border-gradient();
  107. }
  108. &.selected {
  109. background-color: $grafanaListBackground;
  110. }
  111. }
  112. .search-result-tags {
  113. float: right;
  114. }
  115. .search-result-actions {
  116. float: right;
  117. padding-left: 20px;
  118. }
  119. }
  120. .search-item-child {
  121. margin-left: 20px;
  122. }
  123. .search-item-dash-home > .search-result-link > .search-result-icon::before {
  124. content: "\f015";
  125. }
  126. .search-item-dash-folder > .search-result-link > .search-result-icon::before {
  127. content: "\f07c";
  128. }
  129. .search-button-row {
  130. padding: $spacer*2;
  131. display: flex;
  132. flex-direction: row;
  133. align-items: flex-start;
  134. justify-content: space-around;
  135. height: 30%;
  136. button, a {
  137. margin-bottom: $spacer;
  138. }
  139. .search-button-row-explore-link {
  140. color: $gray-3;
  141. font-size: $font-size-sm;
  142. position: relative;
  143. top: 1.0rem;
  144. &:hover {
  145. color: $link-hover-color;
  146. }
  147. img {
  148. vertical-align: text-bottom;
  149. }
  150. }
  151. }
  152. @include media-breakpoint-up(lg) {
  153. .search-dropdown {
  154. flex-direction: row;
  155. }
  156. .search-button-row {
  157. flex-direction: column;
  158. justify-content: flex-start;
  159. }
  160. }
  161. @include media-breakpoint-up(md) {
  162. .search-container {
  163. left: 78px;
  164. }
  165. }