main.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. /* color scheme */
  2. :root {
  3. --switch-ball: whitesmoke;
  4. --text-on-colored-bg: white;
  5. }
  6. .dark {
  7. --bg: #1a2328;
  8. --nav-bg: #283136;
  9. --card-bg: #283136;
  10. --text: #d0d0d0;
  11. --text-dim: #a0a0a0;
  12. --text-lit: #f0f0f0;
  13. --accent: #58a6ff;
  14. --division: #ffffff30;
  15. --widget-bg: #ffffff10;
  16. --widget-bg-hovered: #ffffff20;
  17. --widget-bg-selected: #ffffff30;
  18. --widget-bg-accent: #3a88e1;
  19. --widget-bg-accent-hovered: #3479c9;
  20. --widget-bg-warning: #ae3c47;
  21. --widget-bg-warning-hovered: #9c3540;
  22. --img-unloaded-bg: #00000020;
  23. --content-warning-bg: #ff384c;
  24. --page-count-bg: #00000080;
  25. color-scheme: dark;
  26. }
  27. .light {
  28. --bg: #f0f0f0;
  29. --nav-bg: #f8f8f8;
  30. --card-bg: #f8f8f8;
  31. --text: #303030;
  32. --text-dim: #606060;
  33. --text-lit: #101010;
  34. --accent: #4492eb;
  35. --division: #00000020;
  36. --widget-bg: #0000000c;
  37. --widget-bg-hovered: #00000018;
  38. --widget-bg-selected: #00000024;
  39. --widget-bg-accent: #3a88e1;
  40. --widget-bg-accent-hovered: #3479c9;
  41. --widget-bg-warning: #f65463;
  42. --widget-bg-warning-hovered: #de4a58;
  43. --img-unloaded-bg: #00000010;
  44. --content-warning-bg: #ff384c;
  45. --page-count-bg: #00000080;
  46. color-scheme: light;
  47. }
  48. /* base components */
  49. body {
  50. margin: 0;
  51. min-height: 100vh;
  52. display: flex;
  53. flex-direction: column;
  54. background-color: var(--bg);
  55. font-family: sans-serif;
  56. color: var(--text);
  57. }
  58. nav {
  59. background-color: var(--nav-bg);
  60. }
  61. nav .container {
  62. padding: .5rem 1rem;
  63. max-width: 64rem;
  64. margin: auto;
  65. display: flex;
  66. gap: 1rem;
  67. align-items: center;
  68. justify-content: space-between;
  69. }
  70. nav a {
  71. color: var(--accent);
  72. text-decoration: none;
  73. }
  74. nav .title {
  75. font-size: 1.25rem;
  76. }
  77. nav .search-bar {
  78. flex: 0 1 16rem;
  79. }
  80. input[type=text], textarea {
  81. width: 100%;
  82. color: var(--text);
  83. background-color: var(--widget-bg);
  84. padding: .5rem 1rem;
  85. border: none;
  86. border-radius: 100vw;
  87. box-sizing: border-box;
  88. transition: background-color .2s;
  89. }
  90. input[type=text]:hover, textarea:hover {
  91. background-color: var(--widget-bg-hovered);
  92. }
  93. input[type=text]:focus, textarea:focus {
  94. background-color: var(--widget-bg);
  95. outline: 2px solid var(--widget-bg-accent);
  96. }
  97. main {
  98. flex: 1 1 auto;
  99. width: 100%;
  100. word-break: break-word;
  101. }
  102. main a {
  103. color: var(--text-lit);
  104. text-decoration: none;
  105. }
  106. main .container {
  107. max-width: 48rem;
  108. margin: auto;
  109. padding: 0 .5rem;
  110. }
  111. main .container-card {
  112. background-color: var(--card-bg);
  113. border-radius: 1rem;
  114. margin: 1rem auto;
  115. padding: 0;
  116. overflow: hidden;
  117. }
  118. main .container-big {
  119. max-width: 64rem;
  120. }
  121. main .container-small {
  122. padding: 0 1rem;
  123. max-width: 24rem;
  124. }
  125. footer {
  126. margin-top: auto;
  127. color: var(--text-dim);
  128. }
  129. footer a {
  130. color: var(--text-dim);
  131. text-decoration: none;
  132. transition: .2s;
  133. }
  134. footer a:hover {
  135. color: var(--text-lit);
  136. }
  137. footer .container {
  138. padding: .5rem;
  139. display: flex;
  140. flex-wrap: wrap;
  141. gap: 0 1rem;
  142. justify-content: center;
  143. }
  144. /* widgets */
  145. .center {
  146. text-align: center;
  147. }
  148. hr {
  149. border: none;
  150. height: 1px;
  151. background: var(--division);
  152. }
  153. h1, h2 {
  154. color: var(--text-lit);
  155. }
  156. .container-card hr {
  157. margin: 0;
  158. }
  159. .container-card h1 {
  160. font-size: 1.5rem;
  161. }
  162. .container-card h2 {
  163. font-size: 1.25rem;
  164. }
  165. .button, button, .collapsed > summary {
  166. color: var(--text);
  167. background-color: var(--widget-bg);
  168. display: inline-block;
  169. padding: .5rem 1.5rem;
  170. border-radius: 100vw;
  171. font-weight: bold;
  172. transition: .2s;
  173. }
  174. .button:hover, button:hover, .collapsed > summary:hover {
  175. color: var(--text-lit);
  176. background-color: var(--widget-bg-hovered);
  177. }
  178. button {
  179. cursor: pointer;
  180. border: none;
  181. font-size: 1rem;
  182. }
  183. .collapsed {
  184. text-align: center;
  185. }
  186. .collapsed > summary {
  187. cursor: pointer;
  188. list-style: none;
  189. margin: 1rem 0;
  190. }
  191. .collapsed > summary::-webkit-details-marker {
  192. display: none;
  193. }
  194. .collapsed[open] > summary {
  195. display: none;
  196. }
  197. label[for] {
  198. cursor: pointer;
  199. }
  200. .switch {
  201. appearance: none;
  202. width: 4rem;
  203. height: 2rem;
  204. background-color: var(--widget-bg-hovered);
  205. border-radius: 100vw;
  206. cursor: pointer;
  207. margin: 0;
  208. transition: .2s;
  209. }
  210. .switch:hover {
  211. background-color: var(--widget-bg-selected);
  212. }
  213. .switch:checked {
  214. background-color: var(--widget-bg-accent);
  215. }
  216. .switch:checked:hover {
  217. background-color: var(--widget-bg-accent-hovered);
  218. }
  219. .switch::after {
  220. content: '';
  221. position: relative;
  222. display: block;
  223. width: 1.5rem;
  224. height: 1.5rem;
  225. top: .25rem;
  226. left: .25rem;
  227. border-radius: 100vw;
  228. background-color: var(--switch-ball);
  229. transition: 0.3s;
  230. }
  231. .switch:checked::after {
  232. left: calc(100% - 1.75rem);
  233. }
  234. select {
  235. color: var(--text-lit);
  236. background-color: var(--widget-bg);
  237. border: none;
  238. padding: 0 .75rem;
  239. border-radius: 100vw;
  240. cursor: pointer;
  241. text-align: center;
  242. height: 2rem;
  243. transition: .2s;
  244. }
  245. select:hover {
  246. background-color: var(--widget-bg-hovered);
  247. }
  248. option {
  249. background-color: var(--bg);
  250. }
  251. img {
  252. background-color: var(--img-unloaded-bg);
  253. color: var(--text);
  254. }
  255. .avatar {
  256. width: 3rem;
  257. height: 3rem;
  258. border-radius: 100vw;
  259. object-fit: cover;
  260. object-position: center top;
  261. }
  262. .img-with-text {
  263. display: flex;
  264. gap: 0 .5rem;
  265. align-items: center;
  266. }
  267. .paginator {
  268. display: flex;
  269. flex-wrap: wrap;
  270. gap: .5rem .5rem;
  271. align-items: center;
  272. justify-content: center;
  273. line-height: 2.5rem;
  274. }
  275. .paginator > a {
  276. box-sizing: border-box;
  277. color: var(--text);
  278. background-color: var(--widget-bg);
  279. min-width: 2.5rem;
  280. text-align: center;
  281. padding: 0 .5rem;
  282. border-radius: 100vw;
  283. font-weight: bold;
  284. transition: .2s;
  285. }
  286. .paginator a:hover {
  287. color: var(--text-lit);
  288. background-color: var(--widget-bg-hovered);
  289. }
  290. .paginator a.selected {
  291. color: var(--text-lit);
  292. background-color: var(--widget-bg-selected);
  293. cursor: default;
  294. }
  295. .grid {
  296. display: grid;
  297. grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  298. gap: 1rem .5rem;
  299. text-align: left;
  300. }
  301. .collapsed > .grid {
  302. margin-top: 1rem;
  303. }
  304. .grid > div {
  305. display: flex;
  306. flex-direction: column;
  307. gap: .3rem;
  308. }
  309. .thumbnail {
  310. position: relative;
  311. aspect-ratio: 1;
  312. border-radius: .5rem;
  313. background-color: var(--img-unloaded-bg);
  314. overflow: hidden;
  315. transition: .2s;
  316. }
  317. .thumbnail:hover {
  318. opacity: .8;
  319. }
  320. .thumbnail .extra-info {
  321. position: absolute;
  322. left: 0;
  323. right: 0;
  324. display: flex;
  325. padding: 4px;
  326. font-size: .75rem;
  327. line-height: 1.25rem;
  328. color: var(--text-on-colored-bg);
  329. pointer-events: none;
  330. }
  331. .thumbnail .content-warning {
  332. box-sizing: border-box;
  333. background-color: var(--content-warning-bg);
  334. padding: 0 .3rem;
  335. border-radius: .5rem;
  336. font-weight: bold;
  337. }
  338. .thumbnail .page-count {
  339. margin-left: auto;
  340. box-sizing: border-box;
  341. background-color: var(--page-count-bg);
  342. min-width: 1.25rem;
  343. text-align: center;
  344. padding: 0 .3rem;
  345. border-radius: 100vw;
  346. font-weight: bold;
  347. }
  348. .thumbnail img {
  349. background-color: transparent;
  350. width: 100%;
  351. }
  352. .grid .title, .grid .username {
  353. text-overflow: ellipsis;
  354. white-space: nowrap;
  355. overflow: hidden;
  356. }
  357. .grid .author {
  358. display: none;
  359. gap: 0 .3rem;
  360. align-items: center;
  361. }
  362. .grid.show-author .author {
  363. display: flex;
  364. }
  365. .grid .avatar {
  366. width: 1.5rem;
  367. height: 1.5rem;
  368. border-radius: 100vw;
  369. object-fit: cover;
  370. object-position: center top;
  371. }
  372. .grid .username {
  373. color: var(--text);
  374. }
  375. .expand-checkbox {
  376. display: none;
  377. }
  378. .truncated {
  379. max-height: 8rem;
  380. overflow: hidden;
  381. mask-image: linear-gradient(white 25%, transparent 100%);
  382. -webkit-mask-image: linear-gradient(white 25%, transparent 100%);
  383. }
  384. .expand-checkbox:checked + .truncated {
  385. max-height: inherit;
  386. mask-image: none;
  387. -webkit-mask-image: none;
  388. }
  389. .expand-checkbox:checked ~ .center {
  390. display: none;
  391. }
  392. .expand-button {
  393. user-select: none;
  394. cursor: pointer;
  395. color: var(--accent);
  396. font-weight: bold;
  397. }
  398. /* /artworks */
  399. .artwork-images {
  400. text-align: center;
  401. }
  402. .artwork-images a {
  403. display: block;
  404. }
  405. .artwork-images img {
  406. margin-bottom: 1rem;
  407. text-align: center;
  408. display: inline-block;
  409. width: auto;
  410. height: auto;
  411. max-width: 100%;
  412. max-height: 100vh;
  413. }
  414. .artwork-images summary {
  415. margin: 0;
  416. }
  417. .artwork-info {
  418. max-width: 36rem;
  419. margin: auto;
  420. padding: 1rem;
  421. }
  422. .description {
  423. margin: 1rem 0;
  424. }
  425. .description a {
  426. color: var(--accent);
  427. }
  428. .tags, .stats {
  429. display: flex;
  430. flex-wrap: wrap;
  431. gap: .5rem;
  432. margin: 1rem 0;
  433. }
  434. .tags a {
  435. color: var(--text);
  436. background-color: var(--widget-bg);
  437. padding: .3rem .75rem;
  438. border-radius: 100vw;
  439. font-size: .9rem;
  440. text-overflow: ellipsis;
  441. white-space: nowrap;
  442. overflow: hidden;
  443. transition: .2s;
  444. }
  445. .tags a:hover {
  446. color: var(--text-lit);
  447. background-color: var(--widget-bg-hovered);
  448. }
  449. .tags a span {
  450. color: var(--accent);
  451. vertical-align: middle;
  452. }
  453. .tags .warning {
  454. background-color: var(--widget-bg-warning);
  455. color: var(--text-on-colored-bg);
  456. }
  457. .tags .warning:hover {
  458. background-color: var(--widget-bg-warning-hovered);
  459. }
  460. .comments {
  461. max-width: 36rem;
  462. margin: auto;
  463. padding: 1rem;
  464. }
  465. .comment {
  466. display: flex;
  467. gap: 0 .5rem;
  468. margin-bottom: 1rem;
  469. }
  470. .comment > :first-child {
  471. flex: 0 0 auto;
  472. }
  473. .comment > :last-child {
  474. flex: 1;
  475. }
  476. .comment-info a {
  477. font-weight: bold;
  478. vertical-align: middle;
  479. margin-right: .3rem;
  480. }
  481. .comment-content {
  482. margin: .3rem 0;
  483. }
  484. .comment .button {
  485. margin-left: -.5rem;
  486. }
  487. .emoji {
  488. width: 1.25rem;
  489. height: 1.25rem;
  490. vertical-align: -.25rem;
  491. margin: 0 .1rem;
  492. background-color: transparent;
  493. }
  494. .stamp {
  495. width: 6rem;
  496. height: 6rem;
  497. border-radius: .5rem;
  498. }
  499. .comment-view-replies {
  500. margin-left: 3rem;
  501. }
  502. /* /users */
  503. .category-selector {
  504. width: 100%;
  505. display: flex;
  506. }
  507. .category-selector a {
  508. border-top: 2px solid var(--division);
  509. color: var(--text-dim);
  510. padding: 1rem .5rem;
  511. flex: 1 1 auto;
  512. text-align: center;
  513. font-weight: bold;
  514. transition: .2s;
  515. }
  516. .category-selector a:hover {
  517. color: var(--text);
  518. }
  519. .category-selector a.selected {
  520. border-top: 2px solid var(--accent);
  521. color: var(--text-lit);
  522. }
  523. .category-selector + h2 {
  524. margin-top: 0;
  525. }
  526. .frequent-tags {
  527. display: flex;
  528. gap: .5rem;
  529. margin: 1rem 0;
  530. overflow-x: scroll;
  531. scrollbar-width: thin;
  532. padding-bottom: .5rem;
  533. }
  534. .frequent-tags a {
  535. color: var(--text);
  536. background-color: var(--widget-bg);
  537. padding: .3rem 1rem;
  538. border-radius: .5rem;
  539. font-size: .9rem;
  540. display: flex;
  541. flex-direction: column;
  542. align-items: center;
  543. justify-content: center;
  544. flex: 0 0 auto;
  545. transition: .2s;
  546. }
  547. .frequent-tags a:hover {
  548. color: var(--text-lit);
  549. background-color: var(--widget-bg-hovered);
  550. }
  551. .frequent-tags b {
  552. color: var(--accent);
  553. }
  554. /* /tags */
  555. .tag-bar {
  556. margin: 1rem 0;
  557. }
  558. .tag-icon {
  559. width: 5rem;
  560. height: 5rem;
  561. border-radius: .5rem;
  562. object-fit: cover;
  563. object-position: center top;
  564. }
  565. .tag-bar h1, .tag-bar p {
  566. margin: 0;
  567. }
  568. /* /settings */
  569. .notice {
  570. background-color: var(--widget-bg);
  571. border-radius: .5rem;
  572. padding: 1rem;
  573. text-align: left;
  574. }
  575. .notice p {
  576. margin: 0;
  577. }
  578. .options > div {
  579. margin: 1rem 0;
  580. display: flex;
  581. gap: 1rem;
  582. align-items: center;
  583. justify-content: space-between;
  584. }