feat(phase-3): integrate theme system into Quick Play

- Import color-variables.css and themeManager.js
- Add theme toggle switcher to header navigation
- Replace all hardcoded colors with CSS variables
- Update header, buttons, setup screens, and floating start button
- Replace inline styles and JavaScript color assignments
- Quick Play now fully theme-aware and customizable
This commit is contained in:
dilgenfritz 2025-11-24 12:55:06 -06:00
parent 1ae0a37fbf
commit 30c9f12d71
1 changed files with 61 additions and 43 deletions

View File

@ -5,11 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' data: file: blob: http://localhost:* https:; connect-src 'self' http://localhost:* https: ws://localhost:*; img-src 'self' data: file: blob:; media-src 'self' data: file: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:;">
<title>Quick Play - Gooner Training Academy</title>
<link rel="stylesheet" href="src/styles/color-variables.css">
<link rel="stylesheet" href="src/styles/styles.css">
<link rel="stylesheet" href="src/styles/base-video-player.css">
<link rel="stylesheet" href="src/styles/overlay-video-player.css">
<link href="https://fonts.googleapis.com/css2?family=Audiowide&family=Michroma&family=Electrolize:wght@400&display=swap" rel="stylesheet">
<script src="https://unpkg.com/jszip@3.10.1/dist/jszip.min.js" crossorigin="anonymous"></script>
<script src="src/utils/themeManager.js"></script>
</head>
<body class="quick-play-mode">
<!-- Video toggle and mute buttons removed for streamlined interface -->
@ -54,7 +56,9 @@
</div>
</div>
<div class="nav-right quick-play-controls">
<!-- Theme Switcher -->
<div id="theme-switcher-container"></div>
<button id="back-to-home" class="btn btn-secondary" title="Return to main menu and exit Quick Play">🏠 Home</button>
<button id="open-hypno-gallery" class="btn btn-gallery" title="Open Hypno Gallery in separate window">
<span class="btn-icon">🎭</span>
@ -130,8 +134,8 @@
<div class="setting-group">
<h3>📝 Task Management</h3>
<div class="task-management-settings">
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: rgba(0, 212, 255, 0.08); border-left: 3px solid #00d4ff; border-radius: 5px;">
<strong style="color: #00d4ff; font-size: 15px;">Complete challenges that appear during your session. Enable/disable specific tasks to customize your experience. Use the tags below to filter which types of tasks will appear.</strong>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: var(--bg-primary-overlay-10); border-left: 3px solid var(--color-primary); border-radius: 5px;">
<strong style="color: var(--color-primary); font-size: 15px;">Complete challenges that appear during your session. Enable/disable specific tasks to customize your experience. Use the tags below to filter which types of tasks will appear.</strong>
</div>
<div style="display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px;">
<div class="setting-description" style="flex: 1;">
@ -343,8 +347,8 @@
<!-- Video Settings -->
<div class="setting-group">
<h3>🎬 Video Experience</h3>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: rgba(0, 212, 255, 0.08); border-left: 3px solid #00d4ff; border-radius: 5px;">
<strong style="color: #00d4ff; font-size: 15px;">Choose background videos, popup rewards, or focus mode. Videos enhance immersion and provide motivation during your training session.</strong>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: var(--bg-primary-overlay-10); border-left: 3px solid var(--color-primary); border-radius: 5px;">
<strong style="color: var(--color-primary); font-size: 15px;">Choose background videos, popup rewards, or focus mode. Videos enhance immersion and provide motivation during your training session.</strong>
</div>
<div class="video-settings">
<div class="video-option">
@ -368,8 +372,8 @@
<!-- Webcam Recording Settings -->
<div class="setting-group">
<h3>📹 Webcam Recording</h3>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: rgba(0, 212, 255, 0.08); border-left: 3px solid #00d4ff; border-radius: 5px;">
<strong style="color: #00d4ff; font-size: 15px;">Enable session recording to save verification photos and earn bonus XP for your dedication. All recordings are stored locally on your device for privacy and security.</strong>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: var(--bg-primary-overlay-10); border-left: 3px solid var(--color-primary); border-radius: 5px;">
<strong style="color: var(--color-primary); font-size: 15px;">Enable session recording to save verification photos and earn bonus XP for your dedication. All recordings are stored locally on your device for privacy and security.</strong>
</div>
<div class="webcam-settings">
<div class="webcam-option">
@ -414,8 +418,8 @@
<!-- Flash Messages Settings -->
<div class="setting-group">
<h3>💬 Flash Messages</h3>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: rgba(0, 212, 255, 0.08); border-left: 3px solid #00d4ff; border-radius: 5px;">
<strong style="color: #00d4ff; font-size: 15px;">Flash messages appear periodically with encouragement, instructions, and motivation during your session. Customize timing, content, and appearance to match your preferences.</strong>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: var(--bg-primary-overlay-10); border-left: 3px solid var(--color-primary); border-radius: 5px;">
<strong style="color: var(--color-primary); font-size: 15px;">Flash messages appear periodically with encouragement, instructions, and motivation during your session. Customize timing, content, and appearance to match your preferences.</strong>
</div>
<div class="message-settings">
<div style="display: flex; align-items: center; justify-content: space-between; gap: 15px;">
@ -436,8 +440,8 @@
<!-- Popup Images Settings -->
<div class="setting-group">
<h3>🖼️ Popup Images</h3>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: rgba(0, 212, 255, 0.08); border-left: 3px solid #00d4ff; border-radius: 5px;">
<strong style="color: #00d4ff; font-size: 15px;">Images from your library appear as rewards and distractions. Configure timing and positioning for your preference to create the perfect level of visual stimulation.</strong>
<div class="setting-description" style="margin-bottom: 15px; padding: 12px; background: var(--bg-primary-overlay-10); border-left: 3px solid var(--color-primary); border-radius: 5px;">
<strong style="color: var(--color-primary); font-size: 15px;">Images from your library appear as rewards and distractions. Configure timing and positioning for your preference to create the perfect level of visual stimulation.</strong>
</div>
<div class="popup-settings">
<div style="display: flex; align-items: center; justify-content: space-between; gap: 15px;">
@ -1328,6 +1332,16 @@
document.addEventListener('DOMContentLoaded', async function() {
console.log('⚡ Initializing Quick Play...');
// Initialize theme switcher UI
if (window.themeManager) {
const themeSwitcher = window.themeManager.createThemeToggle();
const container = document.getElementById('theme-switcher-container');
if (container) {
container.appendChild(themeSwitcher);
console.log('✅ Theme switcher initialized');
}
}
try {
// Check MP4 support first
checkMP4Support();
@ -2319,7 +2333,7 @@
console.log('🎬 Set webcam overlay type to CONSEQUENCE');
} else if (taskTitleText.toLowerCase().includes('task')) {
overlayTaskType.textContent = 'TASK';
overlayTaskType.style.color = '#00d4ff';
overlayTaskType.style.color = 'var(--color-primary)';
console.log('🎬 Set webcam overlay type to TASK');
} else if (taskTitleText) {
overlayTaskType.textContent = 'SESSION';
@ -2380,7 +2394,7 @@
webcamTaskType.style.color = '#ff4757';
} else if (title.toLowerCase().includes('task')) {
webcamTaskType.textContent = 'TASK';
webcamTaskType.style.color = '#00d4ff';
webcamTaskType.style.color = 'var(--color-primary)';
} else if (title) {
webcamTaskType.textContent = 'SESSION';
webcamTaskType.style.color = '#ffd700';
@ -4258,7 +4272,7 @@
} else if (taskTimeRemaining <= 30) {
timerElement.style.color = '#ffaa00'; // Orange when almost done
} else {
timerElement.style.color = '#00d4ff'; // Blue normally
timerElement.style.color = 'var(--color-primary)'; // Themed color normally
}
// Update recording overlay when timer changes
@ -7845,8 +7859,8 @@
.quick-play-header {
background: rgba(0, 0, 0, 0.9);
border-bottom: 1px solid #00d4ff;
background: var(--header-bg);
border-bottom: 1px solid var(--header-border);
padding: 8px 0;
position: fixed;
top: 0;
@ -7882,11 +7896,11 @@
}
.quick-play-nav h1 {
color: #00d4ff;
color: var(--header-title-color);
font-family: 'Audiowide', sans-serif;
font-size: 20px;
margin: 0;
text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
text-shadow: var(--shadow-glow-primary);
}
.quick-play-controls {
@ -7905,21 +7919,25 @@
}
.btn-secondary {
background: rgba(100, 100, 100, 0.8);
color: white;
background: var(--btn-secondary-bg);
color: var(--btn-secondary-text);
border: 1px solid var(--btn-secondary-border);
}
.btn-secondary:hover {
background: rgba(120, 120, 120, 0.9);
background: var(--btn-secondary-hover-bg);
border-color: var(--btn-secondary-hover-border);
}
.btn-danger {
background: rgba(220, 53, 69, 0.8);
color: white;
background: var(--btn-danger-bg);
color: var(--btn-danger-text);
border: 1px solid var(--btn-danger-border);
}
.btn-danger:hover {
background: rgba(220, 53, 69, 0.9);
background: var(--btn-danger-hover-bg);
border-color: var(--btn-danger-hover-border);
}
.game-status-bar {
@ -7944,7 +7962,7 @@
}
.status-value {
color: #00d4ff;
color: var(--color-primary);
font-weight: bold;
font-size: 16px;
}
@ -7959,8 +7977,8 @@
}
.setup-container {
background: rgba(0, 0, 0, 0.8);
border: 2px solid #00d4ff;
background: var(--bg-overlay-medium);
border: 2px solid var(--color-primary);
border-radius: 15px;
padding: 30px;
margin: 20px 0;
@ -7972,11 +7990,11 @@
}
.setup-header h2 {
color: #00d4ff;
color: var(--color-primary);
font-family: 'Audiowide', sans-serif;
font-size: 28px;
margin: 0 0 10px 0;
text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
text-shadow: var(--shadow-glow-primary);
}
.setup-header p {
@ -7991,15 +8009,15 @@
}
.instruction-box {
background: rgba(0, 212, 255, 0.08);
border: 1px solid rgba(0, 212, 255, 0.25);
background: var(--bg-primary-overlay-10);
border: 1px solid var(--border-primary);
border-radius: 12px;
padding: 20px;
text-align: left;
}
.instruction-box h4 {
color: #00d4ff;
color: var(--color-primary);
font-family: 'Electrolize', sans-serif;
font-size: 16px;
margin: 0 0 15px 0;
@ -8019,7 +8037,7 @@
padding: 12px;
background: rgba(0, 0, 0, 0.3);
border-radius: 8px;
border: 1px solid rgba(0, 212, 255, 0.15);
border: 1px solid var(--border-primary);
}
.instruction-icon {
@ -8035,7 +8053,7 @@
}
.instruction-text strong {
color: #00d4ff;
color: var(--color-primary);
font-weight: bold;
}
@ -8060,7 +8078,7 @@
right: 30px;
z-index: 1000;
padding: 18px 35px;
background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
border: none;
border-radius: 50px;
color: #fff;
@ -8068,7 +8086,7 @@
font-size: 18px;
font-weight: bold;
cursor: pointer;
box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
box-shadow: var(--shadow-glow-primary);
transition: all 0.3s ease;
display: flex;
align-items: center;
@ -8078,8 +8096,8 @@
.floating-start-button:hover {
transform: translateY(-3px);
box-shadow: 0 12px 35px rgba(0, 212, 255, 0.6);
background: linear-gradient(135deg, #00e5ff 0%, #0099dd 100%);
box-shadow: 0 12px 35px var(--bg-primary-overlay-20);
background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}
.floating-start-button:active {
@ -8098,10 +8116,10 @@
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
box-shadow: var(--shadow-glow-primary);
}
50% {
box-shadow: 0 8px 35px rgba(0, 212, 255, 0.7);
box-shadow: 0 8px 35px var(--bg-primary-overlay-20);
}
}
@ -8129,11 +8147,11 @@
.collapsible-header {
width: 100%;
background: rgba(0, 212, 255, 0.1);
border: 1px solid rgba(0, 212, 255, 0.3);
background: var(--bg-primary-overlay-10);
border: 1px solid var(--border-primary);
border-radius: 8px;
padding: 12px 15px;
color: #00d4ff;
color: var(--color-primary);
font-family: 'Electrolize', sans-serif;
font-size: 14px;
text-align: left;