move theme toggle to fixed bottom-right corner

Repositions the dark/light mode button from the header to a fixed
position in the bottom-right corner (always visible). Bumps size
to 44px for WCAG touch target compliance. Also makes login text
and icon white in dark mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mark Eaton
2026-02-22 00:41:46 -05:00
co-authored by Claude Opus 4.6
parent 74334e7590
commit 1e3b62d942
2 changed files with 19 additions and 12 deletions
+11 -4
View File
@@ -128,6 +128,10 @@
margin-left: 5px;
}
[data-bs-theme="dark"] #login-div {
color: white;
}
/* Accessible focus indicators for primary navigation elements */
#hamburger:focus,
#hamburger:focus-visible,
@@ -532,20 +536,23 @@
/* dark mode toggle button */
#theme-toggle {
float: right;
position: fixed;
bottom: 20px;
right: 20px;
z-index: 9999;
background: none;
border: 2px solid var(--kbccblue);
color: var(--kbccblue);
border-radius: 50%;
width: 40px;
height: 40px;
width: 44px;
height: 44px;
font-size: 1.2em;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
margin-top: 5px;
background-color: var(--bg);
}
#theme-toggle:hover {
background-color: var(--kbccblue);
+8 -8
View File
@@ -76,14 +76,6 @@
<div id="login-text">Login</div>
<div id="login-icon"><i class="fas fa-user" aria-hidden="true"></i></div>
</a>
<button
id="theme-toggle"
@click="toggleTheme"
:aria-label="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
type="button"
>
<i :class="isDark ? 'fas fa-sun' : 'fas fa-moon'" aria-hidden="true"></i>
</button>
<img
id="library-logo"
class="image-fail"
@@ -102,6 +94,14 @@
<!-- end of col-xs-12 -->
</div>
<!--end of row-->
<button
id="theme-toggle"
@click="toggleTheme"
:aria-label="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
type="button"
>
<i :class="isDark ? 'fas fa-sun' : 'fas fa-moon'" aria-hidden="true"></i>
</button>
</div>
<!--end of Vue app1-->
</div>