_sidebar.styl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. .sidebar {
  2. background: var(--body-bg-color);
  3. box-shadow: none;
  4. margin-top: 100%;
  5. position: static;
  6. width: $sidebar-desktop;
  7. +tablet-mobile() {
  8. display: none;
  9. }
  10. }
  11. .sidebar-toggle {
  12. display: none;
  13. }
  14. .sidebar-inner {
  15. background: var(--content-bg-color);
  16. border-radius: $border-radius;
  17. box-shadow: $box-shadow;
  18. box-sizing: border-box;
  19. color: var(--text-color);
  20. width: $sidebar-desktop;
  21. if (hexo-config('motion.enable') && hexo-config('motion.transition.sidebar')) {
  22. opacity: 0;
  23. }
  24. &.affix {
  25. position: fixed;
  26. top: $sidebar-offset;
  27. }
  28. &.affix-bottom {
  29. position: absolute;
  30. }
  31. }
  32. .site-state-item {
  33. padding: 0 10px;
  34. }
  35. .sidebar-button {
  36. border-bottom: 1px dotted $grey-light;
  37. border-top: 1px dotted $grey-light;
  38. margin-top: 10px;
  39. text-align: center;
  40. a {
  41. border: 0;
  42. color: $orange;
  43. display: block;
  44. &:hover {
  45. background: none;
  46. border: 0;
  47. color: darken($orange, 20%);
  48. .fa, .fab, .far, .fas {
  49. color: darken($orange, 20%);
  50. }
  51. }
  52. }
  53. }
  54. .links-of-author {
  55. display: flex;
  56. flex-wrap: wrap;
  57. margin-top: 10px;
  58. justify-content: center;
  59. }
  60. .links-of-author-item {
  61. sidebar-inline-links-item();
  62. if (!hexo-config('social_icons.icons_only')) {
  63. width: 50%;
  64. }
  65. a, span.exturl {
  66. border-bottom: none;
  67. display: block;
  68. text-decoration: none;
  69. &::before {
  70. display: none;
  71. }
  72. &:hover {
  73. background: var(--body-bg-color);
  74. border-radius: 4px;
  75. }
  76. }
  77. .fa, .fab, .far, .fas {
  78. margin-right: 2px;
  79. }
  80. }
  81. .links-of-blogroll-item {
  82. padding: 0;
  83. if (hexo-config('links_settings.layout') == 'inline') {
  84. display: inline-block;
  85. sidebar-inline-links-item();
  86. if (!hexo-config('social_icons.icons_only')) {
  87. width: unset;
  88. }
  89. }
  90. }
  91. if (hexo-config('back2top.sidebar')) {
  92. // Only when back2top.sidebar is true, apply the following styles
  93. .back-to-top {
  94. background: var(--body-bg-color);
  95. margin: 8px - $sidebar-offset -10px -18px;
  96. &.back-to-top-on {
  97. margin-top: 16px;
  98. }
  99. }
  100. }