-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.html
More file actions
116 lines (104 loc) · 2.67 KB
/
progress.html
File metadata and controls
116 lines (104 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Progress</title>
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(135deg, #74ebd5, #9face6);
color: #333;
}
nav {
background: #333;
padding: 1rem;
text-align: center;
}
nav a {
color: #fff;
margin: 0 1rem;
text-decoration: none;
font-weight: bold;
transition: color 0.3s;
}
nav a:hover {
color: #ffd700;
}
main {
max-width: 600px;
margin: 50px auto;
padding: 2rem;
background: #fff;
border-radius: 15px;
text-align: center;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
animation: fadeIn 1s ease-in;
}
h1 {
font-size: 2rem;
color: #444;
margin-bottom: 1rem;
}
.stat {
font-size: 1.3rem;
margin: 1rem 0;
padding: 1rem;
border-radius: 10px;
background: #f9f9f9;
transition: transform 0.3s;
}
.stat:hover {
transform: scale(1.05);
background: #e6f7ff;
}
.badge {
display: inline-block;
margin-top: 1rem;
padding: 0.5rem 1rem;
border-radius: 50px;
background: #ffd700;
color: #333;
font-weight: bold;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
animation: popIn 0.6s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
from { transform: scale(0.5); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
</style>
</head>
<body>
<nav>
<a href="index.html">🏠 Home</a> |
<a href="challenges.html">🔥 Challenges</a> |
<a href="lessons.html">📚 Lessons</a> |
<a href="simulation.html">🎮 Simulation</a>
</nav>
<main>
<h1>📊 Your Progress</h1>
<p class="stat" id="score"></p>
<p class="stat" id="badge"></p>
<div id="badgeDisplay"></div>
</main>
<script>
const score = localStorage.getItem("score") || 0;
const badge = localStorage.getItem("badge") || "No badge yet";
document.getElementById("score").textContent = "⭐ Your Score: " + score;
document.getElementById("badge").textContent = "🏅 Badge: " + badge;
// Show a badge visually if earned
if (badge !== "No badge yet") {
document.getElementById("badgeDisplay").innerHTML =
`<span class="badge">${badge}</span>`;
}
</script>
</body>
</html>