search.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /*=========================================================================================
  2. File Name: search.scss
  3. Description: Search functionality.
  4. ----------------------------------------------------------------------------------------
  5. Item Name: Vuexy - Vuejs, React, Angular, HTML & Laravel Admin Dashboard Template
  6. Author: PIXINVENT
  7. Author URL: http://www.themeforest.net/user/pixinvent
  8. ==========================================================================================*/
  9. .navbar-container {
  10. a.nav-link-search {
  11. float: left;
  12. }
  13. .search-input {
  14. width: 0;
  15. float: left;
  16. display: none;
  17. // select
  18. input {
  19. width: 0;
  20. border: none;
  21. background: none;
  22. transition: all 0.2s ease-out;
  23. line-height: 16px;
  24. padding: 1.6rem 3.6rem;
  25. }
  26. &.open {
  27. position: absolute;
  28. top: 0;
  29. left: 0;
  30. z-index: 1000;
  31. width: 100%;
  32. display: block;
  33. background: $white;
  34. border-radius: 0.5rem;
  35. .search-input-close,
  36. .search-input-icon {
  37. display: block;
  38. }
  39. // select
  40. input {
  41. width: 100%;
  42. outline: none;
  43. background: none;
  44. height: auto;
  45. box-shadow: none;
  46. transition: all 0.3s ease-out;
  47. }
  48. }
  49. .search-list {
  50. max-height: 450px;
  51. height: auto;
  52. position: absolute;
  53. top: 100%;
  54. left: 0;
  55. background: $white;
  56. width: 100%;
  57. margin-top: 0.5rem;
  58. padding-left: 0;
  59. border-radius: $border-radius;
  60. display: none;
  61. @media only screen and (min-device-width: 320px) and (max-device-width: 875px) and (orientation: landscape) {
  62. max-height: 250px;
  63. }
  64. &.search-list-bookmark {
  65. height: auto !important;
  66. i,
  67. svg {
  68. font-size: 1.2rem;
  69. height: 1.2rem;
  70. width: 1.2rem;
  71. }
  72. }
  73. &.show {
  74. display: block;
  75. min-height: 3rem;
  76. }
  77. li {
  78. a {
  79. padding: 0.9rem 1rem;
  80. color: $body-color;
  81. i,
  82. svg[class*='feather feather-'] {
  83. height: 1.25rem;
  84. width: 1.25rem;
  85. font-size: 1.25rem;
  86. }
  87. }
  88. &:first-child {
  89. border-top-left-radius: $border-radius;
  90. border-top-right-radius: $border-radius;
  91. }
  92. &:last-child {
  93. border-bottom-left-radius: $border-radius;
  94. border-bottom-right-radius: $border-radius;
  95. }
  96. &.auto-suggestion {
  97. display: flex;
  98. align-items: center;
  99. cursor: pointer;
  100. &:hover,
  101. &.current_item {
  102. background-color: $body-bg;
  103. }
  104. }
  105. }
  106. }
  107. .search-input-icon {
  108. z-index: 2;
  109. display: none;
  110. position: absolute;
  111. left: 1.5rem;
  112. top: 32%;
  113. cursor: pointer;
  114. i,
  115. svg {
  116. height: 1.25rem;
  117. width: 1.25rem;
  118. font-size: 1.25rem;
  119. }
  120. }
  121. .search-input-close {
  122. z-index: 1;
  123. display: none;
  124. position: absolute;
  125. right: 2rem;
  126. top: 32%;
  127. cursor: pointer;
  128. i,
  129. svg {
  130. height: 1.25rem;
  131. width: 1.25rem;
  132. font-size: 1.25rem;
  133. }
  134. }
  135. }
  136. .bookmark-input {
  137. position: absolute;
  138. top: 102%;
  139. width: 25%;
  140. display: none;
  141. background: $white;
  142. border-radius: $border-radius;
  143. box-shadow: 0 15px 30px 0 rgba($black, 0.11), 0 5px 15px 0 rgba($black, 0.08);
  144. &.show {
  145. display: block;
  146. }
  147. .bookmark-input-icon {
  148. position: absolute;
  149. z-index: 1;
  150. top: 20px;
  151. left: 24px;
  152. }
  153. input {
  154. padding: 0.7rem 0.7rem 0.7rem 2.5rem;
  155. margin: 12px;
  156. width: calc(100% - 24px); // Reduce width by 10*2
  157. background: $white;
  158. border: 1px solid rgba($black, 0.2);
  159. &:focus {
  160. border: 1px solid $primary;
  161. }
  162. }
  163. .search-list {
  164. position: relative; // To consider outer div width
  165. }
  166. }
  167. .bookmark-icon {
  168. cursor: pointer;
  169. }
  170. .dropdown.bookmark-dropdown {
  171. padding: 1.4rem 0.5rem 1.35rem;
  172. .dropdown-toggle:after {
  173. display: none;
  174. }
  175. }
  176. .search-data-title {
  177. line-height: 1.25rem;
  178. }
  179. }
  180. .navbar-dark
  181. // .navbar-semi-light
  182. {
  183. .search-input {
  184. .input {
  185. color: #f5f7fa;
  186. border-radius: 0.5rem;
  187. }
  188. &.open {
  189. .input {
  190. color: #f5f7fa;
  191. border: 1px solid #f5f7fa;
  192. }
  193. }
  194. }
  195. }
  196. // navbar-sticky
  197. .navbar-static {
  198. .navbar-container {
  199. .search-input {
  200. &.open {
  201. border-radius: 0;
  202. }
  203. }
  204. }
  205. }