From c012867e131041adb2ced3b259c4e33e7574eed2 Mon Sep 17 00:00:00 2001 From: rxxbyy Date: Mon, 23 Feb 2026 15:49:57 -0800 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=93=9D=20Use=20`picture`=20tag=20with?= =?UTF-8?q?=20media=20queries=20to=20specify=20the=20Typer=20logo=20in=20l?= =?UTF-8?q?ight/dark=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16d149f8fe..cf9b618bbe 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,12 @@ There's a + + + + + + If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. From e37955933e333c9a975769069c51d115e5e680de Mon Sep 17 00:00:00 2001 From: rxxbyy Date: Tue, 24 Feb 2026 09:37:24 -0800 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=93=9D=20Fix=20Typer=20logo=20light/d?= =?UTF-8?q?ark=20theme=20for=20GitHub=20and=20MkDocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +------ docs/en/docs/index.md | 12 +++++++++++- docs/en/docs/js/custom.js | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cf9b618bbe..16d149f8fe 100644 --- a/README.md +++ b/README.md @@ -128,12 +128,7 @@ There's a - - - - - + If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md index 7f9d5efbf2..86a5acdd9e 100644 --- a/docs/en/docs/index.md +++ b/docs/en/docs/index.md @@ -125,7 +125,17 @@ There's a +
+ + + + Typer + + +
If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index be326d3029..c71e49d29f 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -174,10 +174,25 @@ function handleSponsorImages() { }); } +function setupThemeImages() { + new MutationObserver(() => { + const scheme = document.body.getAttribute("data-md-color-scheme"); + const isDark = scheme === "slate"; + document.querySelectorAll("picture[data-light-src][data-dark-src]").forEach((picture) => { + const src = isDark ? picture.dataset.darkSrc : picture.dataset.lightSrc; + const source = picture.querySelector("source"); + const img = picture.querySelector("img"); + if (source) source.srcset = src; + if (img) img.src = src; + }); + }).observe(document.body, { attributes: true, attributeFilter: ["data-md-color-scheme"] }); +} + async function main() { setupTermynal(); showRandomAnnouncement('announce-left', 5000) handleSponsorImages(); + setupThemeImages(); } document$.subscribe(() => { main() From ae07e010d194d1f2496cadbf1bd76a092b316b4e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 21:24:51 +0000 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16d149f8fe..1b5e48cbec 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,17 @@ There's a +
+ + + + Typer + + +
If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. From 022e666c3fccc4e489c880e6d44198c9a4895c1c Mon Sep 17 00:00:00 2001 From: rxxbyy Date: Wed, 25 Feb 2026 15:03:20 -0800 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=93=9D=20Fix=20Typer=20logo=20light/d?= =?UTF-8?q?ark=20theme=20for=20GitHub=20and=20MkDocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/js/custom.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index c71e49d29f..1be26ddfdd 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -175,17 +175,28 @@ function handleSponsorImages() { } function setupThemeImages() { - new MutationObserver(() => { + const updateImages = () => { const scheme = document.body.getAttribute("data-md-color-scheme"); const isDark = scheme === "slate"; document.querySelectorAll("picture[data-light-src][data-dark-src]").forEach((picture) => { - const src = isDark ? picture.dataset.darkSrc : picture.dataset.lightSrc; + const src = (isDark ? picture.dataset.darkSrc : picture.dataset.lightSrc); const source = picture.querySelector("source"); const img = picture.querySelector("img"); - if (source) source.srcset = src; - if (img) img.src = src; + if (source) { + source.srcset = src; + } + if (img) { + img.src = src; + } }); - }).observe(document.body, { attributes: true, attributeFilter: ["data-md-color-scheme"] }); + } + + new MutationObserver(updateImages).observe(document.body, { + attributes: true, + attributeFilter: ["data-md-color-scheme"], + }); + + updateImages(); } async function main() { From 0a173e969911e47a48750739a8498057a11b6d24 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 17 Mar 2026 09:37:46 +0100 Subject: [PATCH 5/7] Apply version without custom JS --- README.md | 18 +++++++----------- docs/en/docs/css/custom.css | 2 ++ docs/en/docs/index.md | 23 ++++++++++++----------- docs/en/docs/js/custom.js | 26 -------------------------- 4 files changed, 21 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 1b5e48cbec..2369d9c6aa 100644 --- a/README.md +++ b/README.md @@ -128,17 +128,13 @@ There's a - - - Typer - - - + + + + + + + If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index dc9c7d63b4..4b8c2b64e9 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -212,3 +212,5 @@ Inspired by Termynal's CSS tricks with modifications border-bottom: .05rem dotted var(--md-default-fg-color--light); cursor: help; } + +.md-content .only-not-mkdocs { display: none; } diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md index 86a5acdd9e..f9b8c972f3 100644 --- a/docs/en/docs/index.md +++ b/docs/en/docs/index.md @@ -125,17 +125,18 @@ There's a - - - Typer - - - + + + + + + + + + + + + If you are building a CLI app to be used in the terminal instead of a web API, check out **Typer**. diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index 1be26ddfdd..be326d3029 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -174,36 +174,10 @@ function handleSponsorImages() { }); } -function setupThemeImages() { - const updateImages = () => { - const scheme = document.body.getAttribute("data-md-color-scheme"); - const isDark = scheme === "slate"; - document.querySelectorAll("picture[data-light-src][data-dark-src]").forEach((picture) => { - const src = (isDark ? picture.dataset.darkSrc : picture.dataset.lightSrc); - const source = picture.querySelector("source"); - const img = picture.querySelector("img"); - if (source) { - source.srcset = src; - } - if (img) { - img.src = src; - } - }); - } - - new MutationObserver(updateImages).observe(document.body, { - attributes: true, - attributeFilter: ["data-md-color-scheme"], - }); - - updateImages(); -} - async function main() { setupTermynal(); showRandomAnnouncement('announce-left', 5000) handleSponsorImages(); - setupThemeImages(); } document$.subscribe(() => { main() From 918ae8277a05ea380282411d4060938b34d333d0 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Thu, 30 Apr 2026 21:51:01 +0200 Subject: [PATCH 6/7] Use existing `only-github` class --- docs/en/docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md index 517c5d7f3e..fce726167a 100644 --- a/docs/en/docs/index.md +++ b/docs/en/docs/index.md @@ -160,7 +160,7 @@ There's a [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE ## **Typer**, the FastAPI of CLIs { #typer-the-fastapi-of-clis } - + From 31ec08b762c9f008ef34b6e03175d37b32f60dd1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 19:52:01 +0000 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13946a7ee1..75d928aa18 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ There's a [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE ## **Typer**, the FastAPI of CLIs - +