Skip to content

Commit 357da82

Browse files
crystalcommunicationCodeberg Admins @ build
authored and
Codeberg Admins @ build
committed
CB/bp: fix wrong theme class when logged out if default theme is changed (go-gitea#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. (cherry picked from commit 9ffaf19) Signed-off-by: crystal <[email protected]>
1 parent bb4d79b commit 357da82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/base/head.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="{{.locale.Lang}}" class="theme-{{if .SignedUser.Theme}}{{.SignedUser.Theme}}{{else}}auto{{end}}">
2+
<html lang="{{.locale.Lang}}" class="theme-{{if .SignedUser.Theme}}{{.SignedUser.Theme}}{{else}}{{DefaultTheme}}{{end}}">
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">

0 commit comments

Comments
 (0)