diff --git a/config.toml b/config.toml index 2b1ba58..d814785 100644 --- a/config.toml +++ b/config.toml @@ -162,6 +162,12 @@ default_theme = "light" # All other skins have optimal contrast. skin = "" +# Set browser theme colour. Can be a single colour or [light, dark]. +# Note: Bright colors may be ignored in dark mode. +# More details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color +browser_theme_color = "#087e96" +# browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours. + # List additional stylesheets to load site-wide. # These stylesheets should be located in your site's `static` directory. # Example: stylesheets = ["extra1.css", "path/extra2.css"] diff --git a/templates/partials/header.html b/templates/partials/header.html index 714e5fc..656882e 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -53,6 +53,15 @@ + {%- if config.extra.browser_theme_color and config.extra.browser_theme_color is iterable -%} + {# Handle array values: theme_color[0] for light mode, theme_color[1] for dark mode #} + + + {%- elif config.extra.browser_theme_color -%} + {# Handle single value #} + + {%- endif -%} + {%- if page.description %} diff --git a/theme.toml b/theme.toml index 8343ccd..50a27ab 100644 --- a/theme.toml +++ b/theme.toml @@ -47,6 +47,12 @@ default_theme = "light" # All other skins have optimal contrast. skin = "" +# Set browser theme colour. Can be a single colour or [light, dark]. +# Note: Bright colors may be ignored in dark mode. +# More details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color +# browser_theme_color = "#087e96" # Example of single value. +# browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours. + # List additional stylesheets to load site-wide. # These stylesheets should be located in your site's `static` directory. # Example: stylesheets = ["extra1.css", "path/extra2.css"]