diff options
author | crystal <71373843+CrystalCommunication@users.noreply.github.com> | 2023-01-12 07:52:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 08:52:05 -0600 |
commit | 9ffaf19d89b24589f4f4ec1211881102cafc7370 (patch) | |
tree | 6446c2873ca4bd3a9252ca41e797c42bf2ac2dce | |
parent | b36854df3772ad4aac682c69ed090c24e1c9dd4f (diff) | |
download | gitea-9ffaf19d89b24589f4f4ec1211881102cafc7370.tar.gz gitea-9ffaf19d89b24589f4f4ec1211881102cafc7370.zip |
fix wrong theme class when logged out if default theme is changed (#22408)
If you don't use the `auto` theme as the default, the `<html>` tag has
`theme-auto` as it's class when users are logged out. This PR changes it
to use the correct theme class for the default theme when logged out.
-rw-r--r-- | templates/base/head.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index e2fc8434aa..36c4fafd2b 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="{{.locale.Lang}}" class="theme-{{if .SignedUser.Theme}}{{.SignedUser.Theme}}{{else}}auto{{end}}"> +<html lang="{{.locale.Lang}}" class="theme-{{if .SignedUser.Theme}}{{.SignedUser.Theme}}{{else}}{{DefaultTheme}}{{end}}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> |