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 | |
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')
-rw-r--r-- | templates/base/head.tmpl | 4 | ||||
-rw-r--r-- | templates/base/head_style.tmpl (renamed from templates/base/stylesheets.tmpl) | 0 | ||||
-rw-r--r-- | templates/status/500.tmpl | 4 |
3 files changed, 3 insertions, 5 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 diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index c7b2472859..42d422687e 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -11,7 +11,7 @@ <title>Internal Server Error - {{AppName}}</title> <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml"> <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png"> - {{template "base/stylesheets" .}} + {{template "base/head_style" .}} </head> <body> <div class="full height"> @@ -28,7 +28,7 @@ <div role="main" class="page-content status-page-500"> <p class="gt-mt-5 center"><img src="{{AssetUrlPrefix}}/img/500.png" alt="Internal Server Error"></p> <div class="ui divider"></div> - <div class="ui container gt-mt-5"> + <div class="ui container gt-my-5"> {{if .ErrorMsg}} <p>{{.locale.Tr "error.occurred"}}:</p> <pre class="gt-whitespace-pre-wrap gt-break-all">{{.ErrorMsg}}</pre> |