major update
This commit is contained in:
1 parent
266a064330
commit
5ac5626406
8 files changed
+268
-41
No files matched your search
@@ -39,6 +39,33 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2025-07-07T12:14:21.058Z"
|
"timestamp": "2025-07-07T12:14:21.058Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"score": 5,
|
||||||
|
"completed": true,
|
||||||
|
"answers": [
|
||||||
|
{
|
||||||
|
"word": "computer",
|
||||||
|
"correct": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"word": "keyboard",
|
||||||
|
"correct": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"word": "mouse",
|
||||||
|
"correct": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"word": "screen",
|
||||||
|
"correct": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"word": "printer",
|
||||||
|
"correct": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": "2025-07-15T14:36:13.273Z"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+71
-37
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<title>✨ Modern Spelling Practice</title>
|
<title>✨ Modern Spelling Practice</title>
|
||||||
<link href="styles.css" rel="stylesheet"/>
|
<link href="styles.css" rel="stylesheet"/>
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<p id="loginMessage" style="margin-top: 1rem; text-align: center;"></p>
|
<p id="loginMessage" style="margin-top: 1rem; text-align: center;"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Navigation -->
|
<!-- Navigation -->
|
||||||
<div id="nav" class="hidden">
|
<div id="nav" class="hidden">
|
||||||
<p><strong id="userInfo"></strong></p>
|
<p><strong id="userInfo"></strong></p>
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
<button id="logoutBtn" onclick="logoutUser()" class="btn-secondary">Sign Out</button>
|
<button id="logoutBtn" onclick="logoutUser()" class="btn-secondary">Sign Out</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Admin Panel -->
|
<!-- Admin Panel -->
|
||||||
<div class="hidden" id="adminPanel">
|
<div class="hidden" id="adminPanel">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -56,12 +58,13 @@
|
|||||||
<button class="active" onclick="switchTab('tabUsers')">👤 Users</button>
|
<button class="active" onclick="switchTab('tabUsers')">👤 Users</button>
|
||||||
<button onclick="switchTab('tabWords')">📝 Word Lists</button>
|
<button onclick="switchTab('tabWords')">📝 Word Lists</button>
|
||||||
<button onclick="switchTab('tabAnalytics')">📊 Analytics</button>
|
<button onclick="switchTab('tabAnalytics')">📊 Analytics</button>
|
||||||
<button onclick="switchTab('tabResults')">� Results</button>
|
<button onclick="switchTab('tabResults')">📋 Results</button>
|
||||||
<button onclick="switchTab('tabReports')">📘 Reports</button>
|
<button onclick="switchTab('tabReports')">📘 Reports</button>
|
||||||
<button onclick="switchTab('tabSessions')">� Sessions</button>
|
<button onclick="switchTab('tabSessions')">📅 Sessions</button>
|
||||||
<button onclick="switchTab('tabBadges')">� Badges</button>
|
<button onclick="switchTab('tabBadges')">🏅 Badges</button>
|
||||||
<button onclick="switchTab('tabTheme')">🎨 Themes</button>
|
<button onclick="switchTab('tabTheme')">🎨 Themes</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Users Tab -->
|
<!-- Users Tab -->
|
||||||
<div id="tabUsers" class="adminTab">
|
<div id="tabUsers" class="adminTab">
|
||||||
<h3>👤 User Management</h3>
|
<h3>👤 User Management</h3>
|
||||||
@@ -78,6 +81,7 @@
|
|||||||
<button type="submit" class="btn-success">➕ Add User</button>
|
<button type="submit" class="btn-success">➕ Add User</button>
|
||||||
</form>
|
</form>
|
||||||
<p id="userAddMessage" style="margin-top: 1rem;"></p>
|
<p id="userAddMessage" style="margin-top: 1rem;"></p>
|
||||||
|
<small id="hashPreview" style="color: var(--text-secondary);"></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h4>Remove User</h4>
|
<h4>Remove User</h4>
|
||||||
@@ -87,14 +91,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Word Lists Tab -->
|
<!-- Word Lists Tab -->
|
||||||
<div class="adminTab hidden" id="tabWords">
|
<div class="adminTab hidden" id="tabWords">
|
||||||
<h3>📝 Word List Management</h3>
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;">
|
||||||
<div style="display: grid; gap: 2rem;">
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h4>Select Student</h4>
|
<h4>Select User</h4>
|
||||||
<select class="word-user-dropdown" id="wordUserSelect" onchange="loadWordsForSelectedUser()" style="width: 100%;">
|
<select class="word-user-dropdown" id="wordUserSelect" onchange="loadWordsForSelectedUser()" style="width: 100%;">
|
||||||
<option value="">-- Select a student --</option>
|
<option value="">-- Select a user --</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -126,6 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Results Tab -->
|
<!-- Results Tab -->
|
||||||
<div class="adminTab hidden" id="tabResults">
|
<div class="adminTab hidden" id="tabResults">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -166,7 +171,7 @@
|
|||||||
<!-- Badges Tab -->
|
<!-- Badges Tab -->
|
||||||
<div class="adminTab hidden" id="tabBadges">
|
<div class="adminTab hidden" id="tabBadges">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3>� Student Badges</h3>
|
<h3>🏅 Student Badges</h3>
|
||||||
<div style="display: grid; grid-template-columns: 1fr 2fr; gap: 2rem;">
|
<div style="display: grid; grid-template-columns: 1fr 2fr; gap: 2rem;">
|
||||||
<div>
|
<div>
|
||||||
<h4>Select Student</h4>
|
<h4>Select Student</h4>
|
||||||
@@ -194,6 +199,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Reports Tab -->
|
<!-- Reports Tab -->
|
||||||
<div class="adminTab hidden" id="tabReports">
|
<div class="adminTab hidden" id="tabReports">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -233,7 +239,7 @@
|
|||||||
<!-- Sessions Tab -->
|
<!-- Sessions Tab -->
|
||||||
<div class="adminTab hidden" id="tabSessions">
|
<div class="adminTab hidden" id="tabSessions">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3>� Session History</h3>
|
<h3>📅 Session History</h3>
|
||||||
<div style="margin-bottom: 2rem;">
|
<div style="margin-bottom: 2rem;">
|
||||||
<label for="sessionUserSelect">Select Student:</label>
|
<label for="sessionUserSelect">Select Student:</label>
|
||||||
<select id="sessionUserSelect" onchange="loadUserSessions(this.value)" style="width: 100%; max-width: 300px;">
|
<select id="sessionUserSelect" onchange="loadUserSessions(this.value)" style="width: 100%; max-width: 300px;">
|
||||||
@@ -244,6 +250,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Student Panel -->
|
<!-- Student Panel -->
|
||||||
<div class="hidden" id="studentPanel">
|
<div class="hidden" id="studentPanel">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -252,6 +259,18 @@
|
|||||||
<p style="color: var(--text-secondary);">Choose an activity to start practicing</p>
|
<p style="color: var(--text-secondary);">Choose an activity to start practicing</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Theme Selection for Students -->
|
||||||
|
<div class="card" style="margin-bottom: 1.5rem;">
|
||||||
|
<h4>🎨 Choose Your Theme</h4>
|
||||||
|
<select id="studentThemeSelect" onchange="changeTheme(this.value)" style="width: 100%; max-width: 300px;">
|
||||||
|
<option value="default">✨ Modern (Default)</option>
|
||||||
|
<option value="playground">🎪 Playground</option>
|
||||||
|
<option value="chalkboard">🎓 Chalkboard</option>
|
||||||
|
<option value="galaxy">🌌 Galaxy</option>
|
||||||
|
<option value="nature">🌿 Nature</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="student-controls">
|
<div class="student-controls">
|
||||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 600px; margin: 0 auto;">
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 600px; margin: 0 auto;">
|
||||||
<button id="startGameBtn" onclick="startGame()" class="btn-success">
|
<button id="startGameBtn" onclick="startGame()" class="btn-success">
|
||||||
@@ -262,43 +281,58 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Game Section -->
|
</div>
|
||||||
<div class="hidden" id="gameSection">
|
|
||||||
|
<!-- Game Section -->
|
||||||
|
<div class="hidden" id="gameSection">
|
||||||
|
<div class="card">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
|
||||||
<h3>🎮 Spelling Challenge</h3>
|
<h3>🎮 Spelling Challenge</h3>
|
||||||
<div class="word-box" id="wordBox"></div>
|
<button onclick="backToStudentDashboard()" class="btn-secondary" style="padding: 0.5rem 1rem;">
|
||||||
<div class="hidden" id="inputSection" style="text-align: center;">
|
← Back to Dashboard
|
||||||
<input id="userInput" placeholder="Type the word you saw..." type="text" style="max-width: 400px;"/>
|
</button>
|
||||||
<button onclick="submitAnswer()" class="btn-primary">Submit Answer</button>
|
|
||||||
</div>
|
|
||||||
<!-- Game Summary -->
|
|
||||||
<div class="hidden" id="summary" class="card"></div>
|
|
||||||
<!-- Badge Display -->
|
|
||||||
<div class="hidden" id="badgeDisplay" class="card">
|
|
||||||
<h3>🏅 Congratulations!</h3>
|
|
||||||
<p>You've earned new badges:</p>
|
|
||||||
<ul id="badgeList"></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="word-box" id="wordBox"></div>
|
||||||
<!-- Typing Practice Section -->
|
<div class="hidden" id="inputSection" style="text-align: center;">
|
||||||
<div class="hidden" id="typingSection">
|
<input id="userInput" placeholder="Type the word you saw..." type="text" style="max-width: 400px;"/>
|
||||||
|
<button onclick="submitAnswer()" class="btn-primary">Submit Answer</button>
|
||||||
|
</div>
|
||||||
|
<!-- Game Summary -->
|
||||||
|
<div class="hidden" id="summary" class="card"></div>
|
||||||
|
<!-- Badge Display -->
|
||||||
|
<div class="hidden" id="badgeDisplay" class="card">
|
||||||
|
<h3>🏅 Congratulations!</h3>
|
||||||
|
<p>You've earned new badges:</p>
|
||||||
|
<ul id="badgeList"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Typing Practice Section -->
|
||||||
|
<div class="hidden" id="typingSection">
|
||||||
|
<div class="card">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
|
||||||
<h3>⌨️ Typing Practice</h3>
|
<h3>⌨️ Typing Practice</h3>
|
||||||
<div id="typingPrompt">Get ready to type...</div>
|
<button onclick="backToStudentDashboard()" class="btn-secondary" style="padding: 0.5rem 1rem;">
|
||||||
<div style="text-align: center; margin: 2rem 0;">
|
← Back to Dashboard
|
||||||
<input id="typingInput" type="text" style="max-width: 500px;"/>
|
</button>
|
||||||
<button onclick="submitTyping()" class="btn-primary">Submit</button>
|
|
||||||
</div>
|
|
||||||
<p id="typingFeedback" style="text-align: center; font-weight: 600;"></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="typingPrompt">Get ready to type...</div>
|
||||||
|
<div style="text-align: center; margin: 2rem 0;">
|
||||||
|
<input id="typingInput" type="text" style="max-width: 500px;"/>
|
||||||
|
<button onclick="submitTyping()" class="btn-primary">Submit</button>
|
||||||
|
</div>
|
||||||
|
<p id="typingFeedback" style="text-align: center; font-weight: 600;"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Toast notification -->
|
<!-- Toast notification -->
|
||||||
<div id="toast" class="toast"></div>
|
<div id="toast" class="toast"></div>
|
||||||
</div> <script>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
// Initialize the application when DOM is loaded
|
// Initialize the application when DOM is loaded
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
const user = JSON.parse(localStorage.getItem('loggedInUser'));
|
const user = JSON.parse(localStorage.getItem('loggedInUser'));
|
||||||
if (user) {
|
if (user) {
|
||||||
|
|||||||
@@ -83,8 +83,13 @@ window.startGame = async function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Hide student dashboard and typing practice
|
||||||
|
document.getElementById('studentPanel').style.display = 'none';
|
||||||
|
document.getElementById('typingSection').style.display = 'none';
|
||||||
|
|
||||||
// Show game section
|
// Show game section
|
||||||
document.getElementById('gameSection').classList.remove('hidden');
|
document.getElementById('gameSection').classList.remove('hidden');
|
||||||
|
document.getElementById('gameSection').style.display = 'block';
|
||||||
document.getElementById('wordBox').textContent = 'Loading...';
|
document.getElementById('wordBox').textContent = 'Loading...';
|
||||||
document.getElementById('summary')?.classList.add('hidden');
|
document.getElementById('summary')?.classList.add('hidden');
|
||||||
document.getElementById('badgeDisplay')?.classList.add('hidden');
|
document.getElementById('badgeDisplay')?.classList.add('hidden');
|
||||||
|
|||||||
+51
-1
@@ -51,4 +51,54 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log('✅ Application initialized');
|
console.log('✅ Application initialized');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Function to return to student dashboard
|
||||||
|
window.backToStudentDashboard = function() {
|
||||||
|
console.log('🔙 Returning to student dashboard');
|
||||||
|
|
||||||
|
// Hide all sections
|
||||||
|
document.getElementById('gameSection').classList.add('hidden');
|
||||||
|
document.getElementById('gameSection').style.display = 'none';
|
||||||
|
document.getElementById('typingSection').classList.add('hidden');
|
||||||
|
document.getElementById('typingSection').style.display = 'none';
|
||||||
|
|
||||||
|
// Show student panel
|
||||||
|
document.getElementById('studentPanel').classList.remove('hidden');
|
||||||
|
document.getElementById('studentPanel').style.display = 'block';
|
||||||
|
|
||||||
|
// Reset any game/typing state
|
||||||
|
document.getElementById('userInput').value = '';
|
||||||
|
document.getElementById('typingInput').value = '';
|
||||||
|
document.getElementById('wordBox').textContent = '';
|
||||||
|
document.getElementById('typingPrompt').textContent = 'Get ready to type...';
|
||||||
|
document.getElementById('typingFeedback').textContent = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to change theme (accessible to students)
|
||||||
|
window.changeTheme = function(themeName) {
|
||||||
|
console.log('🎨 Changing theme to:', themeName);
|
||||||
|
|
||||||
|
// Apply the theme
|
||||||
|
applyTheme(themeName);
|
||||||
|
|
||||||
|
// Save the preference in both possible keys
|
||||||
|
localStorage.setItem('selectedTheme', themeName);
|
||||||
|
localStorage.setItem('theme', themeName);
|
||||||
|
|
||||||
|
// Update both theme selects if they exist
|
||||||
|
const adminThemeSelect = document.getElementById('themeSelect');
|
||||||
|
const studentThemeSelect = document.getElementById('studentThemeSelect');
|
||||||
|
|
||||||
|
if (adminThemeSelect) {
|
||||||
|
adminThemeSelect.value = themeName;
|
||||||
|
}
|
||||||
|
if (studentThemeSelect) {
|
||||||
|
studentThemeSelect.value = themeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show toast notification
|
||||||
|
if (typeof showToast === 'function') {
|
||||||
|
showToast(`🎨 Theme changed to ${themeName}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-1
@@ -1,10 +1,14 @@
|
|||||||
// Modern theme system
|
// Modern theme system
|
||||||
function applySavedTheme() {
|
function applySavedTheme() {
|
||||||
const savedTheme = localStorage.getItem('theme') || 'default';
|
const savedTheme = localStorage.getItem('theme') || localStorage.getItem('selectedTheme') || 'default';
|
||||||
applyTheme(savedTheme);
|
applyTheme(savedTheme);
|
||||||
|
|
||||||
|
// Update both theme selectors
|
||||||
const themeSelector = document.getElementById('themeSelect');
|
const themeSelector = document.getElementById('themeSelect');
|
||||||
|
const studentThemeSelector = document.getElementById('studentThemeSelect');
|
||||||
|
|
||||||
if (themeSelector) themeSelector.value = savedTheme;
|
if (themeSelector) themeSelector.value = savedTheme;
|
||||||
|
if (studentThemeSelector) studentThemeSelector.value = savedTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeTheme(themeName) {
|
function changeTheme(themeName) {
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ window.startTypingPractice = async function() {
|
|||||||
const user = JSON.parse(localStorage.getItem('loggedInUser'));
|
const user = JSON.parse(localStorage.getItem('loggedInUser'));
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
|
||||||
|
// Hide student dashboard and game section
|
||||||
|
document.getElementById('studentPanel').style.display = 'none';
|
||||||
document.getElementById('gameSection').classList.add('hidden');
|
document.getElementById('gameSection').classList.add('hidden');
|
||||||
|
document.getElementById('gameSection').style.display = 'none';
|
||||||
document.getElementById('typingSection').classList.remove('hidden');
|
document.getElementById('typingSection').classList.remove('hidden');
|
||||||
|
document.getElementById('typingSection').style.display = 'block';
|
||||||
|
|
||||||
const typingPrompt = document.getElementById('typingPrompt');
|
const typingPrompt = document.getElementById('typingPrompt');
|
||||||
typingPrompt.textContent = 'Loading...';
|
typingPrompt.textContent = 'Loading...';
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ function showStudent() {
|
|||||||
const studentPanel = document.getElementById('studentPanel');
|
const studentPanel = document.getElementById('studentPanel');
|
||||||
if (studentPanel) {
|
if (studentPanel) {
|
||||||
studentPanel.classList.remove('hidden');
|
studentPanel.classList.remove('hidden');
|
||||||
|
studentPanel.style.display = 'block';
|
||||||
|
|
||||||
// Ensure buttons are visible and functional
|
// Ensure buttons are visible and functional
|
||||||
const gameBtn = document.getElementById('startGameBtn');
|
const gameBtn = document.getElementById('startGameBtn');
|
||||||
@@ -67,6 +68,13 @@ function showStudent() {
|
|||||||
typingBtn.classList.remove('hidden');
|
typingBtn.classList.remove('hidden');
|
||||||
console.log("✅ Student buttons are now visible");
|
console.log("✅ Student buttons are now visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update student theme selector to match current theme
|
||||||
|
const savedTheme = localStorage.getItem('theme') || localStorage.getItem('selectedTheme') || 'default';
|
||||||
|
const studentThemeSelect = document.getElementById('studentThemeSelect');
|
||||||
|
if (studentThemeSelect) {
|
||||||
|
studentThemeSelect.value = savedTheme;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+97
-2
@@ -105,7 +105,7 @@ button {
|
|||||||
padding: 0.75rem 1.5rem;
|
padding: 0.75rem 1.5rem;
|
||||||
margin: 0.25rem;
|
margin: 0.25rem;
|
||||||
background: var(--primary);
|
background: var(--primary);
|
||||||
color: white;
|
color: white !important;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
@@ -114,56 +114,126 @@ button {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: var(--transition);
|
transition: var(--transition);
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
background: var(--primary-dark);
|
background: var(--primary-dark);
|
||||||
|
color: white !important;
|
||||||
transform: translateY(-1px);
|
transform: translateY(-1px);
|
||||||
box-shadow: var(--shadow-lg);
|
box-shadow: var(--shadow-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active {
|
button:active {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:disabled {
|
button:disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
transform: none;
|
transform: none;
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button variants */
|
/* Button variants */
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
background: var(--secondary);
|
background: var(--secondary);
|
||||||
color: var(--text-primary);
|
color: var(--text-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary:hover {
|
.btn-secondary:hover {
|
||||||
background: var(--border);
|
background: var(--border);
|
||||||
|
color: var(--text-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-success {
|
.btn-success {
|
||||||
background: var(--success);
|
background: var(--success);
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-success:hover {
|
.btn-success:hover {
|
||||||
background: #059669;
|
background: #059669;
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-warning {
|
.btn-warning {
|
||||||
background: var(--warning);
|
background: var(--warning);
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-warning:hover {
|
.btn-warning:hover {
|
||||||
background: #d97706;
|
background: #d97706;
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-error {
|
.btn-error {
|
||||||
background: var(--error);
|
background: var(--error);
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-error:hover {
|
.btn-error:hover {
|
||||||
background: #dc2626;
|
background: #dc2626;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Additional button contrast fixes */
|
||||||
|
#startGameBtn, #startTypingBtn {
|
||||||
|
background: var(--success) !important;
|
||||||
|
color: white !important;
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.2) !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
min-height: 48px !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#startGameBtn:hover, #startTypingBtn:hover {
|
||||||
|
background: #059669 !important;
|
||||||
|
color: white !important;
|
||||||
|
transform: translateY(-2px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Typing Practice button specific styling */
|
||||||
|
#startTypingBtn {
|
||||||
|
background: var(--warning) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#startTypingBtn:hover {
|
||||||
|
background: #d97706 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Back to dashboard button */
|
||||||
|
button[onclick="backToStudentDashboard()"] {
|
||||||
|
background: var(--secondary) !important;
|
||||||
|
color: var(--text-primary) !important;
|
||||||
|
border: 1px solid var(--border) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
button[onclick="backToStudentDashboard()"]:hover {
|
||||||
|
background: var(--border) !important;
|
||||||
|
color: var(--text-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theme-specific button fixes */
|
||||||
|
.theme-chalkboard button,
|
||||||
|
.theme-galaxy button {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.3) !important;
|
||||||
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-chalkboard .btn-secondary,
|
||||||
|
.theme-galaxy .btn-secondary {
|
||||||
|
background: rgba(255, 255, 255, 0.1) !important;
|
||||||
|
color: white !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-chalkboard .btn-secondary:hover,
|
||||||
|
.theme-galaxy .btn-secondary:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.2) !important;
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cards and panels */
|
/* Cards and panels */
|
||||||
@@ -333,6 +403,31 @@ button:disabled {
|
|||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Student controls specific styling */
|
||||||
|
.student-controls button {
|
||||||
|
min-height: 60px !important;
|
||||||
|
font-size: 1.1rem !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.2) !important;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.student-controls .btn-success {
|
||||||
|
background: linear-gradient(135deg, #10b981, #059669) !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.student-controls .btn-warning {
|
||||||
|
background: linear-gradient(135deg, #f59e0b, #d97706) !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.student-controls button:hover {
|
||||||
|
transform: translateY(-3px) !important;
|
||||||
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lists */
|
/* Lists */
|
||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|||||||
Reference in new issue
Block a user