_search.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. &.search-item-dash-home .search-result-icon::before {
  105. content: "\f015";
  106. }
  107. &:hover,
  108. &.selected {
  109. background-color: $tight-form-func-bg;
  110. @include left-brand-border-gradient();
  111. }
  112. }
  113. .search-result-tags {
  114. float: right;
  115. }
  116. .search-result-actions {
  117. float: right;
  118. padding-left: 20px;
  119. }
  120. }
  121. .search-button-row {
  122. padding: $spacer*2;
  123. display: flex;
  124. flex-direction: row;
  125. align-items: flex-start;
  126. justify-content: space-around;
  127. height: 30%;
  128. button, a {
  129. margin-bottom: $spacer;
  130. }
  131. .search-button-row-explore-link {
  132. color: $gray-3;
  133. font-size: $font-size-sm;
  134. position: relative;
  135. top: 1.0rem;
  136. &:hover {
  137. color: $link-hover-color;
  138. }
  139. img {
  140. vertical-align: text-bottom;
  141. }
  142. }
  143. }
  144. @include media-breakpoint-up(lg) {
  145. .search-dropdown {
  146. flex-direction: row;
  147. }
  148. .search-button-row {
  149. flex-direction: column;
  150. justify-content: flex-start;
  151. }
  152. }
  153. @include media-breakpoint-up(md) {
  154. .search-container {
  155. left: 78px;
  156. }
  157. }