You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by sh...@apache.org on 2025/12/28 19:59:33 UTC

(airflow-site) branch fix-dark-mode-button created (now 53df7cc70d)

This is an automated email from the ASF dual-hosted git repository.

shahar pushed a change to branch fix-dark-mode-button
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


      at 53df7cc70d Fix active mode in dark mode menu

This branch includes the following new commits:

     new 53df7cc70d Fix active mode in dark mode menu

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(airflow-site) 01/01: Fix active mode in dark mode menu

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shahar pushed a commit to branch fix-dark-mode-button
in repository https://gitbox.apache.org/repos/asf/airflow-site.git

commit 53df7cc70d4cd442cf1f8ab5c3b70feb1e1382e8
Author: Shahar Epstein <60...@users.noreply.github.com>
AuthorDate: Sun Dec 28 21:59:22 2025 +0200

    Fix active mode in dark mode menu
---
 sphinx_airflow_theme/sphinx_airflow_theme/layout.html | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
index cad3911e2a..1f6f30e5ff 100644
--- a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
+++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
@@ -359,7 +359,7 @@
         return storedTheme
       }
 
-      return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
+      return 'auto'
     }
 
     const setTheme = theme => {
@@ -387,10 +387,18 @@
       document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
         element.classList.remove('active')
         element.setAttribute('aria-pressed', 'false')
+        const checkIcon = element.querySelector('.bi.ms-auto')
+        if (checkIcon) {
+            checkIcon.classList.add('d-none')
+        }
       })
 
       btnToActive.classList.add('active')
       btnToActive.setAttribute('aria-pressed', 'true')
+      const activeCheckIcon = btnToActive.querySelector('.bi.ms-auto')
+      if (activeCheckIcon) {
+          activeCheckIcon.classList.remove('d-none')
+      }
       activeThemeIcon.setAttribute('href', svgOfActiveBtn)
       const themeSwitcherLabel = `${themeSwitcherText ? themeSwitcherText.textContent : ''} (${btnToActive.dataset.bsThemeValue})`
       themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)