Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML generation: make the light theme lighter #3168

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Commands/Html/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ parseHtml = do
(eitherReader parseTheme)
( long "theme"
<> metavar "THEME"
<> value Latte
<> value LatteLight
<> showDefault
<> help ("Theme for syntax highlighting. " <> availableStr)
<> completeWith (map show allThemes)
Expand Down
30 changes: 30 additions & 0 deletions assets/css/latte-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Lighter version of the latte color palette based on https://github.com/catppuccin/catppuccin#-palette */

:root {
--ctp-rosewater: #dc8a78;
--ctp-flamingo: #dd7878;
--ctp-pink: #ea76cb;
--ctp-mauve: #8839ef;
--ctp-red: #d20f39;
--ctp-maroon: #e64553;
--ctp-peach: #fe640b;
--ctp-yellow: #df8e1d;
--ctp-green: #40a02b;
--ctp-teal: #179299;
--ctp-sky: #04a5e5;
--ctp-sapphire: #209fb5;
--ctp-blue: #1e66f5;
--ctp-lavender: #7287fd;
--ctp-text: #4c4f69;
--ctp-subtext1: #5c5f77;
--ctp-subtext0: #6c6f85;
--ctp-overlay2: #7c7f93;
--ctp-overlay1: #8c8fa1;
--ctp-overlay0: #9ca0b0;
--ctp-surface2: #acb0be;
--ctp-surface1: #bcc0cc;
--ctp-surface0: #ccd0da;
--ctp-base: #fbfcff;
--ctp-mantle: #f0f3f9;
--ctp-crust: #dce0e8;
}
3 changes: 3 additions & 0 deletions src/Juvix/Compiler/Backend/Html/Data/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ defaultHtmlOptions =
data Theme
= Nord
| Macchiato
| LatteLight
| Latte
| Frappe
| Mocha
Expand All @@ -49,6 +50,7 @@ instance Show Theme where
show = \case
Nord -> "nord"
Macchiato -> "macchiato"
LatteLight -> "latte-light"
Latte -> "latte"
Frappe -> "frappe"
Mocha -> "mocha"
Expand All @@ -62,6 +64,7 @@ themeLight :: Theme -> ThemeLight
themeLight = \case
Nord -> Dark
Macchiato -> Dark
LatteLight -> Light
Latte -> Light
Frappe -> Dark
Mocha -> Dark
Expand Down
5 changes: 5 additions & 0 deletions src/Juvix/Compiler/Backend/Html/Extra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ juvixNordCss = cssLink "juvix-nord.css"
nordCss :: (Members '[Reader HtmlOptions] r) => Sem r Html
nordCss = cssLink "nord.css"

latteLightCss :: (Members '[Reader HtmlOptions] r) => Sem r Html
latteLightCss = cssLink "latte-light.css"

latteCss :: (Members '[Reader HtmlOptions] r) => Sem r Html
latteCss = cssLink "latte.css"

Expand All @@ -87,6 +90,7 @@ flavourCss = do
case theme of
Nord -> nordCss
Macchiato -> macchiatoCss
LatteLight -> latteLightCss
Latte -> latteCss
Frappe -> frappeCss
Mocha -> mochaCss
Expand All @@ -97,6 +101,7 @@ themeCss = do
case theme of
Nord -> juvixNordCss
Macchiato -> juvixCatppuchinCss
LatteLight -> juvixCatppuchinCss
Latte -> juvixCatppuchinCss
Frappe -> juvixCatppuchinCss
Mocha -> juvixCatppuchinCss
Expand Down
Loading