Page Projets : copie URL dans le menu ⋯ + refonte thème barre Fusion/Spark (#44, #45)
CI / test (push) Failing after 0s
CI / test (push) Failing after 0s
This commit is contained in:
+10
-1
@@ -41,7 +41,16 @@
|
|||||||
function syncThemeBtn(theme) {
|
function syncThemeBtn(theme) {
|
||||||
if (!themeBtn) return;
|
if (!themeBtn) return;
|
||||||
var light = theme === 'light';
|
var light = theme === 'light';
|
||||||
themeBtn.textContent = light ? '🌙 Mode sombre' : '☀️ Mode clair';
|
/* Bouton dans la section Administration (#55) : icône et
|
||||||
|
libellé sont des <span> 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');
|
themeBtn.setAttribute('aria-pressed', light ? 'true' : 'false');
|
||||||
}
|
}
|
||||||
if (themeBtn) {
|
if (themeBtn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user