globals.scss 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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-paper: #fff;
  11. --color-paper-alpha: rgba(255, 255, 255, 0.5);
  12. // primary
  13. --color-primary: #1976d2;
  14. // secondary
  15. --color-secondary: #9c27b0;
  16. // error
  17. --color-error: #d32f2f;
  18. // warning
  19. --color-warning: #ed6c02;
  20. // info
  21. --color-info: #0288d1;
  22. // success
  23. --color-success: #2e7d32;
  24. --color-gray-light: #808080;
  25. --color-gray-dark: #29292e;
  26. }
  27. .dark *,
  28. .dark ::before,
  29. .dark ::after {
  30. color-scheme: dark;
  31. --color-bg-default: #18181b;
  32. --color-paper: #121212;
  33. --color-paper-alpha: rgba(18, 18, 18, 0.5);
  34. // primary
  35. --color-primary: #90caf9;
  36. // secondary
  37. --color-secondary: #ce93d8;
  38. // error
  39. --color-error: #f44336;
  40. // warning
  41. --color-warning: #ffa726;
  42. // info
  43. --color-info: #29b6f6;
  44. // success
  45. --color-success: #66bb6a;
  46. --color-gray-light: #808080;
  47. --color-gray-dark: #29292e;
  48. }
  49. * {
  50. /* @apply selection:bg-hb; */
  51. /* @apply transition selection:bg-hb;
  52. transition-timing-function: line; */
  53. }
  54. body {
  55. @apply bg-default text-gray-dark font-sans;
  56. }
  57. a {
  58. @apply text-gray-dark;
  59. }
  60. }
  61. @layer components {
  62. .container {
  63. @apply px-4 mx-auto;
  64. }
  65. }
  66. #__next {
  67. @apply w-full overflow-hidden min-h-screen;
  68. }
  69. .header {
  70. @apply sticky border-b py-2 shadow bg-paper z-40;
  71. .container {
  72. @apply flex justify-between items-center;
  73. }
  74. .logo {
  75. @apply flex items-center flex-shrink-0 mr-5 select-none md:mr-10;
  76. img {
  77. @apply w-10 h-10 mr-2;
  78. }
  79. span {
  80. @apply hidden text-2xl font-bold md:block;
  81. }
  82. }
  83. .menu {
  84. @apply hidden absolute left-0 top-full w-full py-5 bg-paper-alpha backdrop-blur;
  85. @apply md:flex md:relative md:items-center md:p-0;
  86. nav {
  87. @apply flex-1;
  88. ul {
  89. @apply md:flex;
  90. li {
  91. @apply relative;
  92. }
  93. }
  94. }
  95. .menu-item {
  96. @apply flex py-2 px-5 items-center text-gray-dark md:text-gray-light md:hover:text-primary;
  97. svg {
  98. @apply mr-1 fill-current;
  99. }
  100. }
  101. .sub-menu {
  102. @apply hidden;
  103. @apply absolute bg-default shadow-lg rounded-xl top-full;
  104. &::before {
  105. content: "";
  106. position: absolute;
  107. bottom: 100%;
  108. left: 25px;
  109. border-bottom: 7px solid var(--color-bg-default);
  110. border-left: 6px dashed transparent;
  111. border-right: 6px dashed transparent;
  112. height: 0;
  113. width: 0;
  114. }
  115. ul {
  116. @apply py-2 block rounded-l-lg whitespace-nowrap;
  117. &.sub-menu-sized {
  118. @apply h-[312px] w-[640px];
  119. }
  120. }
  121. .sub-menu-list {
  122. @apply absolute left-[132px] hidden top-0 h-[312px] w-[508px] bg-paper rounded-r-lg py-2 px-4;
  123. p {
  124. @apply flex flex-wrap;
  125. strong {
  126. @apply block w-full py-1 px-4;
  127. }
  128. a {
  129. @apply w-1/3 block hover:bg-default py-1 px-4 rounded;
  130. }
  131. }
  132. }
  133. li {
  134. @apply static;
  135. > a {
  136. @apply block py-3 px-4;
  137. }
  138. &:hover {
  139. @apply bg-paper;
  140. .sub-menu-list {
  141. @apply block;
  142. }
  143. }
  144. &:first-child {
  145. .sub-menu-list {
  146. @apply block;
  147. }
  148. }
  149. }
  150. }
  151. li:hover {
  152. .sub-menu {
  153. @apply md:block;
  154. }
  155. }
  156. }
  157. .search-input {
  158. @apply relative mx-5 my-2 md:my-0;
  159. .icon-search {
  160. @apply absolute left-2 h-full w-5;
  161. }
  162. input {
  163. @apply block w-full border rounded-full pl-10 pr-4 py-1;
  164. }
  165. }
  166. .menu-btn {
  167. @apply bg-primary rounded-full p-2 md:hidden;
  168. svg {
  169. @apply w-5 h-5 fill-white;
  170. &.icon-menu {
  171. rect {
  172. transform: translate(0, 0) rotateZ(0) scaleX(1);
  173. transform-origin: center center;
  174. transition: all 0.2s ease 0s;
  175. }
  176. }
  177. }
  178. }
  179. &.open {
  180. .menu {
  181. @apply block;
  182. }
  183. .menu-btn {
  184. svg {
  185. &.icon-menu {
  186. rect {
  187. &.r-1 {
  188. transform: translate(1.5px, 2.6px) rotateZ(-45deg);
  189. }
  190. &.r-2 {
  191. transform: translate(0, 0) rotateZ(0) scaleX(0);
  192. }
  193. &.r-3 {
  194. transform: translate(1.5px, -2.2px) rotateZ(45deg);
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. .novel-title {
  203. @apply text-xl font-bold mt-5 mb-2 flex justify-between;
  204. }
  205. .novel-list {
  206. @apply flex flex-wrap -mx-1.5 md:-mx-2 lg:-mx-4;
  207. .novel-item {
  208. @apply w-1/4 px-1.5 my-2;
  209. @apply md:px-2 lg:w-1/5 lg:px-4 xl:w-[12.5%];
  210. }
  211. }
  212. .novel-item {
  213. a {
  214. color: inherit;
  215. }
  216. }
  217. .novel-item-title {
  218. @apply line-clamp-2 text-xs font-bold leading-none my-1 lg:text-sm;
  219. }
  220. .novel-item-desc {
  221. @apply text-xs text-gray-light leading-none whitespace-nowrap text-ellipsis block overflow-hidden w-full;
  222. }
  223. .novel-cover {
  224. @apply block before:block before:pt-[135%] relative;
  225. &::after {
  226. @apply absolute left-0 top-0 h-full w-full;
  227. content: "";
  228. // // background-image: repeating-linear-gradient(
  229. // // 90deg,
  230. // // rgba(255, 255, 255, 0) 0%,
  231. // // rgba(255, 255, 255, 0.1) 10%,
  232. // // rgba(0, 0, 0, 0.5) 20%,
  233. // // rgba(0, 0, 0, 0.5) 50%,
  234. // // rgba(0, 0, 0, 0.1) 100%,
  235. // // );
  236. // background-image: linear-gradient(
  237. // 90deg,
  238. // rgba(0, 0, 0, 0.2) 0%,
  239. // rgba(255, 255, 255, 0.3) 40%,
  240. // rgba(0, 0, 0, 0.5) 85%,
  241. // rgba(0, 0, 0, 0) 100%
  242. // );
  243. // background-size: 100% 100%;
  244. // background-image: linear-gradient(
  245. // to right,
  246. // rgb(60, 13, 20) 0.7712082262210797%,
  247. // rgba(255, 255, 255, 0.5) 1.2853470437017995%,
  248. // rgba(255, 255, 255, 0.25) 1.7994858611825193%,
  249. // rgba(255, 255, 255, 0.25) 2.570694087403599%,
  250. // transparent 3.0848329048843186%,
  251. // transparent 4.113110539845758%,
  252. // rgba(255, 255, 255, 0.25) 4.370179948586118%,
  253. // transparent 5.655526992287918%
  254. // );
  255. background-image: linear-gradient(
  256. 90deg,
  257. rgba(0, 0, 0, 0.4) 4px,
  258. rgba(0, 0, 0, 0) 7px,
  259. rgba(255, 255, 255, 0.35) 8px,
  260. rgba(0, 0, 0, 0.3) 9px,
  261. rgba(0, 0, 0, 0.3) 12px,
  262. rgba(255, 255, 255, 0.25) 13px,
  263. transparent 24px
  264. ),
  265. linear-gradient(
  266. 310deg,
  267. transparent 0%,
  268. transparent 70%,
  269. rgba(255, 255, 255, 0.4) 100%
  270. ),
  271. linear-gradient(
  272. 30deg,
  273. rgba(0, 0, 0, 0.6) 0%,
  274. transparent 30%,
  275. transparent 100%
  276. ),
  277. linear-gradient(
  278. 320deg,
  279. rgba(0, 0, 0, 0.4) 0%,
  280. transparent 30%,
  281. transparent 100%
  282. );
  283. box-shadow: inset -1px 1px 2px rgba(255, 255, 255, 0.5);
  284. margin: auto;
  285. border-radius: 5px 0 0 5px;
  286. }
  287. img {
  288. @apply absolute left-0 top-0 w-full h-full object-cover;
  289. border-radius: 5px 0 0 5px;
  290. }
  291. }
  292. .tabs {
  293. @apply flex justify-start mb-5;
  294. .tab {
  295. @apply h-11 border-b-4 border-b-transparent font-bold mr-5;
  296. &.active {
  297. @apply border-b-primary text-primary;
  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 duration-300 text-gray-900 bg-gray-100 rounded px-2.5 py-2 hover:text-primary hover:ring-1 hover:ring-primary;
  306. }
  307. .sub-title {
  308. @apply text-lg font-bold mt-4 mb-2;
  309. }