From 32fbe1d1370d5be561c7d290e4a2da11e69e008e Mon Sep 17 00:00:00 2001 From: bruno Date: Wed, 28 Oct 2026 23:12:44 -0400 Subject: [PATCH] =?UTF-8?q?Page=20Projets=20:=20copie=20URL=20dans=20le=20?= =?UTF-8?q?menu=20=E2=8B=AF=20+=20refonte=20th=C3=A8me=20barre=20Fusion/Sp?= =?UTF-8?q?ark=20(#44,=20#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/nav.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/js/nav.js b/static/js/nav.js index 59bc0d7..df4b013 100644 --- a/static/js/nav.js +++ b/static/js/nav.js @@ -41,7 +41,16 @@ function syncThemeBtn(theme) { if (!themeBtn) return; var light = theme === 'light'; - themeBtn.textContent = light ? '🌙 Mode sombre' : '☀️ Mode clair'; + /* Bouton dans la section Administration (#55) : icône et + libellé sont des séparés ; l'ancien bouton de + l'en-tête, lui, n'avait qu'un texte. */ + var ico = themeBtn.querySelector('[data-theme-ico]'); + var lbl = themeBtn.querySelector('[data-theme-label]'); + if (ico) ico.textContent = light ? '🌙' : '☀️'; + if (lbl) lbl.textContent = light ? 'Mode sombre' : 'Mode clair'; + if (!ico && !lbl) { + themeBtn.textContent = light ? '🌙 Mode sombre' : '☀️ Mode clair'; + } themeBtn.setAttribute('aria-pressed', light ? 'true' : 'false'); } if (themeBtn) {