sidebar.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. .sidebar {
  2. &.sticky {
  3. @include respond(md) {
  4. position: sticky;
  5. }
  6. }
  7. }
  8. .left-sidebar {
  9. display: flex;
  10. flex-direction: column;
  11. flex-shrink: 0;
  12. align-self: stretch;
  13. gap: var(--sidebar-element-separation);
  14. max-width: none;
  15. width: 100%;
  16. position: relative;
  17. --sidebar-avatar-size: 100px;
  18. --sidebar-element-separation: 20px;
  19. --emoji-size: 40px;
  20. --emoji-font-size: 20px;
  21. @include respond(md) {
  22. width: auto;
  23. padding-top: var(--main-top-padding);
  24. padding-bottom: var(--main-top-padding);
  25. max-height: 100vh;
  26. }
  27. @include respond(2xl) {
  28. --sidebar-avatar-size: 120px;
  29. --sidebar-element-separation: 25px;
  30. --emoji-size: 40px;
  31. }
  32. &.sticky {
  33. top: 0;
  34. }
  35. &.compact {
  36. --sidebar-avatar-size: 80px;
  37. --emoji-size: 30px;
  38. --emoji-font-size: 15px;
  39. header {
  40. @include respond(lg) {
  41. flex-direction: row;
  42. }
  43. .site-meta {
  44. gap: 5px;
  45. }
  46. .site-name {
  47. font-size: 1.4rem;
  48. @include respond(2xl) {
  49. font-size: 1.75rem;
  50. }
  51. }
  52. .site-description {
  53. font-size: 1.4rem;
  54. }
  55. }
  56. }
  57. }
  58. .right-sidebar {
  59. width: 100%;
  60. display: none;
  61. flex-direction: column;
  62. gap: var(--widget-separation);
  63. &.sticky {
  64. top: 0;
  65. }
  66. @include respond(lg) {
  67. padding-top: var(--main-top-padding);
  68. }
  69. }
  70. .sidebar header {
  71. z-index: 1;
  72. transition: box-shadow 0.5s ease;
  73. display: flex;
  74. flex-direction: column;
  75. gap: var(--sidebar-element-separation);
  76. @include respond(md) {
  77. padding: 0;
  78. }
  79. .site-avatar {
  80. position: relative;
  81. margin: 0;
  82. width: var(--sidebar-avatar-size);
  83. height: var(--sidebar-avatar-size);
  84. flex-shrink: 0;
  85. .site-logo {
  86. width: 100%;
  87. height: 100%;
  88. border-radius: 100%;
  89. box-shadow: var(--shadow-l1);
  90. }
  91. .emoji {
  92. position: absolute;
  93. width: var(--emoji-size);
  94. height: var(--emoji-size);
  95. line-height: var(--emoji-size);
  96. border-radius: 100%;
  97. bottom: 0;
  98. right: 0;
  99. text-align: center;
  100. font-size: var(--emoji-font-size);
  101. background-color: var(--card-background);
  102. box-shadow: var(--shadow-l2);
  103. }
  104. }
  105. .site-meta {
  106. display: flex;
  107. flex-direction: column;
  108. gap: 10px;
  109. justify-content: center;
  110. }
  111. .site-name {
  112. color: var(--accent-color);
  113. margin: 0;
  114. font-size: 1.6rem;
  115. @include respond(2xl) {
  116. font-size: 1.8rem;
  117. }
  118. }
  119. .site-description {
  120. color: var(--body-text-color);
  121. font-weight: normal;
  122. margin: 0;
  123. font-size: 1.4rem;
  124. @include respond(2xl) {
  125. font-size: 1.6rem;
  126. }
  127. }
  128. }
  129. [data-scheme="dark"] {
  130. #dark-mode-toggle {
  131. color: var(--accent-color);
  132. font-weight: 700;
  133. .icon-tabler-toggle-left {
  134. display: none;
  135. }
  136. .icon-tabler-toggle-right {
  137. display: unset;
  138. }
  139. }
  140. }
  141. #dark-mode-toggle {
  142. margin-top: auto;
  143. color: var(--body-text-color);
  144. display: flex;
  145. align-items: center;
  146. cursor: pointer;
  147. gap: var(--menu-icon-separation);
  148. .icon-tabler-toggle-right {
  149. display: none;
  150. }
  151. }
  152. #i18n-switch {
  153. color: var(--body-text-color);
  154. display: inline-flex;
  155. align-content: center;
  156. gap: var(--menu-icon-separation);
  157. select {
  158. border: 0;
  159. background-color: transparent;
  160. color: var(--body-text-color);
  161. option {
  162. color: var(--card-text-color-main);
  163. background-color: var(--card-background);
  164. }
  165. }
  166. }