globals.scss 12 KB

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