globals.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. @tailwind base;
  2. @tailwind components;
  3. @tailwind utilities;
  4. @layer base {
  5. .dark {
  6. color-scheme: dark;
  7. }
  8. html {
  9. height: 100%;
  10. font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  11. }
  12. abbr[title] {
  13. text-decoration: none;
  14. }
  15. body {
  16. @apply font-sans min-h-full antialiased text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-900;
  17. }
  18. svg {
  19. @apply fill-current;
  20. }
  21. }
  22. @layer components {
  23. .container {
  24. @apply px-4 mx-auto overflow-hidden;
  25. }
  26. .btn {
  27. @apply inline-flex px-4 py-3 font-medium rounded items-center justify-center text-sm whitespace-nowrap; // space-x-3;
  28. &.btn-primary {
  29. @apply bg-blue-500 border border-blue-500 text-white;
  30. &.btn-outline,
  31. &.btn-light-outline {
  32. @apply bg-blue-500/30;
  33. }
  34. &.btn-dark-outline {
  35. @apply dark:bg-blue-500/30;
  36. }
  37. &.btn-light-outline {
  38. @apply dark:bg-blue-500;
  39. }
  40. }
  41. svg {
  42. @apply w-4 h-4;
  43. }
  44. }
  45. .btn-group {
  46. @apply inline-flex rounded;
  47. .btn {
  48. @apply flex-1;
  49. &:not(:last-of-type) {
  50. @apply rounded-r-none;
  51. }
  52. &:not(:first-of-type) {
  53. @apply rounded-l-none;
  54. }
  55. }
  56. }
  57. }
  58. #__next {
  59. @apply w-full min-h-screen relative;
  60. }
  61. .header {
  62. // @apply sticky border-b py-2 shadow bg-paper-alpha backdrop-blur z-40 top-0;
  63. @apply py-3 sticky top-0 z-40 w-full backdrop-blur flex-none border-b border-gray-900/10 dark:border-gray-50/[0.06] bg-white/60 dark:bg-gray-900/75;
  64. .container {
  65. @apply flex justify-between items-center overflow-visible;
  66. }
  67. .logo {
  68. @apply flex items-center flex-shrink-0 select-none;
  69. img {
  70. @apply w-8 h-8 mr-2;
  71. }
  72. span {
  73. @apply hidden text-xl font-bold md:block text-black dark:text-white;
  74. }
  75. }
  76. .menu {
  77. @apply hidden absolute left-0 top-full w-full py-5 bg-white dark:bg-gray-800; // bg-paper;
  78. @apply md:flex md:relative md:items-center md:p-0 md:bg-transparent md:dark:bg-transparent;
  79. nav {
  80. @apply flex-1;
  81. ul {
  82. @apply md:flex;
  83. li {
  84. @apply relative;
  85. }
  86. }
  87. }
  88. .menu-item {
  89. @apply flex py-2 px-5 items-center text-sm leading-6 font-semibold text-gray-700 dark:text-gray-200 hover:text-sky-500 dark:hover:text-sky-400; // text-gray-dark md:text-gray-light md:hover:text-primary;
  90. svg {
  91. @apply mr-1 fill-current;
  92. }
  93. }
  94. .sub-menu {
  95. @apply hidden;
  96. @apply absolute shadow-lg rounded-xl top-full bg-gray-100; // bg-default;
  97. @apply text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:shadow dark:shadow-white/10 dark:highlight-white/10;
  98. &::before {
  99. content: "";
  100. // position: absolute;
  101. // bottom: 100%;
  102. // left: 25px;
  103. // border-bottom: 7px solid var(--color-bg-default);
  104. // border-left: 6px dashed transparent;
  105. // border-right: 6px dashed transparent;
  106. // height: 0;
  107. // width: 0;
  108. @apply w-0 h-0 absolute bottom-full left-[25px] border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-b-[7px] border-b-gray-100 dark:border-b-gray-700;
  109. }
  110. ul {
  111. @apply py-2 block rounded-l-lg whitespace-nowrap;
  112. &.sub-menu-sized {
  113. @apply h-[312px] w-[640px];
  114. }
  115. &.sub-menu-items {
  116. @apply w-[640px] flex flex-wrap;
  117. li {
  118. @apply w-1/5;
  119. }
  120. }
  121. }
  122. .sub-menu-list {
  123. @apply absolute left-[132px] hidden top-0 h-[312px] w-[508px] rounded-r-lg py-2 px-4 bg-white dark:bg-gray-900 dark:highlight-white/10;
  124. p {
  125. @apply flex flex-wrap;
  126. strong {
  127. @apply block w-full py-1 px-4 text-gray-800 dark:text-gray-200;
  128. }
  129. a {
  130. @apply w-1/3 block py-1 px-4 rounded hover:bg-gray-100 dark:hover:bg-gray-800;
  131. }
  132. }
  133. }
  134. li {
  135. @apply static;
  136. > a {
  137. @apply block py-3 px-4;
  138. }
  139. &:hover {
  140. @apply bg-white dark:hover:bg-gray-900;
  141. .sub-menu-list {
  142. @apply block;
  143. }
  144. }
  145. &:first-child {
  146. .sub-menu-list {
  147. @apply block;
  148. }
  149. }
  150. }
  151. }
  152. li:hover {
  153. .sub-menu {
  154. @apply md:block;
  155. }
  156. }
  157. }
  158. .search-input {
  159. @apply relative mx-5 my-2 md:my-0;
  160. .icon-search {
  161. @apply absolute left-2 h-full w-5 fill-sky-500;
  162. }
  163. input {
  164. @apply block w-full border border-sky-500 rounded-lg pl-10 pr-4 py-1 focus:outline-none bg-transparent; // border-primary text-primary;
  165. }
  166. }
  167. .buttons {
  168. @apply flex;
  169. }
  170. .btn {
  171. @apply inline-flex items-center justify-center relative bg-transparent cursor-pointer text-center p-2 w-8 h-8 rounded-lg border border-sky-500 text-sky-500; // border-primary text-primary;
  172. svg {
  173. @apply w-5 h-5 fill-current;
  174. &.icon-sun {
  175. @apply dark:hidden;
  176. }
  177. &.icon-moon {
  178. @apply hidden dark:block;
  179. }
  180. }
  181. + .btn {
  182. @apply ml-2;
  183. }
  184. }
  185. .menu-btn {
  186. @apply md:hidden;
  187. svg {
  188. &.icon-menu {
  189. rect {
  190. transform: translate(0, 0) rotateZ(0) scaleX(1);
  191. transform-origin: center center;
  192. transition: all 0.2s ease 0s;
  193. }
  194. }
  195. }
  196. }
  197. &.open {
  198. .menu {
  199. @apply block md:flex;
  200. }
  201. .menu-btn {
  202. svg {
  203. &.icon-menu {
  204. rect {
  205. &.r-1 {
  206. transform: translate(1.5px, 2.6px) rotateZ(-45deg);
  207. }
  208. &.r-2 {
  209. transform: translate(0, 0) rotateZ(0) scaleX(0);
  210. }
  211. &.r-3 {
  212. transform: translate(1.5px, -2.2px) rotateZ(45deg);
  213. }
  214. }
  215. }
  216. }
  217. }
  218. }
  219. .breadcrumbs {
  220. @apply hidden lg:flex;
  221. }
  222. }
  223. .novel-title {
  224. @apply mt-5 mb-2 flex justify-between text-2xl sm:text-3xl font-extrabold text-gray-900 tracking-tight dark:text-gray-200;
  225. }
  226. .novel-list {
  227. @apply flex flex-wrap -mx-1.5 md:-mx-2 lg:-mx-4;
  228. .novel-item {
  229. @apply w-1/4 px-1.5 my-2;
  230. @apply md:px-2 lg:w-1/5 lg:px-4 xl:w-[12.5%];
  231. }
  232. }
  233. .novel-item {
  234. a {
  235. color: inherit;
  236. }
  237. }
  238. .novel-item-title {
  239. @apply line-clamp-2 text-xs font-bold leading-none my-1 lg:text-sm text-gray-700 dark:text-white;
  240. }
  241. .novel-item-desc {
  242. @apply text-xs leading-none whitespace-nowrap text-ellipsis block overflow-hidden w-full;
  243. }
  244. .novel-cover {
  245. @apply block before:block before:pt-[135%] relative select-none;
  246. &::after {
  247. @apply absolute left-0 top-0 h-full w-full;
  248. content: "";
  249. background-image: linear-gradient(
  250. 90deg,
  251. rgba(0, 0, 0, 0.4) 4px,
  252. rgba(0, 0, 0, 0) 7px,
  253. rgba(255, 255, 255, 0.35) 8px,
  254. rgba(0, 0, 0, 0.3) 9px,
  255. rgba(0, 0, 0, 0.3) 12px,
  256. rgba(255, 255, 255, 0.25) 13px,
  257. transparent 24px
  258. ),
  259. linear-gradient(
  260. 310deg,
  261. transparent 0%,
  262. transparent 70%,
  263. rgba(255, 255, 255, 0.4) 100%
  264. ),
  265. linear-gradient(
  266. 30deg,
  267. rgba(0, 0, 0, 0.6) 0%,
  268. transparent 30%,
  269. transparent 100%
  270. ),
  271. linear-gradient(
  272. 320deg,
  273. rgba(0, 0, 0, 0.4) 0%,
  274. transparent 30%,
  275. transparent 100%
  276. );
  277. box-shadow: inset -1px 1px 2px rgba(255, 255, 255, 0.5);
  278. margin: auto;
  279. border-radius: 5px 0 0 5px;
  280. }
  281. img {
  282. @apply absolute left-0 top-0 w-full h-full object-cover;
  283. border-radius: 5px 0 0 5px;
  284. }
  285. }
  286. .tabs {
  287. @apply border-b border-gray-200 space-x-6 flex whitespace-nowrap dark:border-gray-200/5;
  288. @apply overflow-x-auto snap-x scrollbar:h-px scrollbar:w-px scrollbar-track:bg-gray-100 scrollbar-thumb:bg-gray-300;
  289. @apply dark:scrollbar-track:bg-gray-800 dark:scrollbar-thumb:bg-gray-700;
  290. .tab {
  291. @apply flex text-sm leading-6 font-semibold pt-3 pb-2.5 border-b-2 text-gray-900 border-transparent hover:border-gray-300 dark:text-gray-200 dark:hover:border-gray-700 snap-start;
  292. &.active,
  293. &.Mui-selected {
  294. @apply text-sky-500 border-current;
  295. }
  296. }
  297. }
  298. .tags {
  299. @apply flex flex-wrap justify-start gap-2;
  300. }
  301. .tag {
  302. @apply inline-flex items-center cursor-pointer text-sm text-gray-900 bg-gray-100 rounded px-2.5 py-2 hover:ring-1 hover:ring-blue-400 dark:text-white hover:text-blue-600 dark:hover:text-blue-500 dark:bg-white/10 ring-inset ring-1 ring-transparent dark:hover:ring-blue-500;
  303. }
  304. .sub-title {
  305. @apply text-lg font-bold mt-4 mb-2;
  306. }
  307. .breadcrumbs {
  308. @apply max-w-full;
  309. ul {
  310. @apply flex items-center whitespace-nowrap w-full overflow-hidden text-ellipsis;
  311. li {
  312. @apply flex items-center;
  313. a {
  314. @apply flex cursor-pointer items-center hover:underline;
  315. &:focus {
  316. @apply outline-none;
  317. }
  318. &:focus-visible {
  319. outline: 2px solid currentColor;
  320. outline-offset: 2px;
  321. }
  322. }
  323. + *:before {
  324. content: "";
  325. @apply ml-2 mr-3 block h-1.5 w-1.5 rotate-45 transform opacity-40;
  326. border-top: 1px solid;
  327. border-right: 1px solid;
  328. background-color: transparent;
  329. }
  330. }
  331. }
  332. }
  333. .footer {
  334. @apply mt-10 border-t border-gray-900/5 dark:border-gray-100/5; // mx-auto w-full px-4 sm:px-6 lg:px-8 text-center;
  335. .container {
  336. @apply py-10 flex items-center whitespace-nowrap gap-5 flex-wrap justify-center;
  337. }
  338. .logo {
  339. @apply inline-flex items-center justify-center flex-shrink-0 select-none;
  340. img {
  341. @apply w-8 h-8 mr-2;
  342. }
  343. span {
  344. @apply hidden text-2xl font-bold md:block text-black dark:text-white;
  345. }
  346. }
  347. .copyright {
  348. @apply text-center text-sm leading-6 text-gray-500;
  349. }
  350. .links {
  351. @apply flex items-center justify-center space-x-4 text-sm font-semibold leading-6 text-gray-700 dark:text-gray-400;
  352. }
  353. .divider {
  354. @apply h-4 w-px bg-gray-500/20;
  355. }
  356. }
  357. #nprogress {
  358. pointer-events: none;
  359. .bar {
  360. // background: ${color};
  361. position: fixed;
  362. z-index: 1031;
  363. top: 0;
  364. left: 0;
  365. width: 100%;
  366. // height: ${height}px;
  367. }
  368. .peg {
  369. display: block;
  370. position: absolute;
  371. right: 0px;
  372. width: 100px;
  373. height: 100%;
  374. // box-shadow: 0 0 10px ${color}, 0 0 5px ${color};
  375. opacity: 1;
  376. -webkit-transform: rotate(3deg) translate(0px, -4px);
  377. -ms-transform: rotate(3deg) translate(0px, -4px);
  378. transform: rotate(3deg) translate(0px, -4px);
  379. }
  380. .spinner {
  381. display: "block";
  382. position: fixed;
  383. z-index: 1031;
  384. top: 15px;
  385. right: 15px;
  386. }
  387. .spinner-icon {
  388. width: 18px;
  389. height: 18px;
  390. box-sizing: border-box;
  391. border: solid 2px transparent;
  392. // border-top-color: ${color};
  393. // border-left-color: ${color};
  394. border-radius: 50%;
  395. -webkit-animation: nprogresss-spinner 400ms linear infinite;
  396. animation: nprogress-spinner 400ms linear infinite;
  397. }
  398. }
  399. .nprogress-custom-parent {
  400. overflow: hidden;
  401. position: relative;
  402. #nprogress .spinner,
  403. #nprogress .bar {
  404. position: absolute;
  405. }
  406. }
  407. @keyframes nprogress-spinner {
  408. 0% {
  409. transform: rotate(0deg);
  410. }
  411. 100% {
  412. transform: rotate(360deg);
  413. }
  414. }