From 3d4ee4995b29a332483e6046e8b9785601ec77fb Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sat, 22 Nov 2025 13:36:29 +0000 Subject: [PATCH 1/2] feat: enable white logo for dark theme --- docusaurus.config.js | 1 + static/img/logo-white.svg | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 static/img/logo-white.svg diff --git a/docusaurus.config.js b/docusaurus.config.js index b46d3d6e..baa0caeb 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -35,6 +35,7 @@ module.exports = { logo: { alt: 'Wokwi Logo', src: 'img/logo.svg', + srcDark: 'img/logo-white.svg', href: 'https://wokwi.com', }, items: [ diff --git a/static/img/logo-white.svg b/static/img/logo-white.svg new file mode 100644 index 00000000..19d5db13 --- /dev/null +++ b/static/img/logo-white.svg @@ -0,0 +1,43 @@ + + + + + + + From ff76843a23094626d77fd63b0702fb79802c2dda Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sat, 22 Nov 2025 14:46:50 +0000 Subject: [PATCH 2/2] feat: enable themed favicon The colour of the logo in the favicon is determined by a stylesheet in the SVG itself - it uses `prefers-color-scheme` in order to colour the logo. It does not follow the theme of the website but follows the browser/OS choice. The SVG in this commit had to be manually edited, since Inkscape didn't want to play nice with the CSS. If this file gets edited in the future, be careful to not accidentally break this functionality. Using an SVG here was preferred over using the existing `favicon-white.png` and `favicon.ico` because Docusaurus did not provide a handy feature to toggle between the light/dark mode favicons, in the same way that it did for the logo in the navbar (with `navbar.logo.src` and `navbar.logo.srcDark`). --- docusaurus.config.js | 2 +- static/img/favicon-auto.svg | 50 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 static/img/favicon-auto.svg diff --git a/docusaurus.config.js b/docusaurus.config.js index baa0caeb..e8b3e52d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -15,7 +15,7 @@ module.exports = { baseUrl: '/', trailingSlash: false, onBrokenLinks: 'throw', - favicon: 'img/favicon.ico', + favicon: 'img/favicon-auto.svg', organizationName: 'wokwi', projectName: 'wokwi-docs', scripts: [ diff --git a/static/img/favicon-auto.svg b/static/img/favicon-auto.svg new file mode 100644 index 00000000..c5d5a53d --- /dev/null +++ b/static/img/favicon-auto.svg @@ -0,0 +1,50 @@ + + + + + + +