main.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. @charset "UTF-8";
  2. @import url("https://fontsapi.zeoseven.com/442/main/result.css");
  3. @import "reset";
  4. @import "dark";
  5. body {
  6. padding: 0 !important;
  7. position: relative;
  8. font-family: "Maple Mono NF CN";
  9. font-weight: normal;
  10. overflow-x: hidden !important;
  11. overflow-y: auto !important;
  12. color: var(--bs-body-color);
  13. }
  14. .blog-body {
  15. // 导航栏
  16. .navbar {
  17. --bs-navbar-padding-x: 0;
  18. --bs-navbar-padding-y: 0;
  19. transition: .3s ease-out;
  20. box-shadow: 0 .5rem 1rem rgba(18, 38, 63, .05);
  21. border: 1px solid rgba(17, 24, 39, .1);
  22. .container-fluid {
  23. height: 3rem;
  24. .nav-toggle,
  25. .nav-search-button {
  26. width: 2.5rem;
  27. height: 100%;
  28. }
  29. }
  30. }
  31. .sidebar-banner {
  32. position: relative;
  33. background-image: url("../assets/imgs/wallhaven-qr9jml.jpg");
  34. background-position-x: center;
  35. background-position-y: center;
  36. background-size: cover;
  37. min-height: 120px;
  38. width: 100%;
  39. overflow: hidden;
  40. border-top-right-radius: 6px;
  41. border-top-left-radius: 6px;
  42. &::after {
  43. content: "";
  44. width: 100%;
  45. height: 40%;
  46. position: absolute;
  47. bottom: 0;
  48. left: 0;
  49. background: linear-gradient(to top, var(--bs-white), transparent);
  50. }
  51. }
  52. .sidebar-avatar {
  53. position: absolute;
  54. left: 50%;
  55. transform: translateX(-50%) translateY(-50%);
  56. border: rgba(255, 255, 255, .4) 4px solid;
  57. width: 68px;
  58. height: 68px;
  59. border-radius: 50%;
  60. }
  61. .sidebar-sign {
  62. padding-left: .75rem;
  63. padding-right: .75rem;
  64. margin-bottom: 1rem;
  65. font-size: .875rem;
  66. line-height: 1.5rem;
  67. letter-spacing: .05em;
  68. text-align: center;
  69. }
  70. // 侧边导航
  71. .offcanvas {
  72. height: 100vh;
  73. max-width: 78%;
  74. .offcanvas-body {
  75. padding: 0;
  76. .sidebar-banner {
  77. border-top-right-radius: 0px;
  78. border-top-left-radius: 0px;
  79. }
  80. }
  81. }
  82. // 英雄
  83. .hero-box {
  84. position: relative;
  85. height: 730px;
  86. background-image: url("../assets/imgs/acg.jpg");
  87. background-position-x: center;
  88. background-position-y: center;
  89. background-size: cover;
  90. &::before {
  91. content: "";
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. width: 100%;
  96. height: 100%;
  97. background: rgba(0, 0, 0, .2);
  98. }
  99. }
  100. // 主
  101. .main {
  102. // 文章列表
  103. .article-list {
  104. .article-item {
  105. display: flex;
  106. overflow: hidden;
  107. position: relative;
  108. background-color: #fff;
  109. height: 10rem;
  110. border-radius: var(--bs-border-radius);
  111. border-width: 1px;
  112. margin-bottom: 1rem;
  113. .blur-img {
  114. z-index: 0;
  115. img {
  116. object-fit: cover;
  117. position: absolute;
  118. top: 0;
  119. right: 0;
  120. bottom: 0;
  121. left: 0;
  122. width: 100%;
  123. height: 14.5rem;
  124. transform: scale(1.55);
  125. }
  126. }
  127. &.flex-row-reverse {
  128. .article-img {
  129. clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
  130. }
  131. }
  132. .article-img {
  133. z-index: 10;
  134. margin: 0;
  135. width: 33.333333%;
  136. border-width: 0;
  137. clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
  138. .article-left-img {
  139. object-fit: cover;
  140. background-position: center;
  141. background-size: cover;
  142. width: 100%;
  143. height: 100%;
  144. }
  145. }
  146. .article-ctx {
  147. display: flex;
  148. z-index: 10;
  149. padding: 1.25rem 1rem;
  150. color: #fff;
  151. flex-direction: column;
  152. justify-content: space-between;
  153. width: 100%;
  154. background-color: rgba(0, 0, 0, .35);
  155. .article-info {
  156. display: flex;
  157. font-size: .75rem;
  158. line-height: 1rem;
  159. justify-content: space-between;
  160. letter-spacing: .06rem;
  161. text-shadow: 0 .1875rem .3125rem rgba(0, 0, 0, .3);
  162. }
  163. .article-title {
  164. font-weight: 700;
  165. display: -webkit-box;
  166. -webkit-box-orient: vertical;
  167. -webkit-line-clamp: 1;
  168. font-size: 20px;
  169. line-height: 1.75rem;
  170. letter-spacing: .05em;
  171. color: #fff;
  172. overflow: hidden;
  173. }
  174. .article-description {
  175. display: -webkit-box;
  176. -webkit-box-orient: vertical;
  177. -webkit-line-clamp: 2;
  178. font-size: 12px;
  179. text-indent: 2em;
  180. line-height: 1.5rem;
  181. word-break: break-all;
  182. overflow: hidden;
  183. color: #fff;
  184. }
  185. }
  186. }
  187. }
  188. // 下一页按钮
  189. #NextButton {
  190. width: auto;
  191. padding-left: 3rem;
  192. padding-right: 3rem;
  193. }
  194. // 详情
  195. .article-detail {
  196. .tag {
  197. .tag-item {
  198. color: #0d6efd !important;
  199. background-color: rgba(13, 110, 253, .1) !important;
  200. }
  201. }
  202. .copyright {
  203. padding: 1rem;
  204. margin-top: 1.5rem;
  205. line-height: 1.5rem;
  206. border-radius: .25rem;
  207. background-color: var(--bs-light);
  208. .copyright-text {
  209. word-break: break-all;
  210. }
  211. }
  212. .like-button {
  213. border-radius: var(--bs-border-radius-lg);
  214. border: 2px solid #e7e7e7;
  215. cursor: pointer;
  216. padding: .45rem .75rem;
  217. color: #878787;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. font-size: 1rem;
  222. transition: all .25s cubic-bezier(.175, .885, .32, 1.275);
  223. filter: grayscale(100%);
  224. user-select: none;
  225. .like-icon {
  226. width: 18px;
  227. height: 16px;
  228. display: inline-block;
  229. position: relative;
  230. margin-right: .25em;
  231. font-size: 1.5rem;
  232. background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjYyMzc3NzkwMjA1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIxMjk2IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiPjxwYXRoIGQ9Ik05MTMuOTIgMjA4LjM4NGMtOTguODE2LTk4LjgxNi0yNTguNTYtOTguODE2LTM1Ny4zNzYgMGwtNDEuOTg0IDQxLjk4NC00MS45ODQtNDEuOTg0Yy05OC44MTYtOTguODE2LTI1OC41Ni05OC44MTYtMzU3LjM3NiAwLTk4LjMwNCA5OC44MTYtOTguMzA0IDI1OC41NiAwLjUxMiAzNTcuMzc2bDUyLjIyNCA1Mi4yMjQgMzM3LjQwOCAzMzcuNDA4YzUuNjMyIDUuNjMyIDE0LjMzNiA1LjYzMiAxOS45NjggMGwzMzcuNDA4LTMzNy40MDggNTIuMjI0LTUyLjIyNGM5Ny43OTItOTguODE2IDk3Ljc5Mi0yNTguNTYtMS4wMjQtMzU3LjM3NnoiIGZpbGw9IiNmZjZlNmYiIHAtaWQ9IjIxMjk3Ij48L3BhdGg+PC9zdmc+) no-repeat center;
  233. background-size: 100%;
  234. animation: heartUnlike .25s cubic-bezier(.175, .885, .32, 1.275) both;
  235. }
  236. }
  237. }
  238. }
  239. // 工具
  240. .tools {
  241. display: flex;
  242. position: fixed;
  243. right: 1.25rem;
  244. bottom: 1.25rem;
  245. z-index: 1045;
  246. margin-top: .25rem;
  247. flex-direction: column;
  248. .backup-btn,
  249. .theme-toggle {
  250. background-color: var(--bs-secondary-bg);
  251. border-radius: .25rem;
  252. border: 1px solid rgba(17, 24, 39, .1);
  253. cursor: pointer;
  254. color: var(--bs-dark);
  255. }
  256. }
  257. .footer {
  258. border-top-width: 1px;
  259. border-top-style: solid;
  260. border-color: rgba(17, 24, 39, .1);
  261. line-height: 1.8rem;
  262. letter-spacing: .3px;
  263. }
  264. }
  265. // media
  266. @media screen and (max-width: 576px) {
  267. .blog-body {
  268. .hero-box {
  269. height: 20rem;
  270. }
  271. }
  272. }
  273. @media screen and (min-width: 768px) {
  274. .blog-body {
  275. .main {
  276. .article-list {
  277. .article-item {
  278. background-color: #000;
  279. border-width: 0;
  280. height: 14.5rem;
  281. .blur-img {
  282. img {
  283. filter: blur(1.875rem) brightness(.75);
  284. }
  285. }
  286. .article-ctx {
  287. background-color: unset;
  288. padding: 3rem 2rem;
  289. width: 66.666667%;
  290. }
  291. }
  292. }
  293. }
  294. }
  295. }
  296. // 字体
  297. [class^="fa-"], [class*=" fa-"] {
  298. vertical-align: middle;
  299. }
  300. // 工具
  301. img {
  302. max-width: 100%;
  303. height: auto;
  304. vertical-align: middle;
  305. }
  306. .has-img {
  307. backdrop-filter: blur(8px)
  308. }
  309. .bg-blur {
  310. background: var(--bg-blur-background);
  311. -webkit-backdrop-filter: saturate(200%) blur(20px);
  312. backdrop-filter: saturate(200%) blur(20px);
  313. }
  314. .text-xs {
  315. font-size: .75rem;
  316. }
  317. .icon {
  318. font-size: 1rem;
  319. width: 1rem;
  320. height: 1rem;
  321. fill: currentColor;
  322. overflow: hidden;
  323. flex-shrink: 0;
  324. }
  325. // 滚动条
  326. :root {
  327. scroll-behavior: auto;
  328. }
  329. html, body {
  330. &::-webkit-scrollbar {
  331. width: 6px;
  332. height: 0;
  333. }
  334. &::-webkit-scrollbar-corner {
  335. background: unset;
  336. }
  337. &::-webkit-scrollbar-thumb {
  338. background: rgba(135, 135, 135, .4);
  339. border-radius: 6px;
  340. }
  341. &::-webkit-scrollbar-track {
  342. background: rgba(135, 135, 135, .1);
  343. }
  344. &::-webkit-scrollbar-track {
  345. background-color: #fff;
  346. }
  347. }
  348. .dark {
  349. html, body {
  350. &::-webkit-scrollbar-thumb {
  351. background: rgba(135, 135, 135, .6);
  352. }
  353. }
  354. }