Theme Toggle Implementation
HTML Button
<button class="theme-toggle" onclick="toggleTheme()">☀️ Day</button>
CSS Styles
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: var(--bg-card);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.5rem 1rem;
border-radius: 6px;
cursor: pointer;
font-family: var(--font-display);
z-index: 1000;
}
JavaScript
function toggleTheme() {
const html = document.documentElement;
const btn = document.querySelector('.theme-toggle');
const current = html.getAttribute('data-theme') || 'night';
const next = current === 'night' ? 'day' : 'night';
html.setAttribute('data-theme', next);
localStorage.setItem('tcba-theme', next);
btn.textContent = next === 'night' ? '☀️ Day' : '🌙 Night';
}
Back Navigation
All modernized pages include a floating back-to-home button in the upper-left corner.
HTML Structure
<nav class="back-nav">
<a href="index.htm"><span class="arrow">←</span> Back</a>
</nav>
CSS Styles (in tcba-modern.css)
.back-nav {
position: fixed;
top: 1rem;
left: 1rem;
z-index: 1000;
}
.back-nav a {
display: flex;
align-items: center;
gap: 0.5rem;
background: var(--bg-card);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 0.5rem 1rem;
border-radius: 6px;
text-decoration: none;
font-family: var(--font-display);
transition: all 0.2s ease;
}
.back-nav a:hover {
border-color: var(--accent);
color: var(--accent);
}
Modernized Pages (73 total)
Navigation Pages
LeagueChamps.htm
Franchise Teams.htm
Team Pages.htm
Team_Franchise Link.htm
Team Abbreviations.htm
Stats-Lineup.htm
Player Value Link.htm
Hall of Fame Entrance.htm
Woody's Origins History.htm
Team Pages (64)
All team pages follow the same structure with team header, history brief, all-time record, stats links, and season records table.
Allegheny Innocents.htm
Annapolis.htm
Arlington.htm
Baltimore.htm
Barrow.htm
Beacon.htm
Bergen.htm
Bethesda.htm
Boston Beaneaters.htm
Bradenton.htm
Brooklyn.htm
Buffalo Mules.htm
+ 52 more team pages...