Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feat: favicon adapts to browser theme (#2990)

Ethan Hyatt Freemanad27c0518354
diff --git a/apps/landing/public/icons/logo-icon-dark.svg b/apps/landing/public/icons/logo-icon-dark.svg
new file mode 100644
index 00000000..beb8ed40
--- /dev/null
+++ b/apps/landing/public/icons/logo-icon-dark.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 355 354" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(1,0,0,1,-232,-118)">
+ <path d="M565.33,118.79L253.02,118.79C241.46,118.79 232.09,128.16 232.09,139.72L232.09,450.44C232.09,462 241.46,471.37 253.02,471.37L565.33,471.37C576.89,471.37 586.26,462 586.26,450.44L586.26,139.72C586.26,128.16 576.89,118.79 565.33,118.79ZM386.85,419.57C386.85,422.58 384.4,425.03 381.39,425.03L285.11,425.03C282.1,425.03 279.65,422.58 279.65,419.57L279.65,169.43C279.65,166.42 282.1,163.96 285.11,163.96L379.87,163.96C382.88,163.96 385.33,166.41 385.33,169.43L385.33,264.64C385.33,264.64 384.81,305.61 386.85,337.76L386.85,419.58L386.85,419.57ZM537.19,419.57C537.19,423.92 532.36,426.52 528.75,424.14L484.85,395.44C482.95,394.18 480.5,394.25 478.64,395.59L440.16,423.4C438.56,424.59 436.67,424.66 435.07,424.07C433.66,423.07 432.73,421.43 432.73,419.57L432.73,225.34C437.94,224.34 443.73,223.78 450.43,223.78C483.29,223.78 537.2,242.37 537.2,294.78L537.2,419.58L537.19,419.57Z" style="fill:#ffffff;fill-rule:nonzero;"/>
+ </g>
+</svg>
diff --git a/apps/landing/src/layouts/BaseLayout.astro b/apps/landing/src/layouts/BaseLayout.astro
index 54c6a150..569959b7 100644
--- a/apps/landing/src/layouts/BaseLayout.astro
+++ b/apps/landing/src/layouts/BaseLayout.astro
@@ -61,7 +61,20 @@ const url = `${BASE_URL}${path}`;
content="Karakeep bookmark manager app screenshot"
/>
- <link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16" />
+ <link
+ rel="icon"
+ href="/icons/logo-icon.svg"
+ type="image/svg+xml"
+ sizes="any"
+ media="(prefers-color-scheme: light)"
+ />
+ <link
+ rel="icon"
+ href="/icons/logo-icon-dark.svg"
+ type="image/svg+xml"
+ sizes="any"
+ media="(prefers-color-scheme: dark)"
+ />
<link rel="apple-touch-icon" href="/icons/apple-icon.png" />
<ClientRouter />
diff --git a/apps/web/app/icon.png b/apps/web/app/icon.png
deleted file mode 100644
index 32788710..00000000
Binary files a/apps/web/app/icon.png and /dev/null differ
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index bcd4e7a9..e6e143b7 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -24,6 +24,23 @@ export const metadata: Metadata = {
applicationName: "Karakeep",
description:
"The Bookmark Everything app. Hoard links, notes, and images and they will get automatically tagged AI.",
+ icons: {
+ icon: [
+ {
+ url: "/icons/logo-icon.svg",
+ type: "image/svg+xml",
+ sizes: "any",
+ media: "(prefers-color-scheme: light)",
+ },
+ {
+ url: "/icons/logo-icon-dark.svg",
+ type: "image/svg+xml",
+ sizes: "any",
+ media: "(prefers-color-scheme: dark)",
+ },
+ ],
+ apple: "/apple-icon.png",
+ },
appleWebApp: {
capable: true,
title: "Karakeep",
diff --git a/apps/web/app/favicon.ico b/apps/web/public/favicon.ico
similarity index 100%
rename from apps/web/app/favicon.ico
rename to apps/web/public/favicon.ico
diff --git a/apps/web/public/icons/logo-icon-dark.svg b/apps/web/public/icons/logo-icon-dark.svg
new file mode 100644
index 00000000..beb8ed40
--- /dev/null
+++ b/apps/web/public/icons/logo-icon-dark.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 355 354" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(1,0,0,1,-232,-118)">
+ <path d="M565.33,118.79L253.02,118.79C241.46,118.79 232.09,128.16 232.09,139.72L232.09,450.44C232.09,462 241.46,471.37 253.02,471.37L565.33,471.37C576.89,471.37 586.26,462 586.26,450.44L586.26,139.72C586.26,128.16 576.89,118.79 565.33,118.79ZM386.85,419.57C386.85,422.58 384.4,425.03 381.39,425.03L285.11,425.03C282.1,425.03 279.65,422.58 279.65,419.57L279.65,169.43C279.65,166.42 282.1,163.96 285.11,163.96L379.87,163.96C382.88,163.96 385.33,166.41 385.33,169.43L385.33,264.64C385.33,264.64 384.81,305.61 386.85,337.76L386.85,419.58L386.85,419.57ZM537.19,419.57C537.19,423.92 532.36,426.52 528.75,424.14L484.85,395.44C482.95,394.18 480.5,394.25 478.64,395.59L440.16,423.4C438.56,424.59 436.67,424.66 435.07,424.07C433.66,423.07 432.73,421.43 432.73,419.57L432.73,225.34C437.94,224.34 443.73,223.78 450.43,223.78C483.29,223.78 537.2,242.37 537.2,294.78L537.2,419.58L537.19,419.57Z" style="fill:#ffffff;fill-rule:nonzero;"/>
+ </g>
+</svg>