loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove meta tags `theme-color` and `default-theme` (#24960)

As discussed in
https://github.com/go-gitea/gitea/pull/24953#issuecomment-1565630156.

## :warning: BREAKING :warning:

1. The `ui.THEME_COLOR_META_TAG` setting has been removed. If you still
need to set the `theme-color` meta tag, add it via
`$GITEA_CUSTOM/templates/custom/header.tmpl` instead.

2. The non-standard `default-theme` meta-tag added in
https://github.com/go-gitea/gitea/pull/13809 has been removed. Third
party code that needs to obtain the currently loaded theme should use
the `theme-<name>` class on the `<html>` node instead, which reflect the
currently active theme.

authored by

silverwind and committed by
GitHub
c7612d17 faf8557b

+3 -15
-4
custom/conf/app.example.ini
··· 1180 1180 ;; Number of line of codes shown for a code comment 1181 1181 ;CODE_COMMENT_LINES = 4 1182 1182 ;; 1183 - ;; Value of `theme-color` meta tag, used by some mobile browers for chrome and 1184 - ;; out-of-viewport areas. Default is unset which uses body color. 1185 - ;THEME_COLOR_META_TAG = 1186 - ;; 1187 1183 ;; Max size of files to be displayed (default is 8MiB) 1188 1184 ;MAX_DISPLAY_FILE_SIZE = 8388608 1189 1185 ;;
-1
docs/content/doc/administration/config-cheat-sheet.en-us.md
··· 221 221 - `SHOW_USER_EMAIL`: **true**: Whether the email of the user should be shown in the Explore Users page. 222 222 - `THEMES`: **auto,gitea,arc-green**: All available themes. Allow users select personalized themes. 223 223 regardless of the value of `DEFAULT_THEME`. 224 - - `THEME_COLOR_META_TAG`: **\<empty\>**: Value of `theme-color` meta tag, used by some mobile browsers for chrome and out-of-viewport areas. Default is unset which uses body color. 225 224 - `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB) 226 225 - `REACTIONS`: All available reactions users can choose on issues/prs and comments 227 226 Values can be emoji alias (:smile:) or a unicode emoji.
-2
modules/setting/ui.go
··· 22 22 GraphMaxCommitNum int 23 23 CodeCommentLines int 24 24 ReactionMaxUserNum int 25 - ThemeColorMetaTag string 26 25 MaxDisplayFileSize int64 27 26 ShowUserEmail bool 28 27 DefaultShowFullName bool ··· 77 76 GraphMaxCommitNum: 100, 78 77 CodeCommentLines: 4, 79 78 ReactionMaxUserNum: 10, 80 - ThemeColorMetaTag: ``, 81 79 MaxDisplayFileSize: 8388608, 82 80 DefaultTheme: `auto`, 83 81 Themes: []string{`auto`, `gitea`, `arc-green`},
-3
modules/templates/helper.go
··· 118 118 "CustomEmojis": func() map[string]string { 119 119 return setting.UI.CustomEmojisMap 120 120 }, 121 - "ThemeColorMetaTag": func() string { 122 - return setting.UI.ThemeColorMetaTag 123 - }, 124 121 "MetaAuthor": func() string { 125 122 return setting.UI.Meta.Author 126 123 },
+1 -3
templates/base/head.tmpl
··· 4 4 <meta name="viewport" content="width=device-width, initial-scale=1"> 5 5 <title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}}{{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title> 6 6 {{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}} 7 - {{if ThemeColorMetaTag}}<meta name="theme-color" content="{{ThemeColorMetaTag}}">{{end}} 8 - <meta name="default-theme" content="{{DefaultTheme}}"> 9 7 <meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}"> 10 8 <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}"> 11 9 <meta name="keywords" content="{{MetaKeywords}}"> ··· 63 61 <meta property="og:description" content="{{MetaDescription}}"> 64 62 {{end}} 65 63 <meta property="og:site_name" content="{{AppName}}"> 66 - {{template "base/stylesheets" .}} 64 + {{template "base/head_style" .}} 67 65 {{template "custom/header" .}} 68 66 </head> 69 67 <body>
templates/base/stylesheets.tmpl templates/base/head_style.tmpl
+2 -2
templates/status/500.tmpl
··· 11 11 <title>Internal Server Error - {{AppName}}</title> 12 12 <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml"> 13 13 <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png"> 14 - {{template "base/stylesheets" .}} 14 + {{template "base/head_style" .}} 15 15 </head> 16 16 <body> 17 17 <div class="full height"> ··· 28 28 <div role="main" class="page-content status-page-500"> 29 29 <p class="gt-mt-5 center"><img src="{{AssetUrlPrefix}}/img/500.png" alt="Internal Server Error"></p> 30 30 <div class="ui divider"></div> 31 - <div class="ui container gt-mt-5"> 31 + <div class="ui container gt-my-5"> 32 32 {{if .ErrorMsg}} 33 33 <p>{{.locale.Tr "error.occurred"}}:</p> 34 34 <pre class="gt-whitespace-pre-wrap gt-break-all">{{.ErrorMsg}}</pre>