_header.scss 4.1 KB

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