cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

98f630963ec767030c91b5e7af810107177e18d3

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2025-05-28T16:36:05Z

feat: add light and dark favicons
 theme/static/favicon.ico      | Bin 170471 -> 3696 bytes
 theme/static/favicon_dark.ico | Bin 0 -> 3686 bytes
 theme/templates/base.html     |   3 ++-
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/theme/static/favicon.ico b/theme/static/favicon.ico
index ad02180..399f17d 100644
Binary files a/theme/static/favicon.ico and b/theme/static/favicon.ico differ
diff --git a/theme/static/favicon_dark.ico b/theme/static/favicon_dark.ico
new file mode 100644
index 0000000..aee46ba
Binary files /dev/null and b/theme/static/favicon_dark.ico differ
diff --git a/theme/templates/base.html b/theme/templates/base.html
index daa43d0..c993f97 100644
--- a/theme/templates/base.html
+++ b/theme/templates/base.html
@@ -12,7 +12,8 @@
     {% if site_description is defined %}<meta name="description" content="{{ site_description }}" >{% endif %}
     {% if site_keywords is defined %}<meta name="keywords" content="{{ site_keywords }}" >{% endif %}
     <link rel="stylesheet" href="{{ url_for("static", file="styles.min.css") }}" type="text/css">
-    <link rel="icon" type="image/x-icon" href="{{ url_for("static", file="favicon.ico") }}">
+    <link rel="icon" type="image/x-icon" href="{{ url_for("static", file="favicon.ico") }}" media="(prefers-color-scheme: light)">
+    <link rel="icon" type="image/x-icon" href="{{ url_for("static", file="favicon_dark.ico") }}" media="(prefers-color-scheme: dark)">
     {% block meta %}{% endblock %}
     {% endblock %}
 </head>