_top-bar.scss 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. @import 'variables';
  2. $top-bar-bg: #2a2929;
  3. .top-bar {
  4. position: fixed;
  5. padding: 0 24px;
  6. background-color: $top-bar-bg;
  7. width: 100%;
  8. top: 0;
  9. height: $top-bar-height;
  10. transition: background-color 0.7s;
  11. z-index: 10;
  12. display: flex;
  13. align-items: center;
  14. .top-bar-content {
  15. display: flex;
  16. flex: 1;
  17. align-items: center;
  18. max-width: $container-max-width;
  19. margin: auto;
  20. }
  21. @media all and (max-width: $sm-breakpoint) {
  22. padding: 12px;
  23. font-size: $font-size-14;
  24. }
  25. &.landing-page {
  26. background-color: transparent;
  27. .right {
  28. a:link,
  29. a:visited {
  30. color: $gray-700;
  31. }
  32. a:hover {
  33. color: $gray-500;
  34. text-decoration: none;
  35. }
  36. }
  37. .submenu .trigger-icon {
  38. filter: invert(0.3);
  39. }
  40. &.floating {
  41. background-color: $top-bar-bg;
  42. .submenu .trigger-icon {
  43. filter: invert(0.8);
  44. }
  45. .right {
  46. a:link,
  47. a:visited {
  48. color: $gray-400;
  49. }
  50. a:hover {
  51. color: $gray-100;
  52. text-decoration: none;
  53. }
  54. }
  55. }
  56. }
  57. .flex-spacer {
  58. flex: 1;
  59. }
  60. .left {
  61. display: flex;
  62. align-items: center;
  63. }
  64. .logo {
  65. img {
  66. max-width: 32px;
  67. margin-right: 12px;
  68. }
  69. display: flex;
  70. align-items: end;
  71. color: $brand-color;
  72. font-size: 18px;
  73. font-size: 24px;
  74. letter-spacing: 0px;
  75. font-weight: 600;
  76. .logotype {
  77. font-family: $brand-font-face;
  78. display: inline-block;
  79. margin-right: 12px;
  80. @media all and (max-width: $sm-breakpoint) {
  81. display: none;
  82. }
  83. }
  84. }
  85. .version-label {
  86. display: inline-block;
  87. background-color: #ffd400;
  88. padding: 3px 6px;
  89. border-radius: 3px;
  90. font-size: 14px;
  91. font-weight: bold;
  92. text-transform: uppercase;
  93. color: #736108;
  94. }
  95. .right {
  96. display: flex;
  97. a {
  98. margin-left: 18px;
  99. }
  100. a:link,
  101. a:visited {
  102. color: $gray-400;
  103. }
  104. a:hover {
  105. color: $gray-100;
  106. text-decoration: none;
  107. }
  108. @media all and (max-width: $sm-breakpoint) {
  109. text-align: right;
  110. a {
  111. margin-left: 12px;
  112. }
  113. }
  114. }
  115. .submenu {
  116. position: relative;
  117. .trigger {
  118. display: flex;
  119. align-items: flex-end;
  120. }
  121. .trigger-icon {
  122. transform: rotateZ(180deg);
  123. width: 12px;
  124. height: 12px;
  125. filter: invert(0.8);
  126. margin-left: 3px;
  127. margin-bottom: 2px;
  128. }
  129. .overlay {
  130. position: absolute;
  131. @media all and (max-width: $sm-breakpoint) {
  132. top: 28px;
  133. }
  134. top: 34px;
  135. right: 0;
  136. border-radius: 2px;
  137. visibility: hidden;
  138. overflow: hidden;
  139. height: 0;
  140. background-color: $top-bar-bg;
  141. padding: $padding-4;
  142. box-shadow: 0px 5px 3px 0px rgba(0, 0, 0, 0.21);
  143. opacity: 0;
  144. a:link,
  145. a:visited {
  146. margin: $padding-16 $padding-8;
  147. color: $gray-400;
  148. }
  149. &.expanded {
  150. visibility: visible;
  151. height: auto;
  152. opacity: 1;
  153. transition: visibility 0s, opacity 0.2s;
  154. }
  155. }
  156. .overlay a {
  157. display: flex;
  158. align-items: center;
  159. // justify-content: space-between;
  160. flex: 1;
  161. .menu-icon {
  162. width: 24px;
  163. height: 24px;
  164. filter: contrast(0);
  165. margin-right: 12px;
  166. }
  167. }
  168. }
  169. .search-input {
  170. display: flex;
  171. }
  172. #searchInput {
  173. width: 100%;
  174. border-radius: 3px;
  175. border: 1px solid $gray-900;
  176. padding: 6px 9px;
  177. background-color: transparentize($gray-300, 0.2);
  178. color: $gray-900;
  179. transition: background-color 0.2s;
  180. margin: 0;
  181. &:focus {
  182. background-color: $gray-300;
  183. }
  184. @media all and (max-width: $sm-breakpoint) {
  185. background-color: $gray-300;
  186. }
  187. }
  188. button.search-icon {
  189. background-color: transparent;
  190. padding: 0;
  191. margin: 0;
  192. border: none;
  193. display: none;
  194. img {
  195. width: 24px;
  196. height: 24px;
  197. }
  198. @media all and (max-width: $sm-breakpoint) {
  199. display: block;
  200. }
  201. }
  202. }