_userbox.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. // USERBOX
  2. // -----------------------------------------------------------------------------
  3. /* Userbox */
  4. .userbox {
  5. display: inline-block;
  6. margin: 3px 17px 0 0;
  7. position: relative;
  8. vertical-align: middle;
  9. & > a {
  10. display: inline-block;
  11. text-decoration: none;
  12. }
  13. a:hover {
  14. text-decoration: none;
  15. }
  16. .profile-info,
  17. .profile-picture {
  18. display: inline-block;
  19. vertical-align: middle;
  20. }
  21. .profile-picture img {
  22. width: 35px;
  23. color: transparent;
  24. }
  25. .profile-info {
  26. margin: 0 25px 0 10px;
  27. }
  28. .name,
  29. .role {
  30. display: block;
  31. }
  32. .name {
  33. color: #000011;
  34. @include font-size(13);
  35. line-height: 1.2em;
  36. }
  37. .role {
  38. color: #ACACAC;
  39. @include font-size(11);
  40. line-height: 1.2em;
  41. }
  42. .custom-caret {
  43. color: #000011;
  44. font-size: 16px;
  45. font-weight: bold;
  46. &:before {
  47. content: "\f107";
  48. }
  49. }
  50. }
  51. // USERBOX OPENED
  52. // -----------------------------------------------------------------------------
  53. /* Userbox - Open */
  54. .userbox.open {
  55. & > a {
  56. position: relative;
  57. z-index: 993;
  58. .custom-caret:before {
  59. content: "\f106";
  60. }
  61. }
  62. .dropdown-menu {
  63. border: none;
  64. box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.2);
  65. @include box-sizing(content-box);
  66. left: -11px;
  67. padding: 45px 10px 0;
  68. top: -10px;
  69. width: 100%;
  70. z-index: 992;
  71. li {
  72. margin-bottom: 5px;
  73. }
  74. a {
  75. border-radius: 2px;
  76. color: #7d7d7d;
  77. display: block;
  78. @include font-size(12);
  79. @include line-height(15);
  80. padding: 5px 10px;
  81. &:hover {
  82. background: $color-primary;
  83. color: $color-primary-inverse;
  84. }
  85. }
  86. i {
  87. @include font-size(17);
  88. margin-right: 3px;
  89. vertical-align: middle;
  90. }
  91. }
  92. }
  93. // USERBOX MOBILE
  94. // -----------------------------------------------------------------------------
  95. /* Userbox - Mobile */
  96. @media only screen and (max-width: 767px) {
  97. .userbox {
  98. float: left;
  99. margin: 16px 0 0 12px;
  100. position: relative;
  101. &:after {
  102. background: #E9E9E6;
  103. content: '';
  104. height: 63px;
  105. margin: 0;
  106. position: absolute;
  107. right: -21px;
  108. top: -18px;
  109. width: 1px;
  110. }
  111. .profile-picture {
  112. display: none;
  113. }
  114. &.open .dropdown-menu {
  115. left: -5px;
  116. padding: 43px 0 0 0;
  117. }
  118. }
  119. }
  120. // HEADER DARK
  121. // -----------------------------------------------------------------------------
  122. /* Header Dark - Userbox */
  123. html.dark,
  124. html.header-dark {
  125. .userbox {
  126. &:after {
  127. background: darken( $sidebar-background, 5% );
  128. }
  129. .name,
  130. .custom-caret {
  131. color: $page-header-color;
  132. }
  133. &.open {
  134. .dropdown-menu {
  135. .name,
  136. .custom-caret {
  137. color: $page-header-color;
  138. }
  139. a {
  140. color: $page-header-color;
  141. &:hover {
  142. color: #FFF;
  143. }
  144. }
  145. }
  146. }
  147. .dropdown-menu {
  148. background: lighten( $sidebar-background, 5% );
  149. .divider {
  150. background: $sidebar-background;
  151. }
  152. a {
  153. color: $page-header-color;
  154. }
  155. }
  156. }
  157. }