Style Ko-fi widgets to match light/dark theme

Floating button now initializes with theme-aware colors and updates
on toggle. Status page iframe uses a tuned CSS filter in dark mode
to blend with the warm palette.
This commit is contained in:
tdurieux
2026-05-06 21:38:52 +03:00
parent dfa5a2e2fd
commit 48256e743c
5 changed files with 24 additions and 8 deletions
+13 -6
View File
@@ -81,12 +81,19 @@
</script>
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
<script>
kofiWidgetOverlay.draw("tdurieux", {
type: "floating-chat",
"floating-chat.donateButton.text": "Support me",
"floating-chat.donateButton.background-color": "#323842",
"floating-chat.donateButton.text-color": "#fff",
});
(function () {
var isDark = localStorage.getItem("darkMode") === "true";
kofiWidgetOverlay.draw("tdurieux", {
type: "floating-chat",
"floating-chat.donateButton.text": "Support me",
"floating-chat.donateButton.background-color": isDark
? "#FAF9F6"
: "#1A1815",
"floating-chat.donateButton.text-color": isDark
? "#1A1815"
: "#FAF9F6",
});
})();
</script>
</body>
</html>