diff options
author | silverwind <me@silverwind.io> | 2023-05-29 00:33:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 22:33:17 +0000 |
commit | c7612d178c5b954d4846cd27a65a7fa15fd1ba65 (patch) | |
tree | 4c1997114321fe6ebd3a87070cd918eb6a00e591 /templates/base | |
parent | faf8557b4c537f7348413934c36fe4bbaa99809b (diff) | |
download | gitea-c7612d178c5b954d4846cd27a65a7fa15fd1ba65.tar.gz gitea-c7612d178c5b954d4846cd27a65a7fa15fd1ba65.zip |
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.
Diffstat (limited to 'templates/base')
-rw-r--r-- | templates/base/head.tmpl | 4 | ||||
-rw-r--r-- | templates/base/head_style.tmpl (renamed from templates/base/stylesheets.tmpl) | 0 |
2 files changed, 1 insertions, 3 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 690cade8d7..a233865a3d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -4,8 +4,6 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}}{{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title> {{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}} - {{if ThemeColorMetaTag}}<meta name="theme-color" content="{{ThemeColorMetaTag}}">{{end}} - <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}}"> @@ -63,7 +61,7 @@ <meta property="og:description" content="{{MetaDescription}}"> {{end}} <meta property="og:site_name" content="{{AppName}}"> - {{template "base/stylesheets" .}} + {{template "base/head_style" .}} {{template "custom/header" .}} </head> <body> diff --git a/templates/base/stylesheets.tmpl b/templates/base/head_style.tmpl index 7e8cba2aed..7e8cba2aed 100644 --- a/templates/base/stylesheets.tmpl +++ b/templates/base/head_style.tmpl |