mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-15 04:31:06 +00:00
make bgTheme a child of theme and reword stuff a little
This commit is contained in:
parent
164058b875
commit
1c4ba1a29d
1 changed files with 16 additions and 18 deletions
|
|
@ -488,15 +488,14 @@ Dribbblish.on("ready", () => {
|
|||
$("html").css("--is_light", setDark ? 0 : 1);
|
||||
|
||||
switch (Dribbblish.config.get("bgTheme")) {
|
||||
case "grey":
|
||||
textColorBg = setDark ? "#202020" : "#C0C0C0";
|
||||
case "bw":
|
||||
textColorBg = setDark ? "#0A0A0A" : "#FAFAFA";
|
||||
break;
|
||||
case "nord":
|
||||
textColorBg = setDark ? "#3B4252" : "#D8DEE9";
|
||||
break;
|
||||
case "bw":
|
||||
default:
|
||||
textColorBg = setDark ? "#0A0A0A" : "#FAFAFA";
|
||||
case "grey":
|
||||
textColorBg = setDark ? "#202020" : "#C0C0C0";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -618,8 +617,8 @@ Dribbblish.on("ready", () => {
|
|||
description: "Select Dark / Bright mode",
|
||||
defaultValue: "time",
|
||||
showChildren: (val) => {
|
||||
if (val == "time") return ["darkModeOnTime", "darkModeOffTime"];
|
||||
return false;
|
||||
if (val == "time") return ["darkModeOnTime", "darkModeOffTime", "bgTheme"];
|
||||
return ["bgTheme"];
|
||||
},
|
||||
onChange: (val) => {
|
||||
switch (val) {
|
||||
|
|
@ -652,21 +651,20 @@ Dribbblish.on("ready", () => {
|
|||
defaultValue: "06:00",
|
||||
fireInitialChange: false,
|
||||
onChange: checkDarkLightMode
|
||||
},
|
||||
{
|
||||
area: "Theme",
|
||||
type: "select",
|
||||
data: { bw: "Black / White", nord: "Nord", grey: "Greyish" },
|
||||
key: "bgTheme",
|
||||
name: "Background Theme",
|
||||
description: "Select which colors should be used as main background colors",
|
||||
defaultValue: "bw",
|
||||
onChange: () => toggleDark($("html").css("--is_light") == "0")
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Dribbblish.config.register({
|
||||
area: "Theme",
|
||||
type: "select",
|
||||
data: { bw: "Black/white", nord: "Nord polar night/snow storm", grey: "Dark/light grey" },
|
||||
key: "bgTheme",
|
||||
name: "Background Theme",
|
||||
description: "Select Dark / Bright background colors",
|
||||
defaultValue: "bw",
|
||||
onChange: () => toggleDark($("html").css("--is_light") == "0")
|
||||
});
|
||||
|
||||
function updateColors(checkDarkMode = true, sideColHex) {
|
||||
if (sideColHex == undefined) return registerCoverListener();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue