Skip to content

Commit fecd3e5

Browse files
add github theme
1 parent f35850f commit fecd3e5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ FOMANTIC_WORK_DIR := web_src/fomantic
118118

119119
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
120120
WEBPACK_CONFIGS := webpack.config.js tailwind.config.js
121-
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
121+
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css public/assets/css/theme-github.css
122122
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
123123

124124
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
@@ -866,6 +866,8 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
866866
@rm -rf $(WEBPACK_DEST_ENTRIES)
867867
@echo "Running webpack..."
868868
@BROWSERSLIST_IGNORE_OLD_DATA=true npx webpack
869+
@wget -c -O "public/assets/css/theme-github.css" \
870+
"https://github.com/lutinglt/gitea-github-theme/releases/latest/download/theme-github.css"
869871
@touch $(WEBPACK_DEST)
870872

871873
.PHONY: svg

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ LEVEL = Info
12881288
;SHOW_USER_EMAIL = true
12891289
;;
12901290
;; Set the default theme for the Gitea install
1291-
;DEFAULT_THEME = gitea-auto
1291+
;DEFAULT_THEME = github
12921292
;;
12931293
;; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`.
12941294
;; Leave it empty to allow users to select any theme from "{CustomPath}/public/assets/css/theme-*.css"

modules/setting/ui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var UI = struct {
8383
CodeCommentLines: 4,
8484
ReactionMaxUserNum: 10,
8585
MaxDisplayFileSize: 8388608,
86-
DefaultTheme: `gitea-auto`,
86+
DefaultTheme: `github`,
8787
Reactions: []string{`+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket`, `eyes`},
8888
CustomEmojis: []string{`git`, `gitea`, `codeberg`, `gitlab`, `github`, `gogs`},
8989
CustomEmojisMap: map[string]string{"git": ":git:", "gitea": ":gitea:", "codeberg": ":codeberg:", "gitlab": ":gitlab:", "github": ":github:", "gogs": ":gogs:"},

0 commit comments

Comments
 (0)