main.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  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 .username {
  358. color: var(--text);
  359. }
  360. .grid .author {
  361. display: flex;
  362. gap: 0 .3rem;
  363. align-items: center;
  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. .expand-checkbox {
  373. display: none;
  374. }
  375. .truncated {
  376. max-height: 8rem;
  377. overflow: hidden;
  378. mask-image: linear-gradient(white 25%, transparent 100%);
  379. -webkit-mask-image: linear-gradient(white 25%, transparent 100%);
  380. }
  381. .expand-checkbox:checked + .truncated {
  382. max-height: inherit;
  383. mask-image: none;
  384. -webkit-mask-image: none;
  385. }
  386. .expand-checkbox:checked ~ .center {
  387. display: none;
  388. }
  389. .expand-button {
  390. user-select: none;
  391. cursor: pointer;
  392. color: var(--accent);
  393. font-weight: bold;
  394. }
  395. /* /artworks */
  396. .artwork-images {
  397. text-align: center;
  398. }
  399. .artwork-images a {
  400. display: block;
  401. }
  402. .artwork-images img {
  403. margin-bottom: 1rem;
  404. text-align: center;
  405. display: inline-block;
  406. width: auto;
  407. height: auto;
  408. max-width: 100%;
  409. max-height: 100vh;
  410. }
  411. .artwork-images summary {
  412. margin: 0;
  413. }
  414. .artwork-info {
  415. max-width: 36rem;
  416. margin: auto;
  417. padding: 1rem;
  418. }
  419. .description {
  420. margin: 1rem 0;
  421. }
  422. .description a {
  423. color: var(--accent);
  424. }
  425. .tags, .stats {
  426. display: flex;
  427. flex-wrap: wrap;
  428. gap: .5rem;
  429. margin: 1rem 0;
  430. }
  431. .tags a {
  432. color: var(--text);
  433. background-color: var(--widget-bg);
  434. padding: .3rem .75rem;
  435. border-radius: 100vw;
  436. font-size: .9rem;
  437. text-overflow: ellipsis;
  438. white-space: nowrap;
  439. overflow: hidden;
  440. transition: .2s;
  441. }
  442. .tags a:hover {
  443. color: var(--text-lit);
  444. background-color: var(--widget-bg-hovered);
  445. }
  446. .tags a span {
  447. color: var(--accent);
  448. vertical-align: middle;
  449. }
  450. .tags .warning {
  451. background-color: var(--widget-bg-warning);
  452. color: var(--text-on-colored-bg);
  453. }
  454. .tags .warning:hover {
  455. background-color: var(--widget-bg-warning-hovered);
  456. }
  457. .comments {
  458. max-width: 36rem;
  459. margin: auto;
  460. padding: 1rem;
  461. }
  462. .comment {
  463. display: flex;
  464. gap: 0 .5rem;
  465. margin-bottom: 1rem;
  466. }
  467. .comment > :first-child {
  468. flex: 0 0 auto;
  469. }
  470. .comment > :last-child {
  471. flex: 1;
  472. }
  473. .comment-info a {
  474. font-weight: bold;
  475. vertical-align: middle;
  476. margin-right: .3rem;
  477. }
  478. .comment-content {
  479. margin: .3rem 0;
  480. }
  481. .comment .button {
  482. margin-left: -.5rem;
  483. }
  484. .emoji {
  485. width: 1.25rem;
  486. height: 1.25rem;
  487. vertical-align: -.25rem;
  488. margin: 0 .1rem;
  489. background-color: transparent;
  490. }
  491. .stamp {
  492. width: 6rem;
  493. height: 6rem;
  494. border-radius: .5rem;
  495. }
  496. .comment-view-replies {
  497. margin-left: 3rem;
  498. }
  499. /* /users */
  500. .category-selector {
  501. width: 100%;
  502. display: flex;
  503. }
  504. .category-selector a {
  505. border-top: 2px solid var(--division);
  506. color: var(--text-dim);
  507. padding: 1rem .5rem;
  508. flex: 1 1 auto;
  509. text-align: center;
  510. font-weight: bold;
  511. transition: .2s;
  512. }
  513. .category-selector a:hover {
  514. color: var(--text);
  515. }
  516. .category-selector a.selected {
  517. border-top: 2px solid var(--accent);
  518. color: var(--text-lit);
  519. }
  520. .category-selector + h2 {
  521. margin-top: 0;
  522. }
  523. .frequent-tags {
  524. display: flex;
  525. gap: .5rem;
  526. margin: 1rem 0;
  527. overflow-x: scroll;
  528. scrollbar-width: thin;
  529. padding-bottom: .5rem;
  530. }
  531. .frequent-tags a {
  532. color: var(--text);
  533. background-color: var(--widget-bg);
  534. padding: .3rem 1rem;
  535. border-radius: .5rem;
  536. font-size: .9rem;
  537. display: flex;
  538. flex-direction: column;
  539. align-items: center;
  540. justify-content: center;
  541. flex: 0 0 auto;
  542. transition: .2s;
  543. }
  544. .frequent-tags a:hover {
  545. color: var(--text-lit);
  546. background-color: var(--widget-bg-hovered);
  547. }
  548. .frequent-tags b {
  549. color: var(--accent);
  550. }
  551. /* /tags */
  552. .tag-bar {
  553. margin: 1rem 0;
  554. }
  555. .tag-icon {
  556. width: 5rem;
  557. height: 5rem;
  558. border-radius: .5rem;
  559. object-fit: cover;
  560. object-position: center top;
  561. }
  562. .tag-bar h1, .tag-bar p {
  563. margin: 0;
  564. }
  565. /* /settings */
  566. .notice {
  567. background-color: var(--widget-bg);
  568. border-radius: .5rem;
  569. padding: 1rem;
  570. text-align: left;
  571. }
  572. .notice p {
  573. margin: 0;
  574. }
  575. .options > div {
  576. margin: 1rem 0;
  577. display: flex;
  578. gap: 1rem;
  579. align-items: center;
  580. justify-content: space-between;
  581. }