Skip to content

Commit

Permalink
CB/bp: fix wrong theme class when logged out if default theme is chan…
Browse files Browse the repository at this point in the history
…ged (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 <crystal@noreply.codeberg.org>
  • Loading branch information
crystalcommunication authored and Codeberg Admins @ build committed Feb 23, 2023
1 parent bb4d79b commit 357da82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/base/head.tmpl
Original file line number Diff line number Diff line change
@@ -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">
Expand Down

0 comments on commit 357da82

Please sign in to comment.