// GeneralUISettings contains global ui settings exposed by API
type GeneralUISettings struct {
+ DefaultTheme string `json:"default_theme"`
AllowedReactions []string `json:"allowed_reactions"`
}
// "200":
// "$ref": "#/responses/GeneralUISettings"
ctx.JSON(http.StatusOK, api.GeneralUISettings{
+ DefaultTheme: setting.UI.DefaultTheme,
AllowedReactions: setting.UI.Reactions,
})
}
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
+ <meta name="default-theme" content="{{DefaultTheme}}" />
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
<meta name="keywords" content="{{MetaKeywords}}">
"type": "string"
},
"x-go-name": "AllowedReactions"
+ },
+ "default_theme": {
+ "type": "string",
+ "x-go-name": "DefaultTheme"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"