GreasyFork | Modernized ( Optional Dark Theme )

A much cleaner and more modern version of GreasyFork!

目前为 2020-10-19 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. -- THEME STUFF --
  3. @name GreasyFork | Modernized ( Optional Dark Theme )
  4. @version 1.3.5
  5. @description A much cleaner and more modern version of GreasyFork!
  6.  
  7. -- AUTHOR STUFF --
  8. @namespace Freeplay
  9. @author Freeplay (https://pages.codeberg.org/freeplay/)
  10. @homepageURL https://codeberg.org/Freeplay/UserStyles
  11. @supportURL https://codeberg.org/Freeplay/UserStyles/issues
  12. @preprocessor stylus
  13.  
  14.  
  15. --- SETTINGS ---
  16. @var checkbox darkmode "Dark Mode" 0
  17.  
  18. ==/UserStyle== */
  19. /* Oct, 19 / 20
  20. - Nicer font
  21. - Fixed spacing in some areas
  22. - Fixed alerts box on Dark Mode
  23. - Better sortof seperators
  24. - Transparent blurred header, can be removed by making color-primary var opaque.
  25. - More Tweaks
  26. - Now works with 'Greasy Fork Tweaks'! https://greasyfork.org/en/scripts/368183
  27. /* Oct, 15 / 20
  28. - Added max-width to alerts
  29. - Added boxes around forms and comments
  30. - Added scrollbar-color to firefox
  31. - Added max-heights to script lists
  32. - More stylized buttons
  33. - More fixes
  34. - Made stat charts on Dark Mode light
  35. /* Aug, 31 / 20
  36. - Fixed ad placement in Script Details page
  37. - Less saturated topbar on light theme, You can always change the colors inside of :root{}
  38. - Moved some buttons on scripts list page
  39. /* Aug, 23 / 20
  40. - Properly modernised the Script Details page! :D
  41. /* Aug, 20 / 20
  42. - Softened Shadows
  43. - Changed script details page a bit
  44. - Fixed header on homepage
  45. - Fixed forums on Dark Mode
  46. - Moved search bar to header
  47. - Fixed some textboxes
  48. - More fixes
  49. /* Aug, 16 / 20
  50. - Better positioning & look
  51. - Better sidebar
  52. - Forums support
  53. - Added max-width to some pages
  54. - Better Metadata
  55. */
  56. /* Jul, 6 / 20
  57. - Dark Mode!
  58. */
  59. /* Jun, 7 / 20
  60. - Changed links back to underlines, Didn't work too well in some areas
  61. */
  62. /* Jun, 5 / 20
  63. - Minor changes - AKA other things I forgot to log.
  64. - Modern TextBox
  65. - Sortof Modern Dropdown
  66. - Links are now shown by the blue color instead of the underline, hovering displays underline
  67. - Tweaked Header
  68. */
  69. @-moz-document domain("greasyfork.org") {
  70. :root {
  71. if darkmode {
  72. /* DARK MODE COLORS */
  73. --color-primary: #272b36bd;
  74. --color-secondary: #072b3a ;
  75. --color-tertiary: #2c3242;
  76. --color-bg: #1c1f28;
  77. --color-text: #d1d1d1;
  78. --color-link: #00b3ff;
  79. --color-link-visited: cyan;
  80. --color-highlighted #287721;
  81. --shadow-normal: 0 0 5px rgba(0,0,0,0.1);
  82. --shadow-button: 0px 0px 2px rgba(150,150,150,0);
  83. --border-button: 1px solid rgba(150,150,150,0.1);
  84. } else {
  85. /* LIGHT MODE COLORS */
  86. --color-primary: #980000bd;
  87. --color-secondary: white;
  88. --color-tertiary: white;
  89. --color-bg: #F6F6F6;
  90. --color-text: black;
  91. --color-link: #0265be;
  92. --color-link-visited: #cf2525;
  93. --color-highlighted: #9fefa3;
  94. --shadow-normal: 0 0 20px rgba(221, 221, 221, 1);
  95. --shadow-button: 0px 0px 2px rgba(0,0,0,0.3);
  96. --border-button: 1px solid rgba(0,0,0,0.2);
  97. }
  98. }
  99. * {
  100. transition: background .2s;
  101. }
  102. /* TEXT */
  103. h3, h2 {
  104. color: var(--color-text);
  105. }
  106. p {
  107. color: var(--color-text);
  108. }
  109. pre.prettyprint {
  110. background-color: white;
  111. max-height: none;
  112. }
  113. /* BUTTONS/LINKS */
  114. select, option, input, button, code, #user-control-panel > li,
  115. .pagination > *, .script-list + .pagination > *, .user-list + .pagination > *,
  116. a.list-option-button, #script-links > li > *, #script-feedback-suggestion a, .discussion-actions a, .report-link, .edit-comment,
  117. #about-user > p:last-child > *, #about-user > a:first-child,
  118. #install-area a, .expander, #contribution > a, #support-url > a, .script-in-sets > a,
  119. .sidebarred-main-content > p:last-child a, .sidebarred-main-content > p:first-of-type a {
  120. border: none;
  121. border: var(--border-button);
  122. text-decoration: none;
  123. border-radius: .3rem;
  124. padding: 5px 14px;
  125. font-size: 14px;
  126. /*font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;*/
  127. transition: all .2s;
  128. background-color: var(--color-secondary);
  129. color: var(--color-text) !important;
  130. }
  131. select:hover, input:hover, input:focus, button:hover, #user-control-panel > li:hover,
  132. a.list-option-button:hover, #script-links > li > *:hover, #script-feedback-suggestion a:hover, #script-links .current span, .discussion-actions a:hover, .report-link:hover, .edit-comment:hover,
  133. #about-user > p:last-child > *:hover, #about-user > a:first-child:hover,
  134. .pagination > *:hover, .script-list + .pagination > *:hover, .user-list + .pagination > *:hover, .pagination > *:focus, .script-list + .pagination > *:focus, .user-list + .pagination > *:focus,
  135. #install-area a:hover, .expander:hover, #contribution > a:hover, #support-url > a:hover, .script-in-sets > a:hover,
  136. .sidebarred-main-content > p:last-child a:hover, .sidebarred-main-content > p:first-of-type a:hover {
  137. box-shadow: 0px 0px 8px rgba(0,0,0,0.1) !important;
  138. background: var(--color-tertiary) !important;
  139. text-decoration: none !important;
  140. }
  141. nav > li > a, .pagination > a, #user-control-panel > li > a, #script-links > li > a, div[class="list-option-group"] > ul > li > a, h2 > a ,
  142. .comment-meta-item-main a {
  143. text-decoration: none;
  144. color: var(--color-text);
  145. }
  146. a {
  147. display: inline-block;
  148. }
  149. a, a.discussion-title, a.discussion-title:hover {
  150. text-underline-offset: .25em;
  151. color: var(--color-link);
  152. }
  153. a:hover, a.discussion-title:hover {
  154. text-decoration: underline;
  155. }
  156. a:visited {
  157. color: var(--color-link-visited);
  158. }
  159. body {
  160. background-color: var(--color-bg);
  161. font-family: Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !important;
  162. }
  163. body > .width-constraint {
  164. max-width: 100% !important;
  165. margin: 0;
  166. padding: 10px;
  167. display: flex;
  168. flex-wrap: wrap;
  169. }
  170. body > .width-constraint > * {
  171. width: 100%;
  172. }
  173. body > .width-constraint > section, .notice, .alert {
  174. max-width: 80rem;
  175. margin: auto !important;
  176. }
  177. body > .width-constraint > section:first-child, .notice, .alert {
  178. margin-top: 20px !important;
  179. }
  180. body > .width-constraint > section:last-of-type {
  181. margin-bottom: 40px !important;
  182. }
  183. .alert {
  184. background-color: var(--color-secondary);
  185. margin-bottom: 20px !important;
  186. }
  187. .alert * {
  188. color: var(--color-text) !important;
  189. }
  190. section {
  191. border: none !important;
  192. }
  193. .notice {
  194. background-color: var(--color-secondary);
  195. }
  196. .text-content, .discussion-list, #browse-user-list,
  197. #script-meta, #additional-info, #script-show-info-ad, #script-content .script-discussion-list, canvas,
  198. /*.multiform-page*/, #script-content form:not(.script-in-sets), table, .comment {
  199. padding: 1rem !important;
  200. margin: 0 !important;
  201. margin-bottom: 20px !important;
  202. border: none;
  203. box-shadow: var(--shadow-normal) !important;
  204. background-color: var(--color-tertiary);
  205. color: var(--color-text);
  206. border-radius: 5px;
  207. }
  208. .text-content > *:first-child {
  209. margin-top: 0 !important;
  210. }
  211. .text-content > *:last-child, #script-meta > *:last-child {
  212. margin-bottom: 0 !important;
  213. }
  214. @media only screen and (min-width: 940px) {
  215. body {
  216. margin-top: 44px;
  217. }
  218.  
  219. /* HEADER */
  220. #main-header {
  221. position: fixed;
  222. top: 0;
  223. width: 100%;
  224. height: 44px;
  225. padding: 0;
  226. z-index: 5;
  227. background-image: none;
  228. background-color: var(--color-primary);
  229. backdrop-filter: blur(10px);
  230. }
  231. #main-header > .width-constraint {
  232. max-width: 100%;
  233. padding-left: 10px;
  234. padding-right: 10px;
  235. display: flex !important;
  236. align-items: center;
  237. margin: auto !important;
  238. }
  239. #site-name {
  240. position: absolute;
  241. width: 200px;
  242. min-width: 200px;
  243. height: 30px;
  244. margin-top: auto;
  245. margin-bottom: auto;
  246. }
  247. #site-name img {
  248. height: 30px;
  249. }
  250. #site-name-text {
  251. margin-top: 0 !important;
  252. }
  253. #site-name-text > h1 {
  254. height: 30px;
  255. font-size: 25px;
  256. font-weight: 600;
  257. }
  258.  
  259. #site-nav {
  260. display: flex !important;
  261. height: 40px;
  262. padding-top: 1px;
  263. width: auto;
  264. align-items: center;
  265. margin-left: auto;
  266. margin-top: 0 !important;
  267. }
  268. #site-nav > * {
  269. position: relative !important;
  270. }
  271. #site-nav > nav {
  272. width: 250px !important;
  273. min-width: 250px;
  274. }
  275. #nav-user-info {
  276. width: 100%;
  277. min-width: 300px;
  278. }
  279. #nav-user-info > form > select {
  280. margin: 0 10px;
  281. }
  282. .with-submenu > nav {
  283. background-color: var(--color-primary);
  284. }
  285. /* SIDEBAR */
  286. .sidebar ~ div {
  287. max-width: 50rem;
  288. }
  289. .sidebar {
  290. position: sticky;
  291. top: 44px;
  292. order: -1;
  293. margin: -10px 15px -10px -10px;
  294. padding: 20px 0 20px 10px;
  295. height: calc(100vh - 84px);
  296. max-height: calc(100vh - 84px);
  297. overflow-y: auto;
  298. overflow-x: hidden;
  299. z-index: 6;
  300. text-decoration: none !important;
  301. scrollbar-color: var(--color-primary) var(--color-bg);
  302. }
  303. .sidebar-search {
  304. position: fixed;
  305. top: 7px;
  306. left: 200px;
  307. height: 29px;
  308. }
  309. .sidebar-search input[type="search"] {
  310. height: 30px;
  311. border: none;
  312. border-radius: .3rem;
  313. width: 200px;
  314. max-width: calc(100vw - 300px);
  315. color: var(--color-text) !important;
  316. padding-inline-end: 30px;
  317. box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
  318. background-color: var(--color-tertiary);
  319. transition: width .2s;
  320. }
  321. .sidebar-search input[type="search"]:focus, .sidebar-search input[type="search"]:hover {
  322. width: 500px;
  323. transition: width .5s;
  324. }
  325. .sidebar-search input[type="submit"] {
  326. padding-inline-start: 6px !important;
  327. }
  328. #script-list-option-groups > div, .list-option-group {
  329. padding: 10px;
  330. color: var(--color-text);
  331. background-color: var(--color-secondary);
  332. border-radius: .3rem;
  333. box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
  334. }
  335. #script-list-option-groups > div > ul, .list-option-group > ul {
  336. background-color: transparent;
  337. box-shadow: none;
  338. border: none;
  339. margin: -10px;
  340. }
  341. .list-current {
  342. border-left-color: var(--color-primary) !important;
  343. border-left-width: 4px !important;
  344. }
  345. if darkmode {
  346. .list-current {
  347. background: none !important;
  348. background-color: var(--color-tertiary) !important;
  349. color: var(--color-text);
  350. }
  351. .list-option-group a:hover, .list-option-group a:focus {
  352. background: none !important;
  353. background-color: var(--color-tertiary) !important;
  354. box-shadow: none !important;
  355. }
  356. }
  357. /* LISTS */
  358. #browse-script-list, #user-script-list, #user-deleted-script-list {
  359. display: grid;
  360. grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  361. grid-gap: 10px;
  362. border: none;
  363. box-shadow: none;
  364. background-color: transparent;
  365. }
  366. }
  367. #browse-script-list > li, #user-script-list > li, #user-deleted-script-list > li {
  368. border: none !important;
  369. border-radius: .3rem;
  370. background-color: var(--color-secondary);
  371. transition: box-shadow .2s;
  372. color: var(--color-text);
  373. }
  374. #browse-script-list > li:hover, #user-script-list > li:hover, #user-deleted-script-list > li:hover {
  375. box-shadow: 0px 2px 20px rgba(0,0,0,0.1);
  376. }
  377. #browse-script-list > li > article, #user-script-list > li > article, #user-deleted-script-list > li > article {
  378. height: 100%;
  379. display: flex;
  380. flex-wrap: wrap;
  381. }
  382. #browse-script-list > li > article > h2 {
  383. overflow: hidden;
  384. max-height: 100px;
  385. }
  386. .inline-script-stats {
  387. margin-top: auto;
  388. width: 100%;
  389. }
  390. #browse-script-list > li > article > h2 > a {
  391. font-weight: 600;
  392. }
  393. #browse-script-list > li > article > h2::before {
  394. content: "";
  395. display: flex;
  396. position: relative;
  397. z-index: 2;
  398. width: 100%;
  399. height: 40px;
  400. color: var(--color-secondary);
  401. background: linear-gradient(transparent, currentColor);
  402. box-shadow: 0 10px 0 var(--color-secondary);
  403. margin-top: -40px;
  404. transform: translateY(100px);
  405. pointer-events: none;
  406. }
  407. /* Greasy Fork Tweaks Thumbnail Images */
  408. #browse-script-list > li > article ~ div {
  409. height: auto !important;
  410. }
  411. #browse-script-list > li > article ~ div > img {
  412. max-width: 100% !important;
  413. }
  414. .script-list li:not(.ad-entry) {
  415. border-right: 1px solid #DDDDDD;
  416. }
  417. .ad-entry, #codefund {
  418. grid-column: 1/-1;
  419. }
  420. .ad-entry > div {
  421. height: auto !important;
  422. padding: 0 !important;
  423. }
  424. [data-ea-publisher].loaded .ea-content a:link, [data-ea-type].loaded .ea-content a:link {
  425. color: var(--color-link) !important;
  426. }
  427. .sidebarred-main-content {
  428. display: flex;
  429. flex-wrap: wrap;
  430. height: min-content;
  431. }
  432. .sidebarred-main-content > * {
  433. width: 100%;
  434. }
  435. .sidebarred-main-content > p {
  436. width: auto;
  437. margin: 1em 4px 0;
  438. }
  439. .sidebarred-main-content > p:last-child {
  440. order: -1;
  441. }
  442. /*** FILTER BY SITES PAGE ***/
  443. /*** SCRIPT DETAILS PAGE ***/
  444. #script-info {
  445. display: flex;
  446. flex-wrap: wrap;
  447. background: none !important;
  448. }
  449. #script-info > * {
  450. width: 100%;
  451. }
  452. #script-info, #additional-info, #user-profile {
  453. background: none;
  454. background-color: var(--color-tertiary);
  455. box-shadow: none;
  456. color: var(--color-text);
  457. }
  458. #script-info > header {
  459. order: -1;
  460. width: 100%;
  461. }
  462. #script-info header h2 {
  463. font-weight: 600;
  464. }
  465. #script-links {
  466. margin: 12px 0;
  467. margin-top: 12px !important;
  468. padding: 0;
  469. display: flex;
  470. flex-wrap: wrap;
  471. position: sticky;
  472. top: 58px;
  473. display: inline;
  474. width: 150px;
  475. height: min-content;
  476. }
  477. #script-links .current {
  478. border: none !important;
  479. box-shadow: none;
  480. }
  481. #script-links li {
  482. margin: 8px 0px;
  483. }
  484. .script-show-applies-to .inline-list {
  485. display: flex;
  486. flex-wrap: wrap;
  487. }
  488. #script-content {
  489. margin: 20px;
  490. width: calc(100% - 200px);
  491. display: flex;
  492. flex-wrap: wrap;
  493. height: min-content;
  494. }
  495. #script-content > * {
  496. width: 100%;
  497. }
  498. .install-link {
  499. background-color: var(--color-highlighted) !important;
  500. }
  501. #script-feedback-suggestion, .script-in-sets, #install-area {
  502. margin: 0;
  503. width: auto !important;
  504. display: flex;
  505. flex-wrap: wrap;
  506. margin-bottom: 1rem;
  507. font-size: 0;
  508. }
  509. #script-feedback-suggestion a, .script-in-sets *, #install-area a {
  510. font-size: 14px;
  511. margin: 0 4px;
  512. }
  513. .discussion-snippet {
  514. white-space: normal !important;
  515. }
  516. .script-in-sets {
  517. order: 1;
  518. width: 100% !important;
  519. margin-bottom: 1rem;
  520. }
  521. #script-meta {
  522. order: 2;
  523. max-width: none;
  524. flex: 1 1 400px;
  525. }
  526. #script-meta dt {
  527. max-width: 100px;
  528. }
  529. #script-show-info-ad {
  530. order: 3;
  531. margin-left: 1em !important;
  532. flex: 1 1 200px;
  533. }
  534. #additional-info {
  535. order: 3;
  536. display: flex;
  537. flex-wrap: wrap;
  538. }
  539. #additional-info > * {
  540. width: 100%;
  541. }
  542. .user-screenshots {
  543. order: -1;
  544. margin-top: 0 !important;
  545. margin-bottom: 1em;
  546. width: 100%;
  547. }
  548. .post-discussion {
  549. width: 100%;
  550. }
  551. section > *:first-child, #script-content > *:first-child, #script-content p, #script-content h3, form > p:first-of-type {
  552. margin-top: 0 !important;
  553. }
  554. .multiform-page {
  555. padding: 0 !important;
  556. }
  557. canvas {
  558. background-color: white !important;
  559. }
  560. /*** FORUMS ***/
  561. .discussion-read {
  562. background-color: var(--color-secondary) !important;
  563. }
  564. .discussion-list-item {
  565. border-top: var(--border-button) !important;
  566. border-bottom: var(--border-button) !important;
  567. }
  568. .user-content {
  569. background: none;
  570. }
  571. /*** USER PAGE ***/
  572. /* About User */
  573. .report-link-abs {
  574. position: relative;
  575. }
  576. /* Control Panel */
  577. #user-control-panel {
  578. display: flex;
  579. flex-wrap: wrap;
  580. grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  581. grid-gap: 10px;
  582. padding: 10px;
  583. }
  584. #user-control-panel > li {
  585. text-decoration: none;
  586. list-style: none;
  587. text-align: center;
  588. background-color: var(--color-secondary);
  589. padding: 5px 16px;
  590. border-radius: .3rem;
  591. }
  592. }