_header.scss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. @import "globals";
  2. /* HEADER */
  3. #branding {
  4. display: none;
  5. background-color: $sidebar-contrast-background-color;
  6. color: $sidebar-contrast-text-color;
  7. padding: 14px;
  8. text-align: center;
  9. &.initialized {
  10. display: block;
  11. }
  12. h1, h2 {
  13. padding: 0;
  14. margin: 0;
  15. text-transform: uppercase;
  16. font-size: 11px;
  17. }
  18. a, a:visited, a:hover {
  19. color: $sidebar-contrast-text-color;
  20. }
  21. a:hover {
  22. color: $sidebar-hover-action-color;
  23. }
  24. }
  25. #user-tools {
  26. display: none;
  27. &.initialized {
  28. display: block;
  29. }
  30. }
  31. .user-tools {
  32. position: relative;
  33. ul {
  34. position: absolute;
  35. top: $top-height - 12px;
  36. right: 20px;
  37. border: 1px solid $top-border-color;
  38. border-radius: 4px;
  39. font-size: 12px;
  40. margin: 0;
  41. padding: 0;
  42. list-style: none;
  43. display: inline-block;
  44. width: 175px;
  45. z-index: 1;
  46. @include for-mobile {
  47. position: fixed;
  48. top: 0;
  49. right: 0;
  50. z-index: 4;
  51. width: auto;
  52. max-width: 200px;
  53. color: $sidebar-link-color;
  54. border: 0;
  55. border-left: 1px solid $sidebar-contrast-background-color;
  56. border-radius: 0;
  57. transform: none;
  58. transition: transform $transitions-duration;
  59. body.scroll-to-bottom & {
  60. transform: translate3d(0, -100%, 0);
  61. }
  62. }
  63. &.opened {
  64. background-color: $top-dropdown-background-color;
  65. border-color: transparent;
  66. color: $top-dropdown-text-color;
  67. @include for-mobile {
  68. border-radius: 0 0 0 4px;
  69. border: 0;
  70. }
  71. }
  72. li {
  73. display: block;
  74. list-style-type: none;
  75. margin: 0;
  76. padding: 0;
  77. overflow: hidden;
  78. text-overflow: ellipsis;
  79. white-space: nowrap;
  80. }
  81. li.user-tools-welcome-msg {
  82. font-weight: bold;
  83. padding: 0 10px 0 14px;
  84. line-height: 30px;
  85. @include for-mobile {
  86. padding-left: 18px;
  87. line-height: $sidebar-header-height;
  88. }
  89. &:before {
  90. @include font-icon;
  91. content: $icon-arrow-down;
  92. font-weight: normal;
  93. float: right;
  94. color: #47bac1;
  95. font-size: 24px;
  96. vertical-align: middle;
  97. line-height: 30px;
  98. transition: color $transitions-duration;
  99. margin-left: 5px;
  100. @include for-mobile {
  101. line-height: $sidebar-header-height;
  102. font-size: 20px;
  103. font-weight: bold;
  104. }
  105. }
  106. }
  107. &.opened .user-tools-welcome-msg {
  108. border-bottom: 1px solid $top-dropdown-border-color;
  109. &:before {
  110. color: $top-dropdown-icon-color;
  111. transform: rotate(180deg);
  112. }
  113. }
  114. li.user-tools-link {
  115. display: none;
  116. a, a:visited, a:hover {
  117. display: block;
  118. line-height: 30px;
  119. padding: 0 14px;
  120. color: $top-dropdown-link-color;
  121. text-decoration: none;
  122. @include for-mobile {
  123. line-height: $sidebar-header-height;
  124. }
  125. }
  126. a:hover {
  127. color: $top-dropdown-hover-link-color;
  128. text-decoration: underline;
  129. }
  130. }
  131. &.opened li.user-tools-link {
  132. display: block;
  133. }
  134. li.user-tools-contrast-block {
  135. display: none;
  136. padding: 8px 14px;
  137. background: $top-dropdown-contrast-background-color;
  138. color: $top-dropdown-contrast-text-color;
  139. white-space: normal;
  140. }
  141. &.opened li.user-tools-contrast-block {
  142. display: block;
  143. }
  144. }
  145. &-contrast-block {
  146. &-title {
  147. text-transform: uppercase;
  148. font-size: 10px;
  149. font-weight: bold;
  150. margin-bottom: 6px;
  151. }
  152. }
  153. &-theme-link {
  154. display: inline-block;
  155. margin: 0 5px 5px 0;
  156. width: 14px;
  157. height: 14px;
  158. border: 1px solid $top-dropdown-contrast-background-color;
  159. border-radius: 3px;
  160. @include for-mobile {
  161. width: 24px;
  162. height: 24px;
  163. margin: 0 8px 8px 0;
  164. }
  165. &:last-child {
  166. margin-right: 0;
  167. }
  168. &.selected {
  169. box-shadow: 0 0 1px 1px $top-dropdown-selected-color;
  170. }
  171. }
  172. }
  173. .theme-chooser {
  174. display: none;
  175. &.initialized {
  176. display: block;
  177. }
  178. }