main.scss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. @tailwind base;
  2. @tailwind components;
  3. @tailwind utilities;
  4. @import 'variables';
  5. @import 'markdown';
  6. @import 'utils';
  7. @import 'article';
  8. @import 'menu';
  9. @import 'shortcodes';
  10. @import 'syntax';
  11. @import 'search-widget';
  12. @import 'blog';
  13. @import 'toc';
  14. @import 'fonts';
  15. @layer components {
  16. .btn-primary {
  17. @apply bg-blue-500 border border-transparent rounded-md py-2 px-4 flex items-center justify-center text-base font-medium text-white font-medium hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-indigo-500;
  18. }
  19. }
  20. [x-cloak] {
  21. display: none !important;
  22. }
  23. ul.pagination {
  24. display: flex;
  25. justify-content: center;
  26. list-style-type: none;
  27. .page-item a {
  28. padding: $padding-8 $padding-16;
  29. border: 1px solid $gray-200;
  30. border-radius: 3px;
  31. }
  32. .page-item.active a {
  33. background-color: $gray-200;
  34. }
  35. .page-item.disabled a {
  36. color: $gray-500;
  37. }
  38. li + li {
  39. margin-left: $padding-4;
  40. }
  41. }
  42. .container {
  43. min-width: $container-min-width;
  44. max-width: $container-max-width;
  45. margin: $top-bar-height auto 0;
  46. }
  47. ul.contents-list {
  48. padding: 0;
  49. list-style-type: none;
  50. text-transform: capitalize;
  51. }
  52. .book-brand {
  53. margin-top: 0;
  54. }
  55. .book-page {
  56. min-width: $body-min-width;
  57. min-height: 80vh;
  58. flex: 1;
  59. padding: $padding-16 * 1.6;
  60. padding-right: 3px;
  61. @media all and (max-width: $sm-breakpoint) {
  62. padding: 6px;
  63. }
  64. figure {
  65. img {
  66. max-width: 100%;
  67. }
  68. }
  69. }
  70. .book-header {
  71. margin-bottom: $padding-16;
  72. display: none;
  73. }
  74. .book-toc {
  75. font-size: $font-size-12;
  76. nav {
  77. overflow-x: hidden;
  78. overflow-y: auto;
  79. max-height: 70vh;
  80. padding-right: 1em;
  81. }
  82. nav > ul > li {
  83. margin-bottom: 12px;
  84. }
  85. a.active {
  86. //font-weight: bold;
  87. text-decoration: underline;
  88. position: relative;
  89. &::before {
  90. content: '';
  91. position: absolute;
  92. left: -12px;
  93. top: 8px;
  94. display: block;
  95. width: 6px;
  96. height: 6px;
  97. border-radius: 50%;
  98. background-color: $brand-color;
  99. opacity: 0.5;
  100. }
  101. }
  102. }
  103. .book-git-footer {
  104. display: flex;
  105. margin-top: $padding-16;
  106. font-size: $font-size-14;
  107. align-items: baseline;
  108. img {
  109. width: $font-size-14;
  110. vertical-align: bottom;
  111. }
  112. }
  113. .book-footer {
  114. height: 200px;
  115. text-align: center;
  116. color: $gray-600;
  117. margin-top: 60px;
  118. font-size: 12px;
  119. }
  120. .book-posts {
  121. min-width: $body-min-width;
  122. max-width: $md-breakpoint;
  123. padding: $padding-16;
  124. article {
  125. padding-bottom: $padding-16;
  126. }
  127. }
  128. .texture-bg {
  129. background-color: #1a1a1a;
  130. box-shadow: inset 0px 0px 15px 8px rgba(0, 0, 0, 0.75);
  131. background-image: url("/header-bg.png");
  132. background-blend-mode: darken;
  133. }
  134. // Responsive styles
  135. aside nav,
  136. .book-page,
  137. .markdown {
  138. transition: 0.2s ease-in-out;
  139. transition-property: transform, margin-left, opacity;
  140. will-change: transform, margin-left;
  141. }
  142. @media screen and (max-width: $md-breakpoint) {
  143. .book-toc {
  144. display: none;
  145. }
  146. .left-gutter {
  147. display: none;
  148. }
  149. }
  150. @media screen and (max-width: $sm-breakpoint) {
  151. //.book-menu {
  152. // margin-left: -$menu-width;
  153. //}
  154. .book-header {
  155. display: flex;
  156. }
  157. #menu-control:checked + main {
  158. nav.book-menu,
  159. .book-page {
  160. transform: translateX($menu-width);
  161. }
  162. .book-header label {
  163. transform: rotate(90deg);
  164. }
  165. .markdown {
  166. opacity: 0.25;
  167. }
  168. }
  169. }
  170. //.custom-scrollbar {
  171. //
  172. // &::-webkit-scrollbar {
  173. // width: 10px;
  174. // height: 10px;
  175. // }
  176. //
  177. // &::-webkit-scrollbar {
  178. // width: 10px;
  179. // height: 10px;
  180. // }
  181. // &::-webkit-scrollbar-corner {
  182. // background-color: hsl(0 0% 90%);
  183. // }
  184. // &::-webkit-scrollbar-thumb {
  185. // background-color: hsl(0 0% 75%);
  186. // border: 2px solid hsl(0 0% 90%);
  187. // border-radius: 10px;
  188. // }
  189. // &::-webkit-scrollbar-thumb:hover {
  190. // background-color: hsl(0 0% 65%);
  191. // }
  192. // &::-webkit-scrollbar-track {
  193. // background-color: hsl(0 0% 90%);
  194. // }
  195. //}