globals.scss 11 KB

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