_header.scss 4.0 KB

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