From 1ce204bf4eb32f1bc694432d5251be0e4c8c30cf Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 16 Jul 2024 21:48:21 +0000 Subject: [PATCH] add catppuccin macchiato theme (by mudkip) --- src/web/assets/style.css | 5 +++++ .../assets/themes/catppuccin-macchiato.css | 21 +++++++++++++++++++ src/web/mod.rs | 1 + src/web/settings.rs | 1 + 4 files changed, 28 insertions(+) create mode 100644 src/web/assets/themes/catppuccin-macchiato.css diff --git a/src/web/assets/style.css b/src/web/assets/style.css index c785788..34af2bf 100644 --- a/src/web/assets/style.css +++ b/src/web/assets/style.css @@ -32,6 +32,11 @@ --syntax-func: #ffb454; } +::selection { + background-color: var(--accent); + color: var(--bg-3); +} + html { height: 100%; } diff --git a/src/web/assets/themes/catppuccin-macchiato.css b/src/web/assets/themes/catppuccin-macchiato.css new file mode 100644 index 0000000..2bf7c9f --- /dev/null +++ b/src/web/assets/themes/catppuccin-macchiato.css @@ -0,0 +1,21 @@ +:root { + --bg-1: #24273a; /* background */ + --bg-2: #1e2030; /* mantle */ + --bg-3: #181926; /* crust */ + --bg-4: #363a4e; /* surface 0 */ + --fg-1: #cad3f5; /* text */ + --fg-2: #b8c0e0; /* subtext 1 */ + --fg-2: #a5adcb; /* subtext 0 */ + --accent: #c6a0f6; /* mauve */ + --positive: #a6da95; /* green */ + --negative: #ed8796; /* red */ + + --syntax-string: #a6da95; /* green (string) */ + --syntax-special: #c69ff5; /* mauve (keyword) */ + --syntax-constant: #f5a97f; /* peach (constant/number) */ + --syntax-comment: #929ab7; /* overlay 2 (comment) */ + --syntax-func: #8aadf3; /* blue (method/function) */ + + --link: var(--accent); + --link-visited: var(--link); +} diff --git a/src/web/mod.rs b/src/web/mod.rs index f0e606e..5ce7ab5 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -75,6 +75,7 @@ pub async fn run(config: Config) { "robots.txt", "scripts/colorpicker.js", "themes/catppuccin-mocha.css", + "themes/catppuccin-macchiato.css", "themes/catppuccin-latte.css", "themes/nord-bluish.css", "themes/discord.css" diff --git a/src/web/settings.rs b/src/web/settings.rs index efaee12..155c4ff 100644 --- a/src/web/settings.rs +++ b/src/web/settings.rs @@ -34,6 +34,7 @@ pub async fn get(Extension(config): Extension) -> impl IntoResponse { select name="stylesheet-url" selected=(config.ui.stylesheet_url) { { (theme_option("", "Ayu Dark")) } { (theme_option("/themes/catppuccin-mocha.css", "Catppuccin Mocha")) } + { (theme_option("/themes/catppuccin-macchiato.css", "Catppuccin Macchiato")) } { (theme_option("/themes/catppuccin-latte.css", "Catppuccin Latte")) } { (theme_option("/themes/nord-bluish.css", "Nord Bluish")) } { (theme_option("/themes/discord.css", "Discord")) }