Skip to content

Commit

Permalink
chore(theme): change Default to Dank
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jun 9, 2024
1 parent 6a29256 commit a8b563b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/handlers/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ func isMobile(r *http.Request) bool {
func getTheme(r *http.Request) string {
themeCookie, err := r.Cookie(ThemeName)
if err != nil || themeCookie == nil || themeCookie.Value == "" {
return "default"
return "dank"
}
switch themeCookie.Value {
case "black":
return "black"
case "white":
return "white"
case "default":
case "dank":
fallthrough
default:
return "default"
return "dank"
}
}

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions app/views/components/themeswitch/themeswitch.templ
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ var themes = []struct {
actualName string
}{
{
displayName: "Default",
actualName: "default",
displayName: "Dank",
actualName: "dank",
},
{
displayName: "Black",
Expand Down Expand Up @@ -53,7 +53,7 @@ script changeTheme(themeName string) {
document.cookie = "theme-name" + "=" + themeName + expires + "; path=/";

const themes = {
default: {
dank: {
primary: "#4c8c36",
primary20: "#4c8c3633",
primary30: "#4c8c364c",
Expand Down Expand Up @@ -119,5 +119,5 @@ script changeTheme(themeName string) {
style.setProperty('--accent-color-30', theme.accent30);
style.setProperty('--accent-color-69', theme.accent69);
document.body.style.backgroundColor = theme.bg;
document.getElementById("popover-theme-switcher").style.display = "none";
//document.getElementById("popover-theme-switcher").style.display = "none";
}

0 comments on commit a8b563b

Please sign in to comment.