_header.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. .header {
  2. position: fixed;
  3. height: 49px;
  4. width: 100%;
  5. background: linear-gradient(to bottom, #222222, #1a1a1a);
  6. border-bottom: 1px solid #0f0f0f;
  7. z-index: 1;
  8. transition: transform .3s ease-out;
  9. // Modes -------------------------------------------------------------- //
  10. &--hidden { transform: translateY(-60px); }
  11. &--loading { transform: translateY(2px); }
  12. &--error { transform: translateY(40px); }
  13. &--view {
  14. background: none;
  15. border-bottom: none;
  16. &.header--error { background-color: rgba(10, 10, 10, .99); }
  17. }
  18. // Toolbars -------------------------------------------------------------- //
  19. &__toolbar {
  20. display: none;
  21. align-items: center;
  22. position: relative;
  23. box-sizing: border-box;
  24. width: 100%;
  25. height: 100%;
  26. padding: 0 10px;
  27. &--visible { display: flex; }
  28. }
  29. // Title -------------------------------------------------------------- //
  30. &__title {
  31. width: 100%;
  32. padding: 16px 0;
  33. color: #fff;
  34. font-size: 16px;
  35. font-weight: bold;
  36. text-align: center;
  37. cursor: default;
  38. overflow: hidden;
  39. white-space: nowrap;
  40. text-overflow: ellipsis;
  41. .iconic {
  42. display: none;
  43. margin: 0 0 0 5px;
  44. width: 10px;
  45. height: 10px;
  46. fill: white(.5);
  47. transition: fill .2s ease-out;
  48. }
  49. &:hover .iconic {
  50. fill: white(1);
  51. }
  52. &:active .iconic {
  53. transition: none;
  54. fill: white(.8);
  55. }
  56. &--editable .iconic { display: inline-block; }
  57. }
  58. // Buttons -------------------------------------------------------------- //
  59. .button {
  60. flex-shrink: 0;
  61. padding: 16px 8px;
  62. height: 15px;
  63. .iconic {
  64. width: 15px;
  65. height: 15px;
  66. fill: white(.5);
  67. transition: fill .2s ease-out;
  68. }
  69. &:hover .iconic {
  70. fill: white(1);
  71. }
  72. &:active .iconic {
  73. transition: none;
  74. fill: white(.8);
  75. }
  76. &--star.active .iconic { fill: #f0ef77; }
  77. &--eye.active .iconic { fill: #ff9737; }
  78. &--share .iconic { height: 18px; }
  79. &--info.active .iconic { fill: $colorBlue; }
  80. }
  81. // Divider -------------------------------------------------------------- //
  82. &__divider {
  83. flex-shrink: 0;
  84. width: 14px;
  85. }
  86. // Search -------------------------------------------------------------- //
  87. &__search {
  88. flex-shrink: 0;
  89. width: 80px;
  90. margin: 0;
  91. padding: 5px 12px 6px 12px;
  92. background-color: #1d1d1d;
  93. color: #fff;
  94. border: 1px solid black(.9);
  95. box-shadow: 0 1px 0 white(.04);
  96. outline: none;
  97. border-radius: 50px;
  98. opacity: .6;
  99. transition: opacity .3s ease-out, box-shadow .3s ease-out, width .2s ease-out;
  100. &:focus {
  101. width: 140px;
  102. border-color: $colorBlue;
  103. box-shadow: 0 1px 0 white(0);
  104. opacity: 1;
  105. }
  106. &:focus ~ #clearSearch { opacity: 1; }
  107. &::-ms-clear { display: none; }
  108. }
  109. &__clear {
  110. position: absolute;
  111. top: 13px;
  112. right: 60px;
  113. padding: 0;
  114. color: white(.5);
  115. font-size: 20px;
  116. opacity: 0;
  117. transition: color .2s ease-out;
  118. cursor: default;
  119. &:hover { color: white(1); }
  120. }
  121. // Hosted with -------------------------------------------------------------- //
  122. &__hostedwith {
  123. flex-shrink: 0;
  124. padding: 5px 10px;
  125. margin: 11px 0;
  126. color: #888;
  127. font-size: 13px;
  128. border-radius: 100px;
  129. cursor: default;
  130. &:hover { background-color: black(.3); }
  131. }
  132. }