-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeometry.html
More file actions
239 lines (225 loc) · 14 KB
/
Geometry.html
File metadata and controls
239 lines (225 loc) · 14 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html>
<head>
<meta name ="viewport" content="width=device-width, initial-scale=1.0">
<title>Visualizing Math</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css" integrity="sha512-5Hs3dF2AEPkpNAR7UiOHba+lRSJNeM2ECkwxUIxC1Q/FLycGTbNapWXB4tP889k5T5Ju8fs4b1P5z/iB4nMfSQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<!-- Firebase App (the core Firebase SDK) -->
<script src="https://www.gstatic.com/firebasejs/10.7.2/firebase-app-compat.js"></script>
<!-- Firebase Auth -->
<script src="https://www.gstatic.com/firebasejs/10.7.2/firebase-auth-compat.js"></script>
<!-- Firebase Firestore -->
<script src="https://www.gstatic.com/firebasejs/10.7.2/firebase-firestore-compat.js"></script>
<script>
const firebaseConfig = {
apiKey: 'AIzaSyAMPqEC7vmFh0Sm22KMmAVxaS_F7CI_YRM',
authDomain: 'visualizing-math.firebaseapp.com',
projectId: 'visualizing-math',
storageBucket: 'visualizing-math.appspot.com',
messagingSenderId: '128503124502',
appId: '1:128503124502:web:a5a5c786244e25c0af9b37',
measurementId: 'G-7LGGDVLGLP'
};
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();
const db = firebase.firestore();
</script>
<section class="sub-header">
<nav>
<a href="index.html"><img src="images/logo.png"></a>
<div class="nav-links" id="navLinks">
<i class="fas fa-xmark" onclick="hideMenu()"></i>
<ul>
<li><a href="index.html">HOME</a></li>
<li><a href="about.html">ABOUT</a></li>
<li><a href="SignUp.html">SIGN UP</a></li>
<li id="login-nav"><a href="Login.html">LOG IN</a></li>
<li id="logout-nav" style="display: none;"><a href="#" onclick="logout()">LOG OUT</a></li>
<li><a href="Algebra.html">ALGEBRA</a></li>
<li><a href="Geometry.html">GEOMETRY</a></li>
</ul>
</div>
<i class="fas fa-bars" onclick="showMenu()"></i>
</nav>
<h1>Geometry</h1>
</section>
<div class="content">
<div class="legend">
<div class="legend-item"><div class="icon" style="background: red;"></div> Incorrect</div>
<div class="legend-item"><div class="icon" style="background: green;"></div> Correct</div>
<div class="legend-item"><div class="icon"></div> Not Attempted</div>
</div>
<div class="unit-container">
<div class="unit">
<a href="Geometry/undefined_vs_defined.html">Logical Arguments: Undefined Terms vs Define Terms</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q43.png" width="100%"><a href="Geometry/Questions/q43.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q44.png" width="100%"><a href="Geometry/Questions/q44.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q45.png" width="100%"><a href="Geometry/Questions/q45.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q46.png" width="100%"><a href="Geometry/Questions/q46.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q47.png" width="100%"><a href="Geometry/Questions/q47.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q48.png" width="100%"><a href="Geometry/Questions/q48.html">Go to Question</a></div></div>
</div>
<div class="separator"></div>
<a href="Geometry/postulates.html">Logical Arguments: Postulates and Axioms</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q49.png" width="100%"><a href="Geometry/Questions/q49.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q50.png" width="100%"><a href="Geometry/Questions/q50.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q51.png" width="100%"><a href="Geometry/Questions/q51.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q52.png" width="100%"><a href="Geometry/Questions/q52.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q53.png" width="100%"><a href="Geometry/Questions/q53.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q54.png" width="100%"><a href="Geometry/Questions/q54.html">Go to Question</a></div></div>
</div>
<div class="separator"></div>
<a href="Geometry/coordinate.html">Coordinate Geometry</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q55.png" width="100%"><a href="Geometry/Questions/q55.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q56.png" width="100%"><a href="Geometry/Questions/q56.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q57.png" width="100%"><a href="Geometry/Questions/q57.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q58.png" width="100%"><a href="Geometry/Questions/q58.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q59.png" width="100%"><a href="Geometry/Questions/q59.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q60.png" width="100%"><a href="Geometry/Questions/q60.html">Go to Question</a></div></div>
</div>
<div class="separator"></div>
<a href="Geometry/congruence.html">Congruence</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q61.png" width="100%"><a href="Geometry/Questions/q61.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q62.png" width="100%"><a href="Geometry/Questions/q62.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q63.png" width="100%"><a href="Geometry/Questions/q63.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q64.png" width="100%"><a href="Geometry/Questions/q64.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q65.png" width="100%"><a href="Geometry/Questions/q65.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q66.png" width="100%"><a href="Geometry/Questions/q66.html">Go to Question</a></div></div>
</div>
<div class="separator"></div>
<a href="Geometry/right_angles.html">Right Triangle Special Cases</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q67.png" width="100%"><a href="Geometry/Questions/q67.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q68.png" width="100%"><a href="Geometry/Questions/q68.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q69.png" width="100%"><a href="Geometry/Questions/q69.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q70.png" width="100%"><a href="Geometry/Questions/q70.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q71.png" width="100%"><a href="Geometry/Questions/q71.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q72.png" width="100%"><a href="Geometry/Questions/q72.html">Go to Question</a></div></div>
</div>
<div class="separator"></div>
<a href="Geometry/trigonometry.html">Trigonometry</a>
<div class="question-icons">
<div class="icon"><div class="popup"><img src="Geometry/q_images/q73.png" width="100%"><a href="Geometry/Questions/q73.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q74.png" width="100%"><a href="Geometry/Questions/q74.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q75.png" width="100%"><a href="Geometry/Questions/q75.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q76.png" width="100%"><a href="Geometry/Questions/q76.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q77.png" width="100%"><a href="Geometry/Questions/q77.html">Go to Question</a></div></div>
<div class="icon"><div class="popup"><img src="Geometry/q_images/q78.png" width="100%"><a href="Geometry/Questions/q78.html">Go to Question</a></div></div>
</div>
</div>
</div>
</div>
<div class="main-container">
<div class="sidebar">
<h2>Geometry Units</h2>
<ul>
<li><a href="Geometry/undefined_vs_defined.html">Logical Arguments: Undefined Terms vs Define Terms</a></li>
<li><a href="Geometry/postulates.html">Logical Arguments: Postulates and Axioms</a></li>
<li><a href="Geometry/coordinate.html">Coordinate Geometry</a></li>
<li><a href="Geometry/congruence.html">Congruence</a></li>
<li><a href="Geometry/right_angles.html">Right Triangle Special Cases</a></li>
<li><a href="Geometry/trigonometry.html">Trigonometry</a></li>
</ul>
</div>
<div class="right-sidebar">
<h2>Welcome to Geometry!</h2>
<p>Step into the world of geometry, where points, lines, and shapes come together to form the foundation of spatial reasoning. This course explores essential topics like angles, and transformations, helping you develop a deep understanding of geometric concepts. Each unit features interactive exercises and detailed explanations to make learning engaging and intuitive. Whether you're new to geometry or looking to strengthen your skills, this course will guide you through the logic and beauty of the subject. Let’s begin your journey into the world of geometry!</p>
</div>
</div>
<!--------JavaScript for Toggle Menu-------->
<script>
var navLinks = document.getElementById("navLinks");
function showMenu(){
navLinks.style.right = "0";
}
function hideMenu(){
navLinks.style.right = "-200px";
}
</script>
<script>
document.addEventListener("DOMContentLoaded", () => {
// 1) Grab your icons once
const icons = document.querySelectorAll(".unit .question-icons .icon");
// 2) Helper to read localStorage for q1–qN
function readLocalProgress() {
const prog = {};
icons.forEach((_, idx) => {
const key = `q${idx + 43}Correct`;
const raw = localStorage.getItem(key);
if (raw !== null) {
try {
prog[key] = JSON.parse(raw);
} catch {
prog[key] = false;
}
}
});
return prog;
}
// 3) Common renderer: wipe old state, then apply new
function renderProgress(progress) {
icons.forEach((icon, idx) => {
const key = `q${idx + 43}Correct`;
const status = progress[key]; // true / false / undefined
icon.classList.remove("completed", "incorrect");
// you could also clear innerHTML if you're injecting icons
// icon.innerHTML = "";
if (status === true) {
icon.classList.add("completed");
} else if (status === false) {
icon.classList.add("incorrect");
}
// undefined → leave un-styled
});
}
// 4) Watch auth state
auth.onAuthStateChanged(async user => {
let progress = {};
if (user) {
// --- Signed in: pull from Firestore ---
try {
const userDoc = await db.collection("users").doc(user.uid).get();
progress = (userDoc.exists && userDoc.data().progress) || {};
} catch (err) {
console.error("Error fetching Firestore progress:", err);
// fallback to local if Firestore fails
progress = readLocalProgress();
}
} else {
// --- Signed out: read LocalStorage only ---
progress = readLocalProgress();
}
// 5) Finally render the icons
renderProgress(progress);
});
});
</script>
<script>
// Check login status on page load
document.addEventListener("DOMContentLoaded", () => {
const token = localStorage.getItem('token') || sessionStorage.getItem('token');
if (token) {
document.getElementById("login-nav").style.display = "none";
document.getElementById("logout-nav").style.display = "inline-block";
}
});
// Logout function
function logout() {
localStorage.removeItem('token');
sessionStorage.removeItem('token');
alert("You have been logged out.");
window.location.href = 'Login.html'; // Redirect to Login page
}
</script>
</body>
</html>