Skip to content

add arc-green theme - #41

Merged
lutinglt merged 7 commits into
mainfrom
arc-green
Oct 18, 2026
Merged

lutinglt merged 7 commits into
mainfrom
arc-green

Conversation

@lutinglt

Copy link
Copy Markdown
Owner

No description provided.

@lutinglt lutinglt self-assigned this Oct 16, 2026
@lutinglt lutinglt added the enhancement 新的样式或功能 New feature or request label Oct 16, 2026
@lsd-techno

Copy link
Copy Markdown

@lutinglt You would need to create chroma/dark.css and codemirror/dark.css in gitea/custom/public/assets/css/ to implement syntax highlighting in file view and edit.

$GITEA_CUSTOM/public/assets/css/
├── theme-arc-green-updated.css
├── theme-gitea-auto.css          (if used)
├── chroma/
│   └── dark.css
└── codemirror/
    └── dark.css

@lutinglt

Copy link
Copy Markdown
Owner Author

@lutinglt You would need to create chroma/dark.css and codemirror/dark.css in gitea/custom/public/assets/css/ to implement syntax highlighting in file view and edit.

$GITEA_CUSTOM/public/assets/css/
├── theme-arc-green-updated.css
├── theme-gitea-auto.css          (if used)
├── chroma/
│   └── dark.css
└── codemirror/
    └── dark.css

export const arcGreenSyntax: 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",
};

This paragraph defines the syntax highlight used for editing and previewing, I remember it was around Gitea 1.26 or 1.27?

When switching back from Monaco to CodeMirror6, Gitea defined a set of syntax highlighting variable colors for both preview and editing, which is currently working well.

image image

@lutinglt

Copy link
Copy Markdown
Owner Author

@lsd-techno You can download the compiled theme here and see the actual effect. 😄

https://github.com/lutinglt/gitea-github-theme/actions/runs/38846437987

@lutinglt
lutinglt merged commit dc2314f into main Oct 18, 2026
4 checks passed
@lutinglt
lutinglt deleted the arc-green branch October 18, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 新的样式或功能 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants