From 19e9bf91a6e6f36f1ba35c5559fe5908580cf0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lombardo?= Date: Thu, 30 May 2024 13:29:01 -0300 Subject: [PATCH] add light mode icon --- app/index.tsx | 1 + assets/Favicon.ts | 13 +++++++++++++ assets/public/favicon-dark.png | Bin 0 -> 1755 bytes assets/public/favicon.ico | Bin 0 -> 16958 bytes assets/public/favicon.png | Bin 1755 -> 2610 bytes assets/report.html | 2 +- report/index.tsx | 1 + 7 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 assets/Favicon.ts create mode 100644 assets/public/favicon-dark.png create mode 100644 assets/public/favicon.ico diff --git a/app/index.tsx b/app/index.tsx index b211fedb..75ce58d1 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -3,6 +3,7 @@ import { createRoot } from "react-dom/client"; import { HomePage } from "@app/HomePage"; +import "@assets/Favicon"; import { plausible } from "@assets/Plausible"; createRoot(document.getElementById("app") as HTMLElement).render( diff --git a/assets/Favicon.ts b/assets/Favicon.ts new file mode 100644 index 00000000..cd86c537 --- /dev/null +++ b/assets/Favicon.ts @@ -0,0 +1,13 @@ +function prefersDarkColorScheme() { + return window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches; +} + +function updateFavicon() { + const favicon = document.querySelector("link[rel=icon]") as HTMLLinkElement; + const url = "https://chatanalytics.app/"; + + favicon.href = url + (prefersDarkColorScheme() ? "favicon-dark.png" : "favicon.png"); +} + +updateFavicon(); +window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => updateFavicon()); diff --git a/assets/public/favicon-dark.png b/assets/public/favicon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..651f01ef8126cf5d0c9f7a99fd4b8cbf91f9ffce GIT binary patch literal 1755 zcmV<11|<23P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGVXaE2KXaNLM8@~Vm25?D4K~!i%?O9!H z6jc`W07zT{@^-kCY)eCOPA z=H9#7P5jT$Ez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WicIhyEUf(H8RfMJRcL;s% zda`|s?qW_z3_!+v7#v{3x$ni6_ohASSRW!Fn*_4&e+K(@_TecBt&ErU2)~l7zg}9= zmzL9&I^Dp)OD&27=A?wM?a-n*vN=)HNgliwpe~YdgR);@R3{OM>2yt4V0$W42)W@{ zU)c<;#3Nq7Z-Co~myN)}{!vNd{<_(PQX^*iSfSQI^2`-&vt@ z+CW`(f1yCG(Y1?x`k7k!`3THz0Y+P<^mk>MpX3I+1`#A^=F`+3{N=SC06l*O0Z z9|ASMofD6wmrO4dNaaDhTQPXLmgj`X=s_tOe_vKF_lLlo-t*#-Sg{AsP4^(M@H(WIu_^!&y4(HaZCBt><1m|8}~!zc6I0l)a80Vpspn$ zJ0zC^y`YlibomHW;1Ms7h=YV1l+A%@Jr^X2kq1dR`d~v&$Qb%8u`(u2p1VArzyh#U ze~Br=%A*533*s@0oCVn@aU!#UGIrMl9eb@T0kiw>41~&Q83nr}(S_g9-i33Ejs{m8 z8I)w@gpp^_t{{>AuIB!{B}O@vB`~G?VgLs5AZpAw2P8tcw?mDm@H<>cV)@WvIsbvI z)g?#_@0nYF)x+FElqFCpu!;?X1W)Fwe?TIuNQ|v}mJJPIwp-ePd**viFn1Z_5Lmq? zPyl#zl7>&KkeG@3fn#HfKPD>U;|C^$009y`Ai@8(Qi{Y*kWgDy_toZVm@onaNMuwb zy6ABj-3}5REYBq22PPy3N};a*1phK>vJ>7;+|+{F>oW&R0ozg@DK@J}_!fa{C`Nz) o2_9oMf&`Cnl4|%SZeVEIf2jMra}JJ%)c^nh07*qoM6N<$f@pX&4*&oF diff --git a/assets/report.html b/assets/report.html index cd5173c6..9cb0f110 100644 --- a/assets/report.html +++ b/assets/report.html @@ -6,7 +6,7 @@ - + [[TITLE]] diff --git a/report/index.tsx b/report/index.tsx index 7cd5b11a..1dab9434 100644 --- a/report/index.tsx +++ b/report/index.tsx @@ -5,6 +5,7 @@ import { initBlockStore } from "@report/BlockStore"; import ReportPage from "@report/ReportPage"; import { initWorker } from "@report/WorkerWrapper"; +import "@assets/Favicon"; import { plausible } from "@assets/Plausible"; document.addEventListener("DOMContentLoaded", async () => {