_search.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*************************************************
  2. * Search
  3. **************************************************/
  4. .search-results {
  5. transform: scale(0);
  6. -webkit-transform: scale(0);
  7. background-color: $sta-background;
  8. bottom: 0;
  9. left: 0;
  10. right: 0;
  11. top: 0;
  12. overflow: scroll;
  13. position: fixed;
  14. visibility: hidden;
  15. z-index: -99;
  16. }
  17. .dark .search-results {
  18. background-color: rgb(40, 42, 54);
  19. }
  20. .searching {
  21. overflow: hidden;
  22. }
  23. .searching .search-results {
  24. transform: scale(1);
  25. -webkit-transform: scale(1);
  26. visibility: visible;
  27. z-index: 1031; /* Highest index, higher than navbar. */
  28. }
  29. .searching #search-box #search-query {
  30. width: 100%;
  31. }
  32. .search-results > .container {
  33. padding-top: 70px; /* Navbar height. */
  34. }
  35. @media screen and (max-width: 1200px) {
  36. .search-results > .container {
  37. padding-top: 50px; /* Navbar height. */
  38. }
  39. }
  40. .search-header {
  41. position: -webkit-sticky;
  42. position: sticky;
  43. top: 70px; /* Navbar height. */
  44. background-color: $sta-background;
  45. padding-top: 2rem;
  46. padding-bottom: 1rem;
  47. }
  48. @media screen and (max-width: 1200px) {
  49. .search-header {
  50. top: 50px; /* Navbar height. */
  51. }
  52. }
  53. .dark .search-header {
  54. background-color: rgb(40, 42, 54);
  55. }
  56. .search-header h1 {
  57. margin: 0;
  58. line-height: 1;
  59. }
  60. .col-search-close {
  61. text-align: right;
  62. }
  63. .search-header i {
  64. font-size: 2rem;
  65. line-height: 1;
  66. }
  67. #search-box {
  68. position: relative; /* Required for search icon positioning. */
  69. margin-bottom: 0.5rem;
  70. }
  71. #search-box::before {
  72. font-family: 'Font Awesome 5 Free';
  73. font-weight: 900;
  74. content: "\f002";
  75. font-size: 1rem;
  76. opacity: 0.25;
  77. line-height: 1rem;
  78. position: absolute;
  79. left: 0.7rem;
  80. top: 0.6rem;
  81. overflow-x: hidden;
  82. }
  83. #search-box #search-query {
  84. border: 1px solid #dedede;
  85. border-radius: 1rem;
  86. padding: 1rem 1rem 1rem 2rem; /* Wider left padding for search icon to fit in. */
  87. width: 250px;
  88. line-height: 1rem;
  89. height: 1rem;
  90. font-size: 0.8rem;
  91. }
  92. .search-hit em {
  93. font-style: normal;
  94. background-color: #FFE0B2;
  95. color: #E65100;
  96. border-bottom: 1px solid #E65100;
  97. }
  98. .search-hit-type {
  99. margin-bottom: 0 !important; /* Override .article-metadata margin. */
  100. text-transform: capitalize;
  101. }
  102. .search-hit-description {
  103. font-size: 0.7rem;
  104. }
  105. /* Load more results button - hide when there are no more results. */
  106. #search-hits button[disabled] {
  107. display: none;
  108. }
  109. .form-control:focus {
  110. border-color: $sta-primary;
  111. box-shadow: 0 0 0 .2rem $sta-primary-light;
  112. }