globals.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. .buttons {
  159. @apply flex;
  160. }
  161. .btn {
  162. @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;
  163. svg {
  164. @apply w-5 h-5 fill-current;
  165. &.icon-sun {
  166. @apply dark:hidden;
  167. }
  168. &.icon-moon {
  169. @apply hidden dark:block;
  170. }
  171. }
  172. + .btn {
  173. @apply ml-2;
  174. }
  175. }
  176. .menu-btn {
  177. @apply md:hidden;
  178. svg {
  179. &.icon-menu {
  180. rect {
  181. transform: translate(0, 0) rotateZ(0) scaleX(1);
  182. transform-origin: center center;
  183. transition: all 0.2s ease 0s;
  184. }
  185. }
  186. }
  187. }
  188. &.open {
  189. .menu {
  190. @apply block md:flex;
  191. }
  192. .menu-btn {
  193. svg {
  194. &.icon-menu {
  195. rect {
  196. &.r-1 {
  197. transform: translate(1.5px, 2.6px) rotateZ(-45deg);
  198. }
  199. &.r-2 {
  200. transform: translate(0, 0) rotateZ(0) scaleX(0);
  201. }
  202. &.r-3 {
  203. transform: translate(1.5px, -2.2px) rotateZ(45deg);
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. // .breadcrumbs {
  211. // @apply hidden lg:flex;
  212. // }
  213. .search-input {
  214. @apply mx-5 my-2 md:my-0;
  215. }
  216. }
  217. .search-input {
  218. @apply relative;
  219. .icon-search {
  220. @apply absolute left-2 h-full w-5 fill-sky-500;
  221. }
  222. input {
  223. @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;
  224. }
  225. }
  226. .novel-title {
  227. @apply mt-5 mb-2 flex justify-between text-2xl sm:text-3xl font-extrabold text-gray-900 tracking-tight dark:text-gray-200;
  228. }
  229. .novel-list {
  230. @apply flex flex-wrap -mx-1.5 md:-mx-2 lg:-mx-4;
  231. .novel-item {
  232. @apply w-1/4 px-1.5 my-2;
  233. @apply md:px-2 lg:w-1/5 lg:px-4 xl:w-[12.5%];
  234. }
  235. }
  236. .novel-item {
  237. a {
  238. color: inherit;
  239. }
  240. }
  241. .novel-item-title {
  242. @apply line-clamp-2 text-xs font-bold leading-none my-1 lg:text-sm text-gray-700 dark:text-white;
  243. }
  244. .novel-item-desc {
  245. @apply text-xs leading-none whitespace-nowrap text-ellipsis block overflow-hidden w-full;
  246. }
  247. .novel-cover {
  248. @apply block before:block before:pt-[135%] relative select-none;
  249. &::after {
  250. @apply absolute left-0 top-0 h-full w-full;
  251. content: "";
  252. background-image: linear-gradient(
  253. 90deg,
  254. rgba(0, 0, 0, 0.4) 4px,
  255. rgba(0, 0, 0, 0) 7px,
  256. rgba(255, 255, 255, 0.35) 8px,
  257. rgba(0, 0, 0, 0.3) 9px,
  258. rgba(0, 0, 0, 0.3) 12px,
  259. rgba(255, 255, 255, 0.25) 13px,
  260. transparent 24px
  261. ),
  262. linear-gradient(
  263. 310deg,
  264. transparent 0%,
  265. transparent 70%,
  266. rgba(255, 255, 255, 0.4) 100%
  267. ),
  268. linear-gradient(
  269. 30deg,
  270. rgba(0, 0, 0, 0.6) 0%,
  271. transparent 30%,
  272. transparent 100%
  273. ),
  274. linear-gradient(
  275. 320deg,
  276. rgba(0, 0, 0, 0.4) 0%,
  277. transparent 30%,
  278. transparent 100%
  279. );
  280. box-shadow: inset -1px 1px 2px rgba(255, 255, 255, 0.5);
  281. margin: auto;
  282. border-radius: 5px 0 0 5px;
  283. }
  284. img {
  285. @apply absolute left-0 top-0 w-full h-full object-cover;
  286. border-radius: 5px 0 0 5px;
  287. }
  288. }
  289. .tabs {
  290. @apply border-b border-gray-200 space-x-6 flex whitespace-nowrap dark:border-gray-200/5;
  291. @apply overflow-x-auto snap-x scrollbar:h-px scrollbar:w-px scrollbar-track:bg-gray-100 scrollbar-thumb:bg-gray-300;
  292. @apply dark:scrollbar-track:bg-gray-800 dark:scrollbar-thumb:bg-gray-700;
  293. .tab {
  294. @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;
  295. &.active,
  296. &.Mui-selected {
  297. @apply text-sky-500 border-current;
  298. }
  299. }
  300. }
  301. .tags {
  302. @apply flex flex-wrap justify-start gap-2;
  303. }
  304. .tag {
  305. @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;
  306. }
  307. .sub-title {
  308. @apply text-lg font-bold mt-4 mb-2;
  309. }
  310. .breadcrumbs {
  311. @apply max-w-full;
  312. ul {
  313. @apply whitespace-nowrap w-full overflow-hidden text-ellipsis; // flex items-center
  314. li {
  315. @apply inline items-center;
  316. a {
  317. @apply cursor-pointer hover:underline; // flex items-center
  318. &:focus {
  319. @apply outline-none;
  320. }
  321. &:focus-visible {
  322. outline: 2px solid currentColor;
  323. outline-offset: 2px;
  324. }
  325. }
  326. + *:before {
  327. content: "";
  328. @apply ml-2 mr-3 inline-block h-1.5 w-1.5 rotate-45 transform opacity-40 align-middle;
  329. border-top: 1px solid;
  330. border-right: 1px solid;
  331. background-color: transparent;
  332. }
  333. }
  334. }
  335. }
  336. .footer {
  337. @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;
  338. .container {
  339. @apply py-10 flex items-center whitespace-nowrap gap-5 flex-wrap justify-center;
  340. }
  341. .logo {
  342. @apply inline-flex items-center justify-center flex-shrink-0 select-none;
  343. img {
  344. @apply w-8 h-8 mr-2;
  345. }
  346. span {
  347. @apply hidden text-2xl font-bold md:block text-black dark:text-white;
  348. }
  349. }
  350. .copyright {
  351. @apply text-center text-sm leading-6 text-gray-500;
  352. }
  353. .links {
  354. @apply flex items-center justify-center space-x-4 text-sm font-semibold leading-6 text-gray-700 dark:text-gray-400;
  355. }
  356. .divider {
  357. @apply h-4 w-px bg-gray-500/20;
  358. }
  359. }
  360. #nprogress {
  361. pointer-events: none;
  362. .bar {
  363. // background: ${color};
  364. position: fixed;
  365. z-index: 1031;
  366. top: 0;
  367. left: 0;
  368. width: 100%;
  369. // height: ${height}px;
  370. }
  371. .peg {
  372. display: block;
  373. position: absolute;
  374. right: 0px;
  375. width: 100px;
  376. height: 100%;
  377. // box-shadow: 0 0 10px ${color}, 0 0 5px ${color};
  378. opacity: 1;
  379. -webkit-transform: rotate(3deg) translate(0px, -4px);
  380. -ms-transform: rotate(3deg) translate(0px, -4px);
  381. transform: rotate(3deg) translate(0px, -4px);
  382. }
  383. .spinner {
  384. display: "block";
  385. position: fixed;
  386. z-index: 1031;
  387. top: 15px;
  388. right: 15px;
  389. }
  390. .spinner-icon {
  391. width: 18px;
  392. height: 18px;
  393. box-sizing: border-box;
  394. border: solid 2px transparent;
  395. // border-top-color: ${color};
  396. // border-left-color: ${color};
  397. border-radius: 50%;
  398. -webkit-animation: nprogresss-spinner 400ms linear infinite;
  399. animation: nprogress-spinner 400ms linear infinite;
  400. }
  401. }
  402. .nprogress-custom-parent {
  403. overflow: hidden;
  404. position: relative;
  405. #nprogress .spinner,
  406. #nprogress .bar {
  407. position: absolute;
  408. }
  409. }
  410. @keyframes nprogress-spinner {
  411. 0% {
  412. transform: rotate(0deg);
  413. }
  414. 100% {
  415. transform: rotate(360deg);
  416. }
  417. }