fix(utility): remove mode indicator (button label is enough)
Per user: the mode indicator text 'light/dark/auto' next to the
toggle button is redundant — the button itself shows the current
mode in its label ('◐ auto' / '☀ light' / '☾ dark').
Removed:
- <span id='fx-mode-indicator'> from UtilityBar.astro
- getElementById('fx-mode-indicator') in applyTheme() JS
- (CSS for .fx-mode-indicator stays — minimal cost, no harm)
Build: 22 pages, 2.27s.
This commit is contained in:
@@ -24,7 +24,6 @@ const email = site?.data?.email ?? 'contact@moreminimore.com';
|
||||
<span class="fx-utility-item" id="fx-date">📅 — — —</span>
|
||||
</div>
|
||||
<div class="fx-utility-bar-right">
|
||||
<span class="fx-mode-indicator" id="fx-mode-indicator">light</span>
|
||||
<button
|
||||
type="button"
|
||||
class="fx-theme-toggle"
|
||||
@@ -70,9 +69,8 @@ const email = site?.data?.email ?? 'contact@moreminimore.com';
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
const indicator = document.getElementById('fx-mode-indicator');
|
||||
// Update button label to reflect current mode (button is the sole indicator)
|
||||
const btn = document.getElementById('fx-theme-toggle');
|
||||
if (indicator) indicator.textContent = mode; // shows user's chosen mode (not effective)
|
||||
if (btn) {
|
||||
btn.textContent = mode === 'auto' ? '◐ auto' : mode === 'light' ? '☀ light' : '☾ dark';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user