feat: dark theme export background

This commit is contained in:
Arnošt Pleskot 2023-08-13 20:00:17 +02:00
parent baa133cbb7
commit 787f5d68cf
No known key found for this signature in database
11 changed files with 172 additions and 75 deletions

View file

@ -188,6 +188,13 @@ export const ACTIVE_THRESHOLD = 3_000;
export const THEME_FILTER = cssVariables.themeFilter;
// using a stronger invert (100% vs our regular 93%) and saturate
// as a temp hack to make images in dark theme look closer to original
// color scheme (it's still not quite there and the colors look slightly
// desatured, alas...)
export const IMAGE_INVERT_FILTER =
"invert(100%) hue-rotate(180deg) saturate(1.25)";
export const URL_QUERY_KEYS = {
addLibrary: "addLibrary",
} as const;
@ -320,16 +327,33 @@ export const DEFAULT_SIDEBAR = {
export const LIBRARY_DISABLED_TYPES = new Set(["embeddable", "image"] as const);
export const FANCY_BACKGROUND_IMAGES = {
solid: { path: null, label: "solid color" },
bubbles: { path: "/backgrounds/bubbles.svg" as DataURL, label: "bubbles" },
solid: { light: null, dark: null, label: "solid color" },
bubbles: {
light: "/backgrounds/bubbles.svg" as DataURL,
dark: "/backgrounds/bubbles_dark.svg" as DataURL,
label: "bubbles",
},
bubbles2: {
path: "/backgrounds/bubbles2.svg" as DataURL,
light: "/backgrounds/bubbles2.svg" as DataURL,
dark: "/backgrounds/bubbles2_dark.svg" as DataURL,
label: "bubbles 2",
},
bricks: { path: "/backgrounds/bricks.svg" as DataURL, label: "bricks" },
lines: { path: "/backgrounds/lines.svg" as DataURL, label: "lines" },
lines2: { path: "/backgrounds/lines2.svg" as DataURL, label: "lines 2" },
bricks: {
light: "/backgrounds/bricks.svg" as DataURL,
dark: "/backgrounds/bricks_dark.svg" as DataURL,
label: "bricks",
},
lines: {
light: "/backgrounds/lines.svg" as DataURL,
dark: "/backgrounds/lines_dark.svg" as DataURL,
label: "lines",
},
lines2: {
light: "/backgrounds/lines2.svg" as DataURL,
dark: "/backgrounds/lines2_dark.svg" as DataURL,
label: "lines 2",
},
} as const;
export const DEFAULT_FANCY_BACKGROUND_IMAGE: keyof typeof FANCY_BACKGROUND_IMAGES =
"solid" as const;
"bubbles" as const;