_header.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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. position: relative;
  10. min-height: 52px;
  11. box-sizing: border-box;
  12. @include for-mobile {
  13. min-height: 0;
  14. }
  15. &.initialized {
  16. display: block;
  17. }
  18. &:empty {
  19. display: none;
  20. }
  21. &:after {
  22. content: "";
  23. display: inline-block;
  24. vertical-align: middle;
  25. height: 100%;
  26. }
  27. h1, h2 {
  28. display: inline-block;
  29. padding: 0 20px;
  30. margin: 0;
  31. text-transform: uppercase;
  32. font-size: 11px;
  33. vertical-align: middle;
  34. }
  35. a, a:visited, a:hover {
  36. color: $sidebar-contrast-text-color;
  37. }
  38. a:hover {
  39. color: $sidebar-hover-action-color;
  40. }
  41. &-pin {
  42. position: absolute;
  43. top: 50%;
  44. right: 4px;
  45. margin-top: -11px;
  46. display: inline-block;
  47. font-size: 22px;
  48. cursor: pointer;
  49. transition: transform 0.3s;
  50. transform: rotate(-45deg);
  51. body.menu-pinned & {
  52. transform: rotate(45deg);
  53. }
  54. &:hover {
  55. color: #fff;
  56. }
  57. @include for-mobile {
  58. display: none;
  59. }
  60. }
  61. &-menu {
  62. position: absolute;
  63. top: 50%;
  64. left: 12px;
  65. margin-top: -8px;
  66. display: inline-block;
  67. font-size: 16px;
  68. cursor: pointer;
  69. &:hover {
  70. color: #fff;
  71. }
  72. @include for-mobile() {
  73. display: none;
  74. }
  75. }
  76. }
  77. #user-tools {
  78. display: none;
  79. &.initialized {
  80. display: block;
  81. }
  82. }
  83. .user-tools {
  84. ul {
  85. position: absolute;
  86. top: ($top-height + 10px * 2) / 2 - 30px / 2;
  87. right: 20px;
  88. border: 1px solid $top-border-color;
  89. border-radius: 4px;
  90. font-size: 12px;
  91. margin: 0;
  92. padding: 0;
  93. list-style: none;
  94. display: inline-block;
  95. width: 175px;
  96. z-index: 4;
  97. @include for-mobile {
  98. position: fixed;
  99. top: 0;
  100. right: 0;
  101. width: auto;
  102. max-width: 200px;
  103. color: $sidebar-link-color;
  104. border: 0;
  105. border-left: 1px solid $sidebar-contrast-background-color;
  106. border-radius: 0;
  107. transform: none;
  108. transition: transform $transitions-duration;
  109. body.scroll-to-bottom & {
  110. transform: translate3d(0, -100%, 0);
  111. }
  112. &.sidebar-opened {
  113. transform: translate3d(100%, 0, 0);
  114. }
  115. }
  116. &.opened {
  117. background-color: $top-dropdown-background-color;
  118. border-color: transparent;
  119. color: $top-dropdown-text-color;
  120. @include for-mobile {
  121. border-radius: 0 0 0 4px;
  122. border: 0;
  123. }
  124. }
  125. li {
  126. display: block;
  127. list-style-type: none;
  128. margin: 0;
  129. padding: 0;
  130. overflow: hidden;
  131. text-overflow: ellipsis;
  132. white-space: nowrap;
  133. }
  134. li.user-tools-welcome-msg {
  135. font-weight: bold;
  136. padding: 0 10px 0 14px;
  137. line-height: 30px;
  138. @include for-mobile {
  139. padding-left: 18px;
  140. line-height: $sidebar-header-height;
  141. }
  142. &:before {
  143. @include font-icon;
  144. content: $icon-arrow-down;
  145. font-weight: normal;
  146. float: right;
  147. color: #47bac1;
  148. font-size: 24px;
  149. vertical-align: middle;
  150. line-height: 30px;
  151. transition: color $transitions-duration;
  152. margin-left: 5px;
  153. @include for-mobile {
  154. line-height: $sidebar-header-height;
  155. font-size: 20px;
  156. font-weight: bold;
  157. }
  158. }
  159. }
  160. &.opened .user-tools-welcome-msg {
  161. border-bottom: 1px solid $top-dropdown-border-color;
  162. &:before {
  163. color: $top-dropdown-icon-color;
  164. transform: rotate(180deg);
  165. }
  166. }
  167. li.user-tools-link {
  168. display: none;
  169. a, a:visited, a:hover {
  170. display: block;
  171. line-height: 30px;
  172. padding: 0 14px;
  173. color: $top-dropdown-link-color;
  174. text-decoration: none;
  175. @include for-mobile {
  176. line-height: $sidebar-header-height;
  177. }
  178. }
  179. a:hover {
  180. color: $top-dropdown-hover-link-color;
  181. text-decoration: underline;
  182. }
  183. }
  184. &.opened li.user-tools-link {
  185. display: block;
  186. }
  187. li.user-tools-contrast-block {
  188. display: none;
  189. padding: 8px 14px;
  190. background: $top-dropdown-contrast-background-color;
  191. color: $top-dropdown-contrast-text-color;
  192. white-space: normal;
  193. }
  194. &.opened li.user-tools-contrast-block {
  195. display: block;
  196. }
  197. }
  198. &-contrast-block {
  199. &-title {
  200. text-transform: uppercase;
  201. font-size: 10px;
  202. font-weight: bold;
  203. margin-bottom: 6px;
  204. }
  205. }
  206. &-theme-link {
  207. display: inline-block;
  208. margin: 0 5px 5px 0;
  209. width: 14px;
  210. height: 14px;
  211. border: 1px solid $top-dropdown-contrast-background-color;
  212. border-radius: 3px;
  213. @include for-mobile {
  214. width: 24px;
  215. height: 24px;
  216. margin: 0 8px 8px 0;
  217. }
  218. &:last-child {
  219. margin-right: 0;
  220. }
  221. &.selected {
  222. box-shadow: 0 0 1px 1px $top-dropdown-selected-color;
  223. }
  224. }
  225. }
  226. .theme-chooser {
  227. display: none;
  228. &.initialized {
  229. display: block;
  230. }
  231. }