mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2026-10-28 09:44:55 +00:00
add arc-green theme (#41)
* 新增 arc-green 主题支持 * 将 assets 目录标记为 linguist-generated * 将 arc-green 放入 gitea 系列 * 调整 gitea 系列主题边框色和下划线颜色 * 整理代码 & 补充测试 * 调整 gitea 主题下划线导航颜色并修正二级菜单图标间距与下划线位置 * 更新快照 --------- Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
This commit is contained in:
1 parent
a5bbc8ab1e
commit
dc2314f9aa
18 files changed
+1521
-77
No files matched your search
@@ -3,6 +3,7 @@
|
||||
# 忽略非项目代码统计
|
||||
.github/** linguist-vendored
|
||||
.vscode/** linguist-generated
|
||||
assets/** linguist-generated
|
||||
dist/** linguist-generated
|
||||
gitea/** linguist-generated
|
||||
primer/** linguist-generated
|
||||
|
||||
+6
-14
@@ -1,16 +1,8 @@
|
||||
### ✨ Feature
|
||||
|
||||
- Gitea series theme adds classic arc-green color scheme.
|
||||
|
||||
### 🌈 Style
|
||||
|
||||
- The primary button color in the pink theme has been reverted from pink back to green.
|
||||
|
||||
> The initial idea was to emphasize pink more, but when primary buttons like the PR merge button don’t match the PR
|
||||
> status border color, it looks especially jarring. I think this breaks the semantics of the button’s behavior, so I’ve
|
||||
> reverted it to the GitHub style.
|
||||
|
||||
- Restore the underline emphasis color of catppccin theme to peach color to maintain consistency with GitHub.
|
||||
- Fine tune the font and background color of the catppucin theme to enhance the contrast (while still maintaining the
|
||||
weak contrast of the catppucin color)
|
||||
|
||||
### 🐞 Fix
|
||||
|
||||
- Fix the issue of menu occlusion in the operation buttons on the differential page.
|
||||
- Remove unnecessary styles from robot label.
|
||||
- The underline emphasis color of the Gitea series theme has been adjusted from white to the primary color.
|
||||
- Adjust the border effect in the shadows of Gitea series themes (clearer borders).
|
||||
@@ -4,4 +4,11 @@ Copyright 2024-2026 https://github.com/lutinglt
|
||||
This product includes software developed by https://github.com/lutinglt.
|
||||
|
||||
This project is licensed under the Apache License, Version 2.0.
|
||||
See the LICENSE file in the root directory for the full license text.
|
||||
See the LICENSE file in the root directory for the full license text.
|
||||
|
||||
**********************
|
||||
THIRD PARTY COMPONENTS
|
||||
**********************
|
||||
This software includes third party software subject to the following copyrights:
|
||||
- Gitea - https://github.com/go-gitea/gitea
|
||||
- Gitea Theme - https://github.com/lsd-techno/gitea-theme
|
||||
@@ -0,0 +1,33 @@
|
||||
# Third-Party Licenses
|
||||
|
||||
This project is licensed under the Apache License 2.0 (see [LICENSE](./LICENSE) and [NOTICE](./NOTICE)). The third-party
|
||||
works below keep their original copyright and are licensed under the MIT License; the license text is at the end.
|
||||
|
||||
- **go-gitea/gitea** — <https://github.com/go-gitea/gitea>
|
||||
- Files: `gitea/`
|
||||
- Copyright (c) 2016 The Gitea Authors, Copyright (c) 2015 The Gogs Authors
|
||||
- **lsd-techno/gitea-theme** — <https://github.com/lsd-techno/gitea-theme>
|
||||
- Files: `assets/theme-arc-green-updated.css`
|
||||
- Copyright (c) 2024 lsd-techno
|
||||
|
||||
## MIT License
|
||||
|
||||
```text
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
Generated
+336
@@ -0,0 +1,336 @@
|
||||
@import "./chroma/dark.css";
|
||||
@import "./codemirror/dark.css";
|
||||
|
||||
:root {
|
||||
--is-dark-theme: true;
|
||||
--color-primary: #87ab63;
|
||||
--color-primary-contrast: #ffffff;
|
||||
--color-primary-dark-1: #93b373;
|
||||
--color-primary-dark-2: #9fbc82;
|
||||
--color-primary-dark-3: #abc492;
|
||||
--color-primary-dark-4: #b7cda1;
|
||||
--color-primary-dark-5: #cfddc1;
|
||||
--color-primary-dark-6: #e7eee0;
|
||||
--color-primary-dark-7: #f8faf6;
|
||||
--color-primary-light-1: #7a9e55;
|
||||
--color-primary-light-2: #6c8c4c;
|
||||
--color-primary-light-3: #5f7b42;
|
||||
--color-primary-light-4: #516939;
|
||||
--color-primary-light-5: #364626;
|
||||
--color-primary-light-6: #1b2313;
|
||||
--color-primary-light-7: #080b06;
|
||||
--color-primary-alpha-10: #87ab6319;
|
||||
--color-primary-alpha-20: #87ab6333;
|
||||
--color-primary-alpha-30: #87ab634b;
|
||||
--color-primary-alpha-40: #87ab6366;
|
||||
--color-primary-alpha-50: #87ab6380;
|
||||
--color-primary-alpha-60: #87ab6399;
|
||||
--color-primary-alpha-70: #87ab63b3;
|
||||
--color-primary-alpha-80: #87ab63cc;
|
||||
--color-primary-alpha-90: #87ab63e1;
|
||||
--color-primary-hover: var(--color-primary-light-1);
|
||||
--color-primary-active: var(--color-primary-light-2);
|
||||
--color-secondary: #525767;
|
||||
--color-secondary-dark-1: #5c6374;
|
||||
--color-secondary-dark-2: #666e81;
|
||||
--color-secondary-dark-3: #7c8497;
|
||||
--color-secondary-dark-4: #8990a1;
|
||||
--color-secondary-dark-5: #959cab;
|
||||
--color-secondary-dark-6: #a2a8b5;
|
||||
--color-secondary-dark-7: #afb4c0;
|
||||
--color-secondary-dark-8: #bcc0ca;
|
||||
--color-secondary-dark-9: #c9cbd4;
|
||||
--color-secondary-dark-10: #d6d7de;
|
||||
--color-secondary-dark-11: #e2e3e8;
|
||||
--color-secondary-dark-12: #eeeff2;
|
||||
--color-secondary-dark-13: #fbfbfc;
|
||||
--color-secondary-light-1: #454a57;
|
||||
--color-secondary-light-2: #383c47;
|
||||
--color-secondary-light-3: #2c2f37;
|
||||
--color-secondary-light-4: #1f2226;
|
||||
--color-secondary-alpha-10: #52576719;
|
||||
--color-secondary-alpha-20: #52576733;
|
||||
--color-secondary-alpha-30: #5257674b;
|
||||
--color-secondary-alpha-40: #52576766;
|
||||
--color-secondary-alpha-50: #52576780;
|
||||
--color-secondary-alpha-60: #52576799;
|
||||
--color-secondary-alpha-70: #525767b3;
|
||||
--color-secondary-alpha-80: #525767cc;
|
||||
--color-secondary-alpha-90: #525767e1;
|
||||
--color-secondary-button: var(--color-secondary-dark-4);
|
||||
--color-secondary-hover: var(--color-secondary-dark-3);
|
||||
--color-secondary-active: var(--color-secondary-dark-2);
|
||||
/* console colors - used for actions console and console files */
|
||||
--color-console-fg: #eeeff2;
|
||||
--color-console-fg-subtle: #959cab;
|
||||
--color-console-bg: #262936;
|
||||
--color-console-border: #383c47;
|
||||
--color-console-hover-bg: #ffffff16;
|
||||
--color-console-active-bg: #454a57;
|
||||
--color-console-menu-bg: #383c47;
|
||||
--color-console-menu-border: #5c6374;
|
||||
--color-console-link: #969aa1;
|
||||
/* named colors */
|
||||
--color-red: #cc4848;
|
||||
--color-orange: #cc580c;
|
||||
--color-yellow: #cc9903;
|
||||
--color-olive: #91a313;
|
||||
--color-green: #87ab63;
|
||||
--color-teal: #00918a;
|
||||
--color-blue: #3a8ac6;
|
||||
--color-violet: #906ae1;
|
||||
--color-purple: #b259d0;
|
||||
--color-pink: #d22e8b;
|
||||
--color-brown: #a47252;
|
||||
--color-black: #2e323e;
|
||||
/* light variants - produced via Sass scale-color(color, $lightness: +10%) */
|
||||
--color-red-light: #d15a5a;
|
||||
--color-orange-light: #f6a066;
|
||||
--color-yellow-light: #eaaf03;
|
||||
--color-olive-light: #abc016;
|
||||
--color-green-light: #93b373;
|
||||
--color-teal-light: #00b6ad;
|
||||
--color-blue-light: #4e96cc;
|
||||
--color-violet-light: #9b79e4;
|
||||
--color-purple-light: #ba6ad5;
|
||||
--color-pink-light: #d74397;
|
||||
--color-brown-light: #b08061;
|
||||
/* dark 1 variants - produced via Sass scale-color(color, $lightness: -10%) */
|
||||
--color-black-light: #3f4555;
|
||||
--color-red-dark-1: #c23636;
|
||||
--color-orange-dark-1: #f38236;
|
||||
--color-yellow-dark-1: #b88a03;
|
||||
--color-olive-dark-1: #839311;
|
||||
--color-green-dark-1: #7a9e55;
|
||||
--color-teal-dark-1: #00837c;
|
||||
--color-blue-dark-1: #347cb3;
|
||||
--color-violet-dark-1: #7b4edb;
|
||||
--color-purple-dark-1: #a742c9;
|
||||
--color-pink-dark-1: #be297d;
|
||||
--color-brown-dark-1: #94674a;
|
||||
--color-black-dark-1: #292d38;
|
||||
/* dark 2 variants - produced via Sass scale-color(color, $lightness: -20%) */
|
||||
--color-red-dark-2: #ad3030;
|
||||
--color-orange-dark-2: #f16e17;
|
||||
--color-yellow-dark-2: #a37a02;
|
||||
--color-olive-dark-2: #74820f;
|
||||
--color-green-dark-2: #6c8c4c;
|
||||
--color-teal-dark-2: #00746e;
|
||||
--color-blue-dark-2: #2e6e9f;
|
||||
--color-violet-dark-2: #6733d6;
|
||||
--color-purple-dark-2: #9834b9;
|
||||
--color-pink-dark-2: #a9246f;
|
||||
--color-brown-dark-2: #835b42;
|
||||
--color-black-dark-2: #252832;
|
||||
/* ansi colors used for actions console and console files */
|
||||
--color-ansi-black: var(--color-black);
|
||||
--color-ansi-red: var(--color-red);
|
||||
--color-ansi-green: var(--color-green);
|
||||
--color-ansi-yellow: var(--color-yellow);
|
||||
--color-ansi-blue: var(--color-blue);
|
||||
--color-ansi-magenta: var(--color-pink);
|
||||
--color-ansi-cyan: var(--color-teal);
|
||||
--color-ansi-white: var(--color-console-fg-subtle);
|
||||
--color-ansi-bright-black: var(--color-black-light);
|
||||
--color-ansi-bright-red: var(--color-red-light);
|
||||
--color-ansi-bright-green: var(--color-green-light);
|
||||
--color-ansi-bright-yellow: var(--color-yellow-light);
|
||||
--color-ansi-bright-blue: var(--color-blue-light);
|
||||
--color-ansi-bright-magenta: var(--color-pink-light);
|
||||
--color-ansi-bright-cyan: var(--color-teal-light);
|
||||
--color-ansi-bright-white: var(--color-console-fg);
|
||||
/* 16-color series */
|
||||
--color-series-16-0: #7db233;
|
||||
--color-series-16-1: #499a37;
|
||||
--color-series-16-2: #ce4751;
|
||||
--color-series-16-3: #8f9121;
|
||||
--color-series-16-4: #ac32a6;
|
||||
--color-series-16-5: #7445e9;
|
||||
--color-series-16-6: #c67d28;
|
||||
--color-series-16-7: #4db392;
|
||||
--color-series-16-8: #aa4d30;
|
||||
--color-series-16-9: #2a6f84;
|
||||
--color-series-16-10: #c45327;
|
||||
--color-series-16-11: #3d965c;
|
||||
--color-series-16-12: #792a93;
|
||||
--color-series-16-13: #439d73;
|
||||
--color-series-16-14: #103aad;
|
||||
--color-series-16-15: #982e85;
|
||||
/* other colors */
|
||||
--color-grey: #505665;
|
||||
--color-grey-light: #a1a6b7;
|
||||
--color-gold: #b1983b;
|
||||
--color-white: #ffffff;
|
||||
--color-diff-added-linenum-bg: #3c653c;
|
||||
--color-diff-added-row-bg: #283e2d;
|
||||
--color-diff-added-row-border: #314a37;
|
||||
--color-diff-added-word-bg: #3c653c;
|
||||
--color-diff-moved-row-bg: #818044;
|
||||
--color-diff-moved-row-border: #bcca6f;
|
||||
--color-diff-removed-linenum-bg: #6f3333;
|
||||
--color-diff-removed-row-bg: #3c2626;
|
||||
--color-diff-removed-row-border: #634343;
|
||||
--color-diff-removed-word-bg: #6f3333;
|
||||
--color-diff-inactive: #353846;
|
||||
--color-diff-added-fg: var(--color-green);
|
||||
--color-diff-removed-fg: var(--color-red);
|
||||
--color-error-border: #a04141;
|
||||
--color-error-bg: #522;
|
||||
--color-error-bg-active: #744;
|
||||
--color-error-bg-hover: #633;
|
||||
--color-error-text: #f9cbcb;
|
||||
--color-success-border: #458a57;
|
||||
--color-success-bg: #284034;
|
||||
--color-success-text: #6cc664;
|
||||
--color-warning-border: #bb9d00;
|
||||
--color-warning-bg: #3a3a30;
|
||||
--color-warning-text: #fbbd08;
|
||||
--color-info-border: #306090;
|
||||
--color-info-bg: #26354c;
|
||||
--color-info-text: #38a8e8;
|
||||
--color-red-badge: #db2828;
|
||||
--color-red-badge-bg: #db28281a;
|
||||
--color-red-badge-hover-bg: #db28284d;
|
||||
--color-green-badge: #21ba45;
|
||||
--color-green-badge-bg: #21ba451a;
|
||||
--color-green-badge-hover-bg: #21ba454d;
|
||||
--color-yellow-badge: #fbbd08;
|
||||
--color-yellow-badge-bg: #fbbd081a;
|
||||
--color-yellow-badge-hover-bg: #fbbd084d;
|
||||
--color-orange-badge: #f2711c;
|
||||
--color-orange-badge-bg: #f2711c1a;
|
||||
--color-orange-badge-hover-bg: #f2711c4d;
|
||||
--color-git: #f05133;
|
||||
--color-logo: #609926;
|
||||
/* target-based colors */
|
||||
--color-body: #2e323e;
|
||||
--color-box-header: #303340;
|
||||
--color-box-body: #222733;
|
||||
--color-box-body-highlight: #262b36;
|
||||
--color-text-dark: #dbe0ea;
|
||||
--color-text: #cbd0da;
|
||||
--color-text-light: #bbbfca;
|
||||
--color-text-light-1: #aaafb9;
|
||||
--color-text-light-2: #9a9ea9;
|
||||
--color-text-light-3: #8a8e99;
|
||||
--color-footer: #232834;
|
||||
--color-timeline: #4c525e;
|
||||
--color-input-text: #dfe3ec;
|
||||
--color-input-background: #1e252e;
|
||||
--color-input-toggle-background: #454a57;
|
||||
--color-input-border: var(--color-secondary);
|
||||
--color-input-border-hover: var(--color-secondary-dark-1);
|
||||
--color-light: #00000028;
|
||||
--color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));
|
||||
--color-light-border: #ffffff28;
|
||||
--color-hover: #ffffff19;
|
||||
--color-hover-opaque: #434651; /* color-mix(--color-body, --color-hover) */
|
||||
--color-active: #ffffff24;
|
||||
--color-menu: #1e252e;
|
||||
--color-card: #1e252e;
|
||||
--color-markup-table-row: #ffffff06;
|
||||
--color-markup-code-block: #ffffff16;
|
||||
--color-markup-code-inline: #2e4433;
|
||||
--color-button: #1e252e;
|
||||
--color-code-bg: #222733;
|
||||
--color-shadow: #00000058;
|
||||
--color-shadow-opaque: #000000;
|
||||
--color-secondary-bg: #2a2e3a;
|
||||
--color-expand-button: #3c404d;
|
||||
--color-placeholder-text: #8a8e99;
|
||||
--color-editor-line-highlight: var(--color-primary-light-5);
|
||||
--color-editor-selection: var(--color-primary-alpha-50);
|
||||
--color-project-board-bg: var(--color-secondary-light-2);
|
||||
--color-project-column-bg: var(--color-secondary-light-2);
|
||||
--color-caret: var(--color-text); /* should ideally be --color-text-dark, see #15651 */
|
||||
--color-reaction-bg: #ffffff12;
|
||||
--color-reaction-hover-bg: var(--color-primary-light-4);
|
||||
--color-reaction-active-bg: var(--color-primary-light-5);
|
||||
--color-tooltip-text: #ffffff;
|
||||
--color-tooltip-bg: #000000f0;
|
||||
--color-nav-bg: #232834;
|
||||
--color-nav-hover-bg: #383c47;
|
||||
--color-nav-text: var(--color-text);
|
||||
--color-secondary-nav-bg: #232834;
|
||||
--color-label-text: #dfe3ec;
|
||||
--color-label-bg: #7c84974b;
|
||||
--color-label-hover-bg: #7c8497a0;
|
||||
--color-label-active-bg: #7c8497ff;
|
||||
--color-accent: var(--color-primary-light-1);
|
||||
--color-small-accent: var(--color-primary-light-5);
|
||||
--color-highlight-fg: #7a9e55;
|
||||
--color-highlight-bg: #364626;
|
||||
--color-overlay-backdrop: #080808c0;
|
||||
--color-danger: var(--color-red);
|
||||
--color-transparency-grid-light: #3a3e4a;
|
||||
--color-transparency-grid-dark: #2a2e3a;
|
||||
--color-workflow-edge-hover: #5c6374;
|
||||
/* syntax highlighting colors — used by codeeditor.css (CM6) and chroma.css */
|
||||
--color-syntax-keyword: #ff7540;
|
||||
--color-syntax-bool: #649bc4;
|
||||
--color-syntax-control: #ffaa10;
|
||||
--color-syntax-name: #fabd2f;
|
||||
--color-syntax-type: #ff7b72;
|
||||
--color-syntax-number: #649bc4;
|
||||
--color-syntax-operator: #ff7540;
|
||||
--color-syntax-regexp: #9075cd;
|
||||
--color-syntax-string: #b8bb26;
|
||||
--color-syntax-comment: #777e94;
|
||||
--color-syntax-invalid: #ff4433;
|
||||
--color-syntax-link: var(--color-primary);
|
||||
--color-syntax-tag: #ff7540;
|
||||
--color-syntax-attribute: #fabd2f;
|
||||
--color-syntax-property: #a0cc75;
|
||||
--color-syntax-variable: #ebdbb2;
|
||||
--color-syntax-string-special: #ffaa10;
|
||||
--color-syntax-escape: #ff8540;
|
||||
--color-syntax-entity: #fabd2f;
|
||||
--color-syntax-preproc: #8ec07c;
|
||||
--color-syntax-preproc-file: #649bc4;
|
||||
--color-syntax-decorator: #8ec07c;
|
||||
--color-syntax-namespace: #c9d1d9;
|
||||
--color-syntax-name-pseudo: #fabd2f;
|
||||
--color-syntax-comment-special: #9075cd;
|
||||
--color-syntax-text: #c9d1d9;
|
||||
--color-syntax-text-alt: #b6bac5;
|
||||
--color-syntax-punctuation: #d2d4db;
|
||||
--color-syntax-whitespace: #7f8699;
|
||||
--color-syntax-diff-fg: #ffffff;
|
||||
--color-syntax-deleted-bg: #5f3737;
|
||||
--color-syntax-inserted-bg: #3a523a;
|
||||
--color-syntax-emph: #ddee30;
|
||||
--color-syntax-strong: #ebdbb2;
|
||||
--color-syntax-heading: #ffaa10;
|
||||
--color-syntax-subheading: #b8bb26;
|
||||
--color-syntax-output: #777e94;
|
||||
--color-syntax-prompt: #ebdbb2;
|
||||
--color-syntax-traceback: #ff7540;
|
||||
--color-syntax-matching-bracket-bg: #00918a48;
|
||||
--color-syntax-nonmatching-bracket-bg: #cc484848;
|
||||
accent-color: var(--color-accent);
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
/* invert emojis that are hard to read otherwise */
|
||||
.emoji[aria-label="check mark"],
|
||||
.emoji[aria-label="currency exchange"],
|
||||
.emoji[aria-label="TOP arrow"],
|
||||
.emoji[aria-label="END arrow"],
|
||||
.emoji[aria-label="ON! arrow"],
|
||||
.emoji[aria-label="SOON arrow"],
|
||||
.emoji[aria-label="heavy dollar sign"],
|
||||
.emoji[aria-label="copyright"],
|
||||
.emoji[aria-label="registered"],
|
||||
.emoji[aria-label="trade mark"],
|
||||
.emoji[aria-label="multiply"],
|
||||
.emoji[aria-label="plus"],
|
||||
.emoji[aria-label="minus"],
|
||||
.emoji[aria-label="divide"],
|
||||
.emoji[aria-label="curly loop"],
|
||||
.emoji[aria-label="double curly loop"],
|
||||
.emoji[aria-label="wavy dash"],
|
||||
.emoji[aria-label="paw prints"],
|
||||
.emoji[aria-label="musical note"],
|
||||
.emoji[aria-label="musical notes"] {
|
||||
filter: invert(100%) hue-rotate(180deg);
|
||||
}
|
||||
@@ -32,6 +32,7 @@
|
||||
"update:primer": "bun scripts/buildPrimerTSToken.ts",
|
||||
"update:locale": "bun scripts/translate.ts",
|
||||
"update:gitea": "bun scripts/updateGitea.ts",
|
||||
"update:arcgreen": "bun scripts/updateArcGreen.ts",
|
||||
"update:snapshot": "bun vitest --update",
|
||||
"install:clean": "rm -rf node_modules bun.lock bun.lockb && bun install"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* Copyright (c) https://github.com/lutinglt
|
||||
*
|
||||
* See the NOTICE file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { rootDir, setGlobalProxy } from "./utils";
|
||||
|
||||
setGlobalProxy();
|
||||
|
||||
const githubSite = "https://raw.githubusercontent.com";
|
||||
const githubRepo = "lsd-techno/gitea-theme";
|
||||
const githubBranchPath = "refs/heads/main";
|
||||
const localGiteaPath = path.join(rootDir, "assets");
|
||||
const githubBaseUrl = `${githubSite}/${githubRepo}/${githubBranchPath}`;
|
||||
const file = "theme-arc-green-updated.css";
|
||||
const fileUrl = `${githubBaseUrl}/${file}`;
|
||||
|
||||
const response = await fetch(fileUrl);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
const content = await response.text();
|
||||
fs.writeFileSync(path.join(localGiteaPath, file), content);
|
||||
console.log("✔︎ FileUrl:", fileUrl);
|
||||
+616
-6
@@ -1,6 +1,6 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = `
|
||||
exports[`gitea2ThemeVars > light isDarkTheme 为 false 1`] = `
|
||||
{
|
||||
"color": {
|
||||
"accent": "var(--color-primary-light-1)",
|
||||
@@ -569,7 +569,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = `
|
||||
},
|
||||
"shadow": {
|
||||
"floating": {
|
||||
"small": "0px 0px 0px 1px var(--color-light-border), 0px 6px 12px -3px var(--color-shadow), 0px 6px 18px 0px var(--color-shadow);",
|
||||
"small": "0px 0px 0px 1px var(--color-secondary), 0px 6px 12px -3px var(--color-shadow), 0px 6px 18px 0px var(--color-shadow);",
|
||||
},
|
||||
"inset": "inset 0px 1px 0px 0px #0b0b0c58",
|
||||
"resting": {
|
||||
@@ -601,7 +601,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = `
|
||||
},
|
||||
"underlineNav": {
|
||||
"borderColor": {
|
||||
"active": "#f8f8f8",
|
||||
"active": "var(--github-borderColor-accent-emphasis)",
|
||||
},
|
||||
},
|
||||
"workflowCardBg": "#191a1c",
|
||||
@@ -610,7 +610,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = `
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = `
|
||||
exports[`gitea2ThemeVars > light isDarkTheme 为 false 2`] = `
|
||||
{
|
||||
"color": {
|
||||
"accent": "var(--color-primary-light-1)",
|
||||
@@ -1179,7 +1179,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = `
|
||||
},
|
||||
"shadow": {
|
||||
"floating": {
|
||||
"small": "0px 0px 0px 1px var(--color-light-border), 0px 6px 12px -3px var(--color-shadow), 0px 6px 18px 0px var(--color-shadow);",
|
||||
"small": "0px 0px 0px 1px var(--color-secondary), 0px 6px 12px -3px var(--color-shadow), 0px 6px 18px 0px var(--color-shadow);",
|
||||
},
|
||||
"inset": "inset 0px 1px 0px 0px #00001726",
|
||||
"resting": {
|
||||
@@ -1211,7 +1211,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = `
|
||||
},
|
||||
"underlineNav": {
|
||||
"borderColor": {
|
||||
"active": "#01050a",
|
||||
"active": "var(--github-borderColor-accent-emphasis)",
|
||||
},
|
||||
},
|
||||
"workflowCardBg": "#f8f9fb",
|
||||
@@ -1219,3 +1219,613 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = `
|
||||
"isDarkTheme": false,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`gitea2ThemeVars > light isDarkTheme 为 false 3`] = `
|
||||
{
|
||||
"color": {
|
||||
"accent": "var(--color-primary-light-1)",
|
||||
"active": "#ffffff24",
|
||||
"ansi": {
|
||||
"black": "var(--color-black)",
|
||||
"blue": "var(--color-blue)",
|
||||
"bright": {
|
||||
"black": "var(--color-black-light)",
|
||||
"blue": "var(--color-blue-light)",
|
||||
"cyan": "var(--color-teal-light)",
|
||||
"green": "var(--color-green-light)",
|
||||
"magenta": "var(--color-pink-light)",
|
||||
"red": "var(--color-red-light)",
|
||||
"white": "var(--color-console-fg)",
|
||||
"yellow": "var(--color-yellow-light)",
|
||||
},
|
||||
"cyan": "var(--color-teal)",
|
||||
"green": "var(--color-green)",
|
||||
"magenta": "var(--color-pink)",
|
||||
"red": "var(--color-red)",
|
||||
"white": "var(--color-console-fg-subtle)",
|
||||
"yellow": "var(--color-yellow)",
|
||||
},
|
||||
"black": {
|
||||
"dark": {
|
||||
"num1": "#292d38",
|
||||
"num2": "#252832",
|
||||
},
|
||||
"light": "#3f4555",
|
||||
"self": "#2e323e",
|
||||
},
|
||||
"blue": {
|
||||
"dark": {
|
||||
"num1": "#347cb3",
|
||||
"num2": "#2e6e9f",
|
||||
},
|
||||
"light": "#4e96cc",
|
||||
"self": "#3a8ac6",
|
||||
},
|
||||
"body": "#2e323e",
|
||||
"box": {
|
||||
"body": {
|
||||
"highlight": "#262b36",
|
||||
"self": "#222733",
|
||||
},
|
||||
"header": "#303340",
|
||||
},
|
||||
"brown": {
|
||||
"dark": {
|
||||
"num1": "#94674a",
|
||||
"num2": "#835b42",
|
||||
},
|
||||
"light": "#b08061",
|
||||
"self": "#a47252",
|
||||
},
|
||||
"button": "#1e252e",
|
||||
"card": "#1e252e",
|
||||
"caret": "var(--color-text)",
|
||||
"codeBg": "#222733",
|
||||
"console": {
|
||||
"activeBg": "#454a57",
|
||||
"bg": "#262936",
|
||||
"fg": {
|
||||
"self": "#eeeff2",
|
||||
"subtle": "#959cab",
|
||||
},
|
||||
"hoverBg": "#ffffff16",
|
||||
"link": "#969aa1",
|
||||
},
|
||||
"danger": "var(--color-red)",
|
||||
"diff": {
|
||||
"added": {
|
||||
"fg": "var(--color-green)",
|
||||
"linenum": {
|
||||
"bg": "#3c653c",
|
||||
},
|
||||
"row": {
|
||||
"bg": "#283e2d",
|
||||
"border": "#314a37",
|
||||
},
|
||||
"word": {
|
||||
"bg": "#3c653c",
|
||||
},
|
||||
},
|
||||
"inactive": "#353846",
|
||||
"moved": {
|
||||
"row": {
|
||||
"bg": "#818044",
|
||||
"border": "#bcca6f",
|
||||
},
|
||||
},
|
||||
"removed": {
|
||||
"fg": "var(--color-red)",
|
||||
"linenum": {
|
||||
"bg": "#6f3333",
|
||||
},
|
||||
"row": {
|
||||
"bg": "#3c2626",
|
||||
"border": "#634343",
|
||||
},
|
||||
"word": {
|
||||
"bg": "#6f3333",
|
||||
},
|
||||
},
|
||||
},
|
||||
"editor": {
|
||||
"lineHighlight": "var(--color-primary-light-5)",
|
||||
"selection": "var(--color-primary-alpha-50)",
|
||||
},
|
||||
"error": {
|
||||
"bg": {
|
||||
"active": "#774444",
|
||||
"hover": "#663333",
|
||||
"self": "#552222",
|
||||
},
|
||||
"border": "#a04141",
|
||||
"text": "#f9cbcb",
|
||||
},
|
||||
"expandButton": "#3c404d",
|
||||
"footer": "#232834",
|
||||
"gold": "#b1983b",
|
||||
"green": {
|
||||
"badge": {
|
||||
"bg": "#21ba451a",
|
||||
"hover": {
|
||||
"bg": "#21ba454d",
|
||||
},
|
||||
"self": "#21ba45",
|
||||
},
|
||||
"dark": {
|
||||
"num1": "#7a9e55",
|
||||
"num2": "#6c8c4c",
|
||||
},
|
||||
"light": "#93b373",
|
||||
"self": "#87ab63",
|
||||
},
|
||||
"grey": {
|
||||
"light": "#a1a6b7",
|
||||
"self": "#505665",
|
||||
},
|
||||
"highlight": {
|
||||
"bg": "#364626",
|
||||
"fg": "#7a9e55",
|
||||
},
|
||||
"hover": {
|
||||
"opaque": "#434651",
|
||||
"self": "#ffffff19",
|
||||
},
|
||||
"info": {
|
||||
"bg": "#26354c",
|
||||
"border": "#306090",
|
||||
"text": "#38a8e8",
|
||||
},
|
||||
"input": {
|
||||
"background": "#1e252e",
|
||||
"border": "var(--color-secondary)",
|
||||
"text": "#dfe3ec",
|
||||
"toggleBackground": "#454a57",
|
||||
},
|
||||
"label": {
|
||||
"activeBg": "#7c8497ff",
|
||||
"bg": "#7c84974b",
|
||||
"hoverBg": "#7c8497a0",
|
||||
"text": "#dfe3ec",
|
||||
},
|
||||
"light": {
|
||||
"border": "#ffffff28",
|
||||
"self": "#00000028",
|
||||
},
|
||||
"logo": "#609926",
|
||||
"markup": {
|
||||
"code": {
|
||||
"block": "#ffffff16",
|
||||
"inline": "#2e4433",
|
||||
},
|
||||
"tableRow": "#ffffff06",
|
||||
},
|
||||
"menu": "#1e252e",
|
||||
"nav": {
|
||||
"bg": "#232834",
|
||||
"hoverBg": "#383c47",
|
||||
"text": "var(--color-text)",
|
||||
},
|
||||
"olive": {
|
||||
"dark": {
|
||||
"num1": "#839311",
|
||||
"num2": "#74820f",
|
||||
},
|
||||
"light": "#abc016",
|
||||
"self": "#91a313",
|
||||
},
|
||||
"orange": {
|
||||
"badge": {
|
||||
"bg": "#f2711c1a",
|
||||
"hover": {
|
||||
"bg": "#f2711c4d",
|
||||
},
|
||||
"self": "#f2711c",
|
||||
},
|
||||
"dark": {
|
||||
"num1": "#f38236",
|
||||
"num2": "#f16e17",
|
||||
},
|
||||
"light": "#f6a066",
|
||||
"self": "#cc580c",
|
||||
},
|
||||
"overlayBackdrop": "#080808c0",
|
||||
"pink": {
|
||||
"dark": {
|
||||
"num1": "#be297d",
|
||||
"num2": "#a9246f",
|
||||
},
|
||||
"light": "#d74397",
|
||||
"self": "#d22e8b",
|
||||
},
|
||||
"placeholderText": "#8a8e99",
|
||||
"primary": {
|
||||
"active": "var(--color-primary-light-2)",
|
||||
"alpha": {
|
||||
"num10": "#87ab6319",
|
||||
"num20": "#87ab6333",
|
||||
"num30": "#87ab634b",
|
||||
"num40": "#87ab6366",
|
||||
"num50": "#87ab6380",
|
||||
"num60": "#87ab6399",
|
||||
"num70": "#87ab63b3",
|
||||
"num80": "#87ab63cc",
|
||||
"num90": "#87ab63e1",
|
||||
},
|
||||
"contrast": "#ffffff",
|
||||
"dark": {
|
||||
"num1": "#93b373",
|
||||
"num2": "#9fbc82",
|
||||
"num3": "#abc492",
|
||||
"num4": "#b7cda1",
|
||||
"num5": "#cfddc1",
|
||||
"num6": "#e7eee0",
|
||||
"num7": "#f8faf6",
|
||||
},
|
||||
"hover": "var(--color-primary-light-1)",
|
||||
"light": {
|
||||
"num1": "#7a9e55",
|
||||
"num2": "#6c8c4c",
|
||||
"num3": "#5f7b42",
|
||||
"num4": "#516939",
|
||||
"num5": "#364626",
|
||||
"num6": "#1b2313",
|
||||
"num7": "#080b06",
|
||||
},
|
||||
"self": "#87ab63",
|
||||
},
|
||||
"priority": {
|
||||
"bg": "#281e38",
|
||||
"border": "#522a92",
|
||||
"text": "#b89de4",
|
||||
},
|
||||
"projectColumnBg": "var(--color-secondary-light-2)",
|
||||
"purple": {
|
||||
"dark": {
|
||||
"num1": "#a742c9",
|
||||
"num2": "#9834b9",
|
||||
},
|
||||
"light": "#ba6ad5",
|
||||
"self": "#b259d0",
|
||||
},
|
||||
"reaction": {
|
||||
"activeBg": "var(--color-primary-light-5)",
|
||||
"bg": "#ffffff12",
|
||||
"hoverBg": "var(--color-primary-light-4)",
|
||||
},
|
||||
"red": {
|
||||
"badge": {
|
||||
"bg": "#db28281a",
|
||||
"hover": {
|
||||
"bg": "#db28284d",
|
||||
},
|
||||
"self": "#db2828",
|
||||
},
|
||||
"dark": {
|
||||
"num1": "#c23636",
|
||||
"num2": "#ad3030",
|
||||
},
|
||||
"light": "#d15a5a",
|
||||
"self": "#cc4848",
|
||||
},
|
||||
"secondary": {
|
||||
"active": "var(--color-secondary-dark-2)",
|
||||
"alpha": {
|
||||
"num10": "#52576719",
|
||||
"num20": "#52576733",
|
||||
"num30": "#5257674b",
|
||||
"num40": "#52576766",
|
||||
"num50": "#52576780",
|
||||
"num60": "#52576799",
|
||||
"num70": "#525767b3",
|
||||
"num80": "#525767cc",
|
||||
"num90": "#525767e1",
|
||||
},
|
||||
"button": "var(--color-secondary-dark-4)",
|
||||
"dark": {
|
||||
"num1": "#5c6374",
|
||||
"num10": "#d6d7de",
|
||||
"num11": "#e2e3e8",
|
||||
"num12": "#eeeff2",
|
||||
"num13": "#fbfbfc",
|
||||
"num2": "#666e81",
|
||||
"num3": "#7c8497",
|
||||
"num4": "#8990a1",
|
||||
"num5": "#959cab",
|
||||
"num6": "#a2a8b5",
|
||||
"num7": "#afb4c0",
|
||||
"num8": "#bcc0ca",
|
||||
"num9": "#c9cbd4",
|
||||
},
|
||||
"hover": "var(--color-secondary-dark-3)",
|
||||
"light": {
|
||||
"num1": "#454a57",
|
||||
"num2": "#383c47",
|
||||
"num3": "#2c2f37",
|
||||
"num4": "#1f2226",
|
||||
},
|
||||
"self": "#525767",
|
||||
},
|
||||
"secondaryBg": "#2a2e3a",
|
||||
"secondaryNavBg": "#232834",
|
||||
"series": {
|
||||
"num16": {
|
||||
"num0": "#7db233",
|
||||
"num1": "#499a37",
|
||||
"num10": "#c45327",
|
||||
"num11": "#3d965c",
|
||||
"num12": "#792a93",
|
||||
"num13": "#439d73",
|
||||
"num14": "#103aad",
|
||||
"num15": "#982e85",
|
||||
"num2": "#ce4751",
|
||||
"num3": "#8f9121",
|
||||
"num4": "#ac32a6",
|
||||
"num5": "#7445e9",
|
||||
"num6": "#c67d28",
|
||||
"num7": "#4db392",
|
||||
"num8": "#aa4d30",
|
||||
"num9": "#2a6f84",
|
||||
},
|
||||
},
|
||||
"shadow": {
|
||||
"opaque": "#000000",
|
||||
"self": "#00000058",
|
||||
},
|
||||
"smallAccent": "var(--color-primary-light-5)",
|
||||
"success": {
|
||||
"bg": "#284034",
|
||||
"border": "#458a57",
|
||||
"text": "#6cc664",
|
||||
},
|
||||
"teal": {
|
||||
"dark": {
|
||||
"num1": "#00837c",
|
||||
"num2": "#00746e",
|
||||
},
|
||||
"light": "#00b6ad",
|
||||
"self": "#00918a",
|
||||
},
|
||||
"text": {
|
||||
"dark": "#dbe0ea",
|
||||
"light": {
|
||||
"num1": "#aaafb9",
|
||||
"num2": "#9a9ea9",
|
||||
"num3": "#8a8e99",
|
||||
"self": "#bbbfca",
|
||||
},
|
||||
"self": "#cbd0da",
|
||||
},
|
||||
"timeline": "#4c525e",
|
||||
"tooltip": {
|
||||
"bg": "#000000f0",
|
||||
"text": "#ffffff",
|
||||
},
|
||||
"transparency": {
|
||||
"grid": {
|
||||
"dark": "#2a2e3a",
|
||||
"light": "#3a3e4a",
|
||||
},
|
||||
},
|
||||
"violet": {
|
||||
"dark": {
|
||||
"num1": "#7b4edb",
|
||||
"num2": "#6733d6",
|
||||
},
|
||||
"light": "#9b79e4",
|
||||
"self": "#906ae1",
|
||||
},
|
||||
"warning": {
|
||||
"bg": "#3a3a30",
|
||||
"border": "#bb9d00",
|
||||
"text": "#fbbd08",
|
||||
},
|
||||
"white": "#ffffff",
|
||||
"workflowEdgeHover": "#87ab63",
|
||||
"yellow": {
|
||||
"badge": {
|
||||
"bg": "#fbbd081a",
|
||||
"hover": {
|
||||
"bg": "#fbbd084d",
|
||||
},
|
||||
"self": "#fbbd08",
|
||||
},
|
||||
"dark": {
|
||||
"num1": "#b88a03",
|
||||
"num2": "#a37a02",
|
||||
},
|
||||
"light": "#eaaf03",
|
||||
"self": "#cc9903",
|
||||
},
|
||||
},
|
||||
"github": {
|
||||
"avatar": {
|
||||
"bgColor": "#2e323e",
|
||||
"borderColor": "#ffffff28",
|
||||
},
|
||||
"bgColor": {
|
||||
"accent": {
|
||||
"emphasis": "#87ab63",
|
||||
"muted": "#364626",
|
||||
},
|
||||
"attention": {
|
||||
"emphasis": "#b88a03",
|
||||
},
|
||||
"danger": {
|
||||
"emphasis": "#d15a5a",
|
||||
},
|
||||
"done": {
|
||||
"emphasis": "#a742c9",
|
||||
},
|
||||
"neutral": {
|
||||
"emphasis": "#525767",
|
||||
},
|
||||
"success": {
|
||||
"emphasis": "#7a9e55",
|
||||
},
|
||||
},
|
||||
"borderColor": {
|
||||
"accent": {
|
||||
"emphasis": "#7a9e55",
|
||||
},
|
||||
"attention": {
|
||||
"emphasis": "#b88a03",
|
||||
},
|
||||
"done": {
|
||||
"emphasis": "#a742c9",
|
||||
},
|
||||
"emphasis": "#ffffff28",
|
||||
"success": {
|
||||
"emphasis": "#7a9e55",
|
||||
},
|
||||
},
|
||||
"button": {
|
||||
"danger": {
|
||||
"bgColor": {
|
||||
"active": "#c23636",
|
||||
"hover": "#cc4848",
|
||||
"rest": "#1e252e",
|
||||
},
|
||||
"borderColor": {
|
||||
"hover": "#52576733",
|
||||
},
|
||||
"fgColor": {
|
||||
"hover": "#ffffff",
|
||||
"rest": "#d15a5a",
|
||||
},
|
||||
},
|
||||
"default": {
|
||||
"bgColor": {
|
||||
"active": "#ffffff24",
|
||||
},
|
||||
},
|
||||
"invisible": {
|
||||
"iconColor": {
|
||||
"rest": "#cbd0da",
|
||||
},
|
||||
},
|
||||
"primary": {
|
||||
"bgColor": {
|
||||
"active": "#6c8c4c",
|
||||
"hover": "#7a9e55",
|
||||
"rest": "#87ab63",
|
||||
},
|
||||
"borderColor": {
|
||||
"hover": "#52576733",
|
||||
"rest": "#52576733",
|
||||
},
|
||||
"fgColor": {
|
||||
"rest": "#ffffff",
|
||||
},
|
||||
},
|
||||
"star": {
|
||||
"iconColor": "#cc9903",
|
||||
},
|
||||
},
|
||||
"contribution": {
|
||||
"default": {
|
||||
"bgColor": {
|
||||
"num0": "#52576799",
|
||||
"num1": "#516939",
|
||||
"num2": "#6c8c4c",
|
||||
"num3": "#87ab63",
|
||||
"num4": "#9fbc82",
|
||||
},
|
||||
"borderColor": {
|
||||
"num0": "#52576719",
|
||||
"num1": "var(--github-contribution-default-borderColor-0)",
|
||||
"num2": "var(--github-contribution-default-borderColor-0)",
|
||||
"num3": "var(--github-contribution-default-borderColor-0)",
|
||||
"num4": "var(--github-contribution-default-borderColor-0)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"control": {
|
||||
"bgColor": {
|
||||
"rest": "#4c525e",
|
||||
},
|
||||
"danger": {
|
||||
"bgColor": {
|
||||
"active": "rgba(219, 40, 40, 0.402)",
|
||||
"hover": "#db28281a",
|
||||
},
|
||||
"fgColor": {
|
||||
"hover": "#d15a5a",
|
||||
},
|
||||
},
|
||||
"transparent": {
|
||||
"bgColor": {
|
||||
"active": "#ffffff24",
|
||||
"hover": "#ffffff19",
|
||||
},
|
||||
"borderColor": {
|
||||
"active": "#0000",
|
||||
},
|
||||
},
|
||||
},
|
||||
"controlKnob": {
|
||||
"bgColor": {
|
||||
"rest": "#1e252e",
|
||||
},
|
||||
},
|
||||
"controlTrack": {
|
||||
"bgColor": {
|
||||
"rest": "#ffffff24",
|
||||
},
|
||||
},
|
||||
"counter": {
|
||||
"borderColor": "#0000",
|
||||
},
|
||||
"fgColor": {
|
||||
"accent": "#9fbc82",
|
||||
"done": "#b259d0",
|
||||
"onEmphasis": "#ffffff",
|
||||
"success": "#87ab63",
|
||||
},
|
||||
"progressBar": {
|
||||
"track": {
|
||||
"bgColor": "#0000",
|
||||
"borderColor": "#0000",
|
||||
},
|
||||
},
|
||||
"shadow": {
|
||||
"floating": {
|
||||
"small": "0px 0px 0px 1px var(--color-secondary), 0px 6px 12px -3px var(--color-shadow), 0px 6px 18px 0px var(--color-shadow);",
|
||||
},
|
||||
"inset": "inset 0px 1px 0px 0px #00000058",
|
||||
"resting": {
|
||||
"medium": "drop-shadow(0 1px 1px #00000058) drop-shadow(0 3px 6px #000000)",
|
||||
"small": "0px 1px 1px 0px #00000058, 0px 1px 3px 0px #00000058;",
|
||||
},
|
||||
},
|
||||
"themeExtra": {
|
||||
"button": {
|
||||
"primary": {
|
||||
"fgColor": {
|
||||
"accent": "hsla(90, 40%, 58%, 1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"contribution": {
|
||||
"default": {
|
||||
"bgColor": {
|
||||
"num5": "#b7cda1",
|
||||
},
|
||||
"borderColor": {
|
||||
"num5": "var(--github-contribution-default-borderColor-0)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"topicTag": {
|
||||
"borderColor": "#0000",
|
||||
},
|
||||
"underlineNav": {
|
||||
"borderColor": {
|
||||
"active": "var(--github-borderColor-accent-emphasis)",
|
||||
},
|
||||
},
|
||||
"workflowCardBg": "#1e252e",
|
||||
},
|
||||
"isDarkTheme": true,
|
||||
}
|
||||
`;
|
||||
@@ -34,6 +34,10 @@ describe("gitea2ThemeVars", () => {
|
||||
expect(gitea2ThemeVars(giteaColor.light)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("arc-green 快照", () => {
|
||||
expect(gitea2ThemeVars(giteaColor.arcGreen)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("dark isDarkTheme 为 true", () => {
|
||||
expect(gitea2ThemeVars(giteaColor.dark).isDarkTheme).toBe(true);
|
||||
});
|
||||
@@ -42,6 +46,10 @@ describe("gitea2ThemeVars", () => {
|
||||
expect(gitea2ThemeVars(giteaColor.light).isDarkTheme).toBe(false);
|
||||
});
|
||||
|
||||
it("arc-green isDarkTheme 为 true", () => {
|
||||
expect(gitea2ThemeVars(giteaColor.arcGreen).isDarkTheme).toBe(true);
|
||||
});
|
||||
|
||||
it("dark 输出含 color 和 github 顶层键", () => {
|
||||
const result = gitea2ThemeVars(giteaColor.dark);
|
||||
expect(result.color).toBeDefined();
|
||||
|
||||
@@ -120,7 +120,7 @@ export function gitea2ThemeVars(giteaColor: GiteaColor): ThemeVars {
|
||||
controlKnob: { bgColor: { rest: giteaColor.other.menu } },
|
||||
shadow: {
|
||||
floating: {
|
||||
small: `0px 0px 0px 1px ${themeVars.color.light.border}, 0px 6px 12px -3px ${themeVars.color.shadow.self}, 0px 6px 18px 0px ${themeVars.color.shadow.self};`,
|
||||
small: `0px 0px 0px 1px ${themeVars.color.secondary.self}, 0px 6px 12px -3px ${themeVars.color.shadow.self}, 0px 6px 18px 0px ${themeVars.color.shadow.self};`,
|
||||
},
|
||||
inset: `inset 0px 1px 0px 0px ${giteaColor.other.shadow.self}`,
|
||||
resting: {
|
||||
@@ -129,7 +129,7 @@ export function gitea2ThemeVars(giteaColor: GiteaColor): ThemeVars {
|
||||
medium: `drop-shadow(0 1px 1px ${giteaColor.other.shadow.self}) drop-shadow(0 3px 6px ${giteaColor.other.shadow.opaque})`,
|
||||
},
|
||||
},
|
||||
underlineNav: { borderColor: { active: giteaColor.other.text.dark } },
|
||||
underlineNav: { borderColor: { active: themeVars.github.borderColor.accent.emphasis } },
|
||||
contribution: {
|
||||
default: {
|
||||
bgColor: {
|
||||
|
||||
@@ -33,7 +33,7 @@ const heatmap = css`
|
||||
> div {
|
||||
padding: 12px 20px;
|
||||
box-shadow:
|
||||
0px 0px 0px 1px ${themeVars.color.light.border},
|
||||
0px 0px 0px 1px ${themeVars.color.secondary.self},
|
||||
${themeVars.github.shadow.resting.small};
|
||||
border-radius: 12px;
|
||||
/* 覆盖热力图和图例的背景色 */
|
||||
@@ -93,7 +93,7 @@ const activity = css`
|
||||
#activity-feed {
|
||||
border-radius: 12px;
|
||||
box-shadow:
|
||||
0px 0px 0px 1px ${themeVars.color.light.border},
|
||||
0px 0px 0px 1px ${themeVars.color.secondary.self},
|
||||
${themeVars.github.shadow.resting.small};
|
||||
> .item {
|
||||
gap: 12px;
|
||||
|
||||
@@ -56,9 +56,6 @@ const secondaryMenu = css`
|
||||
a.item {
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
color: ${themeVars.color.text.self};
|
||||
svg {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.active.item {
|
||||
/* 取消激活时的下划线, 需要为透明, 保持间距 */
|
||||
@@ -68,7 +65,7 @@ const secondaryMenu = css`
|
||||
content: "";
|
||||
background: ${themeVars.github.underlineNav.borderColor.active};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
bottom: calc(50% - 1.8rem);
|
||||
bottom: calc(50% - 1.65rem);
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
|
||||
+25
-24
@@ -64,30 +64,6 @@ export default defineThemeConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "pink",
|
||||
themes: {
|
||||
dark: { theme: themes.github.pink.dark },
|
||||
light: { theme: themes.github.pink.light },
|
||||
"soft-dark": { theme: themes.github.pink.softDark },
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "gitea",
|
||||
themes: {
|
||||
dark: { theme: themes.gitea.dark },
|
||||
light: { theme: themes.gitea.light },
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "catppuccin",
|
||||
themes: {
|
||||
dark: { themeName: "mocha", theme: themes.catppuccin.mocha },
|
||||
light: { themeName: "latte", theme: themes.catppuccin.latte },
|
||||
frappe: { theme: themes.catppuccin.frappe },
|
||||
macchiato: { theme: themes.catppuccin.macchiato },
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "high-contrast",
|
||||
themes: {
|
||||
@@ -128,5 +104,30 @@ export default defineThemeConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "pink",
|
||||
themes: {
|
||||
dark: { theme: themes.github.pink.dark },
|
||||
light: { theme: themes.github.pink.light },
|
||||
"soft-dark": { theme: themes.github.pink.softDark },
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "gitea",
|
||||
themes: {
|
||||
dark: { theme: themes.gitea.dark },
|
||||
light: { theme: themes.gitea.light },
|
||||
"arc-green": { theme: themes.gitea.arcGreen },
|
||||
},
|
||||
},
|
||||
{
|
||||
themeSeriesName: "catppuccin",
|
||||
themes: {
|
||||
dark: { themeName: "mocha", theme: themes.catppuccin.mocha },
|
||||
light: { themeName: "latte", theme: themes.catppuccin.latte },
|
||||
frappe: { theme: themes.catppuccin.frappe },
|
||||
macchiato: { theme: themes.catppuccin.macchiato },
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -24,7 +24,7 @@ import { fileURLToPath } from "node:url";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ROOT_DIR = path.resolve(__dirname, "..");
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
const DIST_DIR = path.join(ROOT_DIR, "dist");
|
||||
const PREFIX = "theme-github-";
|
||||
|
||||
@@ -47,21 +47,6 @@ const EXPECTED_THEME_FILES = [
|
||||
`${PREFIX}tritanopia-dark.css`,
|
||||
`${PREFIX}tritanopia-light.css`,
|
||||
`${PREFIX}tritanopia-auto.css`,
|
||||
// pink
|
||||
`${PREFIX}pink-dark.css`,
|
||||
`${PREFIX}pink-light.css`,
|
||||
`${PREFIX}pink-soft-dark.css`,
|
||||
`${PREFIX}pink-auto.css`,
|
||||
// gitea
|
||||
`${PREFIX}gitea-dark.css`,
|
||||
`${PREFIX}gitea-light.css`,
|
||||
`${PREFIX}gitea-auto.css`,
|
||||
// catppuccin
|
||||
`${PREFIX}catppuccin-mocha.css`,
|
||||
`${PREFIX}catppuccin-latte.css`,
|
||||
`${PREFIX}catppuccin-frappe.css`,
|
||||
`${PREFIX}catppuccin-macchiato.css`,
|
||||
`${PREFIX}catppuccin-auto.css`,
|
||||
// high contrast
|
||||
`${PREFIX}high-contrast-dark.css`,
|
||||
`${PREFIX}high-contrast-light.css`,
|
||||
@@ -75,6 +60,22 @@ const EXPECTED_THEME_FILES = [
|
||||
`${PREFIX}high-contrast-tritanopia-dark.css`,
|
||||
`${PREFIX}high-contrast-tritanopia-light.css`,
|
||||
`${PREFIX}high-contrast-tritanopia-auto.css`,
|
||||
// pink
|
||||
`${PREFIX}pink-dark.css`,
|
||||
`${PREFIX}pink-light.css`,
|
||||
`${PREFIX}pink-soft-dark.css`,
|
||||
`${PREFIX}pink-auto.css`,
|
||||
// gitea
|
||||
`${PREFIX}gitea-dark.css`,
|
||||
`${PREFIX}gitea-light.css`,
|
||||
`${PREFIX}gitea-arc-green.css`,
|
||||
`${PREFIX}gitea-auto.css`,
|
||||
// catppuccin
|
||||
`${PREFIX}catppuccin-mocha.css`,
|
||||
`${PREFIX}catppuccin-latte.css`,
|
||||
`${PREFIX}catppuccin-frappe.css`,
|
||||
`${PREFIX}catppuccin-macchiato.css`,
|
||||
`${PREFIX}catppuccin-auto.css`,
|
||||
];
|
||||
|
||||
/** auto 主题文件名列表 */
|
||||
@@ -0,0 +1,403 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 AND MIT
|
||||
|
||||
/*!
|
||||
* Copyright (c) https://github.com/lutinglt
|
||||
*
|
||||
* See the NOTICE file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2024 lsd-techno
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @copyright lsd-techno
|
||||
* @source https://github.com/lsd-techno/gitea-theme
|
||||
* @author lutinglt
|
||||
*/
|
||||
|
||||
import type {
|
||||
Ansi,
|
||||
Console,
|
||||
Diff,
|
||||
GiteaColor,
|
||||
Message,
|
||||
Named,
|
||||
Other,
|
||||
Primary,
|
||||
Secondary,
|
||||
Series16,
|
||||
Syntax,
|
||||
} from "@lutinglt/gitea-github-theme/core";
|
||||
import { defineTheme, themeVars } from "@lutinglt/gitea-github-theme/core";
|
||||
|
||||
const primary: Primary = {
|
||||
self: "#87ab63",
|
||||
contrast: "#ffffff",
|
||||
dark: {
|
||||
num1: "#93b373",
|
||||
num2: "#9fbc82",
|
||||
num3: "#abc492",
|
||||
num4: "#b7cda1",
|
||||
num5: "#cfddc1",
|
||||
num6: "#e7eee0",
|
||||
num7: "#f8faf6",
|
||||
},
|
||||
light: {
|
||||
num1: "#7a9e55",
|
||||
num2: "#6c8c4c",
|
||||
num3: "#5f7b42",
|
||||
num4: "#516939",
|
||||
num5: "#364626",
|
||||
num6: "#1b2313",
|
||||
num7: "#080b06",
|
||||
},
|
||||
alpha: {
|
||||
num10: "#87ab6319",
|
||||
num20: "#87ab6333",
|
||||
num30: "#87ab634b",
|
||||
num40: "#87ab6366",
|
||||
num50: "#87ab6380",
|
||||
num60: "#87ab6399",
|
||||
num70: "#87ab63b3",
|
||||
num80: "#87ab63cc",
|
||||
num90: "#87ab63e1",
|
||||
},
|
||||
hover: themeVars.color.primary.light.num1,
|
||||
active: themeVars.color.primary.light.num2,
|
||||
};
|
||||
const secondary: Secondary = {
|
||||
self: "#525767",
|
||||
dark: {
|
||||
num1: "#5c6374",
|
||||
num2: "#666e81",
|
||||
num3: "#7c8497",
|
||||
num4: "#8990a1",
|
||||
num5: "#959cab",
|
||||
num6: "#a2a8b5",
|
||||
num7: "#afb4c0",
|
||||
num8: "#bcc0ca",
|
||||
num9: "#c9cbd4",
|
||||
num10: "#d6d7de",
|
||||
num11: "#e2e3e8",
|
||||
num12: "#eeeff2",
|
||||
num13: "#fbfbfc",
|
||||
},
|
||||
light: {
|
||||
num1: "#454a57",
|
||||
num2: "#383c47",
|
||||
num3: "#2c2f37",
|
||||
num4: "#1f2226",
|
||||
},
|
||||
alpha: {
|
||||
num10: "#52576719",
|
||||
num20: "#52576733",
|
||||
num30: "#5257674b",
|
||||
num40: "#52576766",
|
||||
num50: "#52576780",
|
||||
num60: "#52576799",
|
||||
num70: "#525767b3",
|
||||
num80: "#525767cc",
|
||||
num90: "#525767e1",
|
||||
},
|
||||
button: themeVars.color.secondary.dark.num4,
|
||||
hover: themeVars.color.secondary.dark.num3,
|
||||
active: themeVars.color.secondary.dark.num2,
|
||||
};
|
||||
const console: Console = {
|
||||
fg: {
|
||||
self: "#eeeff2",
|
||||
subtle: "#959cab",
|
||||
},
|
||||
bg: "#262936",
|
||||
activeBg: "#454a57",
|
||||
hoverBg: "#ffffff16",
|
||||
link: "#969aa1",
|
||||
};
|
||||
const named: Named = {
|
||||
red: {
|
||||
self: "#cc4848",
|
||||
light: "#d15a5a",
|
||||
dark: { num1: "#c23636", num2: "#ad3030" },
|
||||
badge: { self: "#db2828", bg: "#db28281a", hover: { bg: "#db28284d" } },
|
||||
},
|
||||
orange: {
|
||||
self: "#cc580c",
|
||||
light: "#f6a066",
|
||||
dark: { num1: "#f38236", num2: "#f16e17" },
|
||||
badge: { self: "#f2711c", bg: "#f2711c1a", hover: { bg: "#f2711c4d" } },
|
||||
},
|
||||
yellow: {
|
||||
self: "#cc9903",
|
||||
light: "#eaaf03",
|
||||
dark: { num1: "#b88a03", num2: "#a37a02" },
|
||||
badge: { self: "#fbbd08", bg: "#fbbd081a", hover: { bg: "#fbbd084d" } },
|
||||
},
|
||||
olive: { self: "#91a313", light: "#abc016", dark: { num1: "#839311", num2: "#74820f" } },
|
||||
green: {
|
||||
self: "#87ab63",
|
||||
light: "#93b373",
|
||||
dark: { num1: "#7a9e55", num2: "#6c8c4c" },
|
||||
badge: { self: "#21ba45", bg: "#21ba451a", hover: { bg: "#21ba454d" } },
|
||||
},
|
||||
teal: { self: "#00918a", light: "#00b6ad", dark: { num1: "#00837c", num2: "#00746e" } },
|
||||
blue: { self: "#3a8ac6", light: "#4e96cc", dark: { num1: "#347cb3", num2: "#2e6e9f" } },
|
||||
violet: { self: "#906ae1", light: "#9b79e4", dark: { num1: "#7b4edb", num2: "#6733d6" } },
|
||||
purple: { self: "#b259d0", light: "#ba6ad5", dark: { num1: "#a742c9", num2: "#9834b9" } },
|
||||
pink: { self: "#d22e8b", light: "#d74397", dark: { num1: "#be297d", num2: "#a9246f" } },
|
||||
brown: { self: "#a47252", light: "#b08061", dark: { num1: "#94674a", num2: "#835b42" } },
|
||||
black: { self: "#2e323e", light: "#3f4555", dark: { num1: "#292d38", num2: "#252832" } },
|
||||
grey: { self: "#505665", light: "#a1a6b7" },
|
||||
gold: "#b1983b",
|
||||
white: "#ffffff",
|
||||
};
|
||||
const ansi: Ansi = {
|
||||
black: themeVars.color.black.self,
|
||||
red: themeVars.color.red.self,
|
||||
green: themeVars.color.green.self,
|
||||
yellow: themeVars.color.yellow.self,
|
||||
blue: themeVars.color.blue.self,
|
||||
magenta: themeVars.color.pink.self,
|
||||
cyan: themeVars.color.teal.self,
|
||||
white: themeVars.color.console.fg.subtle,
|
||||
bright: {
|
||||
black: themeVars.color.black.light,
|
||||
red: themeVars.color.red.light,
|
||||
green: themeVars.color.green.light,
|
||||
yellow: themeVars.color.yellow.light,
|
||||
blue: themeVars.color.blue.light,
|
||||
magenta: themeVars.color.pink.light,
|
||||
cyan: themeVars.color.teal.light,
|
||||
white: themeVars.color.console.fg.self,
|
||||
},
|
||||
};
|
||||
const diff: Diff = {
|
||||
added: {
|
||||
fg: themeVars.color.green.self,
|
||||
linenum: { bg: "#3c653c" },
|
||||
row: { bg: "#283e2d", border: "#314a37" },
|
||||
word: { bg: "#3c653c" },
|
||||
},
|
||||
moved: {
|
||||
row: { bg: "#818044", border: "#bcca6f" },
|
||||
},
|
||||
removed: {
|
||||
fg: themeVars.color.red.self,
|
||||
linenum: { bg: "#6f3333" },
|
||||
row: { bg: "#3c2626", border: "#634343" },
|
||||
word: { bg: "#6f3333" },
|
||||
},
|
||||
inactive: "#353846",
|
||||
};
|
||||
const message: Message = {
|
||||
error: {
|
||||
bg: { self: "#552222", active: "#774444", hover: "#663333" },
|
||||
border: "#a04141",
|
||||
text: "#f9cbcb",
|
||||
},
|
||||
success: {
|
||||
bg: "#284034",
|
||||
border: "#458a57",
|
||||
text: "#6cc664",
|
||||
},
|
||||
warning: {
|
||||
bg: "#3a3a30",
|
||||
border: "#bb9d00",
|
||||
text: "#fbbd08",
|
||||
},
|
||||
info: {
|
||||
bg: "#26354c",
|
||||
border: "#306090",
|
||||
text: "#38a8e8",
|
||||
},
|
||||
// 源主题 CSS 中未提供优先级提示色, 这里按主题的紫色系推导
|
||||
priority: {
|
||||
bg: "#281e38",
|
||||
border: "#522a92",
|
||||
text: "#b89de4",
|
||||
},
|
||||
};
|
||||
const other: Other = {
|
||||
logo: "#609926",
|
||||
body: "#2e323e",
|
||||
footer: "#232834",
|
||||
timeline: "#4c525e",
|
||||
box: {
|
||||
header: "#303340",
|
||||
body: { self: "#222733", highlight: "#262b36" },
|
||||
},
|
||||
text: {
|
||||
self: "#cbd0da",
|
||||
light: { self: "#bbbfca", num1: "#aaafb9", num2: "#9a9ea9", num3: "#8a8e99" },
|
||||
dark: "#dbe0ea",
|
||||
},
|
||||
input: {
|
||||
text: "#dfe3ec",
|
||||
background: "#1e252e",
|
||||
toggleBackground: "#454a57",
|
||||
border: themeVars.color.secondary.self,
|
||||
},
|
||||
light: { self: "#00000028", border: "#ffffff28" },
|
||||
hover: { self: "#ffffff19", opaque: "#434651" },
|
||||
active: "#ffffff24",
|
||||
menu: "#1e252e",
|
||||
card: "#1e252e",
|
||||
markup: {
|
||||
tableRow: "#ffffff06",
|
||||
code: { block: "#ffffff16", inline: "#2e4433" },
|
||||
},
|
||||
button: "#1e252e",
|
||||
codeBg: "#222733",
|
||||
shadow: { self: "#00000058", opaque: "#000000" },
|
||||
secondaryBg: "#2a2e3a",
|
||||
expandButton: "#3c404d",
|
||||
placeholderText: "#8a8e99",
|
||||
editor: {
|
||||
lineHighlight: themeVars.color.primary.light.num5,
|
||||
selection: themeVars.color.primary.alpha.num50,
|
||||
},
|
||||
projectColumnBg: themeVars.color.secondary.light.num2,
|
||||
caret: themeVars.color.text.self,
|
||||
reaction: {
|
||||
bg: "#ffffff12",
|
||||
hoverBg: themeVars.color.primary.light.num4,
|
||||
activeBg: themeVars.color.primary.light.num5,
|
||||
},
|
||||
tooltip: { text: "#ffffff", bg: "#000000f0" },
|
||||
nav: {
|
||||
bg: "#232834",
|
||||
hoverBg: "#383c47",
|
||||
text: themeVars.color.text.self,
|
||||
},
|
||||
secondaryNavBg: "#232834",
|
||||
label: {
|
||||
text: "#dfe3ec",
|
||||
bg: "#7c84974b",
|
||||
hoverBg: "#7c8497a0",
|
||||
activeBg: "#7c8497ff",
|
||||
},
|
||||
accent: themeVars.color.primary.light.num1,
|
||||
smallAccent: themeVars.color.primary.light.num5,
|
||||
highlight: { fg: "#7a9e55", bg: "#364626" },
|
||||
overlayBackdrop: "#080808c0",
|
||||
danger: themeVars.color.red.self,
|
||||
transparency: { grid: { light: "#3a3e4a", dark: "#2a2e3a" } },
|
||||
// workflowEdgeHover: "#5c6374",
|
||||
// 此颜色在 Gitea 中使用在 1.27 版本中出现偏差, CSS 高亮使用 primary 覆盖, 这里还原视觉效果与主题文件有偏差
|
||||
workflowEdgeHover: primary.self,
|
||||
};
|
||||
|
||||
const series16: Series16 = {
|
||||
num0: "#7db233",
|
||||
num1: "#499a37",
|
||||
num2: "#ce4751",
|
||||
num3: "#8f9121",
|
||||
num4: "#ac32a6",
|
||||
num5: "#7445e9",
|
||||
num6: "#c67d28",
|
||||
num7: "#4db392",
|
||||
num8: "#aa4d30",
|
||||
num9: "#2a6f84",
|
||||
num10: "#c45327",
|
||||
num11: "#3d965c",
|
||||
num12: "#792a93",
|
||||
num13: "#439d73",
|
||||
num14: "#103aad",
|
||||
num15: "#982e85",
|
||||
};
|
||||
|
||||
export const giteaArcGreenColor: GiteaColor = {
|
||||
isDarkTheme: true,
|
||||
primary,
|
||||
secondary,
|
||||
named,
|
||||
message,
|
||||
ansi,
|
||||
console,
|
||||
diff,
|
||||
other,
|
||||
series16,
|
||||
};
|
||||
|
||||
export const giteaArcGreenSyntax: Syntax = {
|
||||
keyword: "#ff7540",
|
||||
bool: "#649bc4",
|
||||
control: "#ffaa10",
|
||||
name: "#fabd2f",
|
||||
type: "#ff7b72",
|
||||
number: "#649bc4",
|
||||
operator: "#ff7540",
|
||||
regexp: "#9075cd",
|
||||
string: "#b8bb26",
|
||||
comment: "#777e94",
|
||||
invalid: "#ff4433",
|
||||
link: themeVars.color.primary.self,
|
||||
tag: "#ff7540",
|
||||
attribute: "#fabd2f",
|
||||
property: "#a0cc75",
|
||||
variable: "#ebdbb2",
|
||||
stringSpecial: "#ffaa10",
|
||||
escape: "#ff8540",
|
||||
entity: "#fabd2f",
|
||||
preproc: "#8ec07c",
|
||||
preprocFile: "#649bc4",
|
||||
decorator: "#8ec07c",
|
||||
namespace: "#c9d1d9",
|
||||
namePseudo: "#fabd2f",
|
||||
commentSpecial: "#9075cd",
|
||||
text: "#c9d1d9",
|
||||
textAlt: "#b6bac5",
|
||||
punctuation: "#d2d4db",
|
||||
whitespace: "#7f8699",
|
||||
diffFg: "#ffffff",
|
||||
deletedBg: "#5f3737",
|
||||
insertedBg: "#3a523a",
|
||||
emph: "#ddee30",
|
||||
strong: "#ebdbb2",
|
||||
heading: "#ffaa10",
|
||||
subheading: "#b8bb26",
|
||||
output: "#777e94",
|
||||
prompt: "#ebdbb2",
|
||||
traceback: "#ff7540",
|
||||
matchingBracketBg: "#00918a48",
|
||||
nonmatchingBracketBg: "#cc484848",
|
||||
};
|
||||
|
||||
export const giteaArcGreenTheme = defineTheme({
|
||||
colorType: "gitea",
|
||||
themeColor: giteaArcGreenColor,
|
||||
syntaxColor: giteaArcGreenSyntax,
|
||||
});
|
||||
+10
-6
@@ -17,6 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { GiteaColor } from "@lutinglt/gitea-github-theme/core";
|
||||
import {
|
||||
catppuccinFrappeTheme,
|
||||
catppuccinLatteTheme,
|
||||
@@ -44,10 +45,12 @@ import {
|
||||
githubTritanopiaDarkTheme,
|
||||
githubTritanopiaLightTheme,
|
||||
} from "./github";
|
||||
import { giteaArcGreenColor, giteaArcGreenTheme } from "./giteaArcGreen";
|
||||
|
||||
export const giteaColor = {
|
||||
export const giteaColor: Record<string, GiteaColor> = {
|
||||
dark: giteaDarkColor,
|
||||
light: giteaLightColor,
|
||||
arcGreen: giteaArcGreenColor,
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -63,11 +66,6 @@ export default {
|
||||
dark: githubTritanopiaDarkTheme,
|
||||
light: githubTritanopiaLightTheme,
|
||||
},
|
||||
pink: {
|
||||
dark: githubPinkDarkTheme,
|
||||
light: githubPinkLightTheme,
|
||||
softDark: githubPinkSoftDarkTheme,
|
||||
},
|
||||
highContrast: {
|
||||
dark: githubDarkHighContrastTheme,
|
||||
light: githubLightHighContrastTheme,
|
||||
@@ -81,10 +79,16 @@ export default {
|
||||
light: githubLightTritanopiaHighContrastTheme,
|
||||
},
|
||||
},
|
||||
pink: {
|
||||
dark: githubPinkDarkTheme,
|
||||
light: githubPinkLightTheme,
|
||||
softDark: githubPinkSoftDarkTheme,
|
||||
},
|
||||
},
|
||||
gitea: {
|
||||
dark: giteaDarkTheme,
|
||||
light: giteaLightTheme,
|
||||
arcGreen: giteaArcGreenTheme,
|
||||
},
|
||||
catppuccin: {
|
||||
latte: catppuccinLatteTheme,
|
||||
|
||||
+11
-1
@@ -36,5 +36,15 @@
|
||||
"@lutinglt/gitea-github-theme/primer": ["./primer"]
|
||||
}
|
||||
},
|
||||
"include": ["src", "styles", "themes", "scripts", "primer", "vite.config.ts", "theme.config.ts", "eslint.config.ts"]
|
||||
"include": [
|
||||
"src",
|
||||
"styles",
|
||||
"themes",
|
||||
"scripts",
|
||||
"primer",
|
||||
"eslint.config.ts",
|
||||
"vite.config.ts",
|
||||
"theme.config.ts",
|
||||
"theme.test.ts"
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
include: ["src/**/*.test.ts"],
|
||||
include: ["src/**/*.test.ts", "theme.test.ts"],
|
||||
testTimeout: 20000,
|
||||
open: false,
|
||||
allowOnly: true,
|
||||
|
||||
Reference in new issue
Block a user