Spaces:
Running
Running
Update index.html
Browse files- index.html +92 -33
index.html
CHANGED
@@ -6,36 +6,38 @@
|
|
6 |
<style>
|
7 |
/* General Styles */
|
8 |
body {
|
9 |
-
font-family:
|
10 |
-
background: #
|
11 |
margin: 0;
|
12 |
padding: 0;
|
|
|
13 |
}
|
14 |
.container {
|
15 |
-
max-width:
|
16 |
margin: 50px auto;
|
17 |
padding: 20px;
|
18 |
background: #fff;
|
19 |
-
border-radius:
|
20 |
-
box-shadow:
|
21 |
}
|
22 |
h1, h2 {
|
23 |
text-align: center;
|
24 |
-
color: #
|
25 |
}
|
26 |
p {
|
27 |
text-align: center;
|
|
|
28 |
}
|
29 |
.feedback {
|
30 |
margin-top: 15px;
|
31 |
text-align: center;
|
32 |
-
font-
|
33 |
-
}
|
34 |
-
.error {
|
35 |
-
color: red;
|
36 |
}
|
37 |
.success {
|
38 |
-
color:
|
|
|
|
|
|
|
39 |
}
|
40 |
button {
|
41 |
display: block;
|
@@ -62,7 +64,8 @@
|
|
62 |
.hidden {
|
63 |
display: none;
|
64 |
}
|
65 |
-
|
|
|
66 |
.persona-list {
|
67 |
display: flex;
|
68 |
flex-wrap: wrap;
|
@@ -70,27 +73,59 @@
|
|
70 |
margin: 20px 0;
|
71 |
}
|
72 |
.persona {
|
73 |
-
background: #
|
74 |
-
border:
|
75 |
-
border-radius:
|
76 |
-
width:
|
77 |
padding: 15px;
|
78 |
text-align: center;
|
79 |
-
cursor: pointer;
|
80 |
margin: 10px;
|
81 |
transition: transform 0.2s, background 0.2s;
|
|
|
|
|
82 |
}
|
83 |
.persona:hover {
|
84 |
-
transform: scale(1.
|
85 |
-
background: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
</style>
|
88 |
</head>
|
89 |
<body>
|
90 |
<div class="container">
|
91 |
<h1>Networking Practice Game</h1>
|
92 |
-
|
93 |
-
<!-- Level 1: Locate the Mentor -->
|
94 |
<div id="level1">
|
95 |
<h2>Level 1: Find Your Mentor</h2>
|
96 |
<p>Your purpose: <strong>Find a mentor</strong></p>
|
@@ -119,7 +154,13 @@
|
|
119 |
<!-- Level 2: Initiate Conversation -->
|
120 |
<div id="level2" class="hidden">
|
121 |
<h2>Level 2: Initiate a Meaningful Conversation</h2>
|
122 |
-
<p>
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
<textarea id="conversationInput" rows="4" placeholder="Type your conversation starter here..."></textarea>
|
124 |
<button id="submitConversation">Send Message</button>
|
125 |
<div id="level2Feedback" class="feedback"></div>
|
@@ -128,7 +169,9 @@
|
|
128 |
<!-- Level 3: Follow-Up Challenge -->
|
129 |
<div id="level3" class="hidden">
|
130 |
<h2>Level 3: Follow-Up Challenge</h2>
|
131 |
-
<p>
|
|
|
|
|
132 |
<input type="text" id="followUpInput" placeholder="Enter the detail here...">
|
133 |
<button id="submitFollowUp">Submit Follow-Up</button>
|
134 |
<div id="level3Feedback" class="feedback"></div>
|
@@ -136,7 +179,7 @@
|
|
136 |
</div>
|
137 |
|
138 |
<script>
|
139 |
-
// Level 1: Persona selection
|
140 |
const personas = document.querySelectorAll('.persona');
|
141 |
const level1Feedback = document.getElementById('level1Feedback');
|
142 |
const level1Div = document.getElementById('level1');
|
@@ -149,19 +192,37 @@
|
|
149 |
level1Feedback.textContent = "Correct! You've found the mentor.";
|
150 |
level1Feedback.classList.remove('error');
|
151 |
level1Feedback.classList.add('success');
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
setTimeout(() => {
|
154 |
level1Div.classList.add('hidden');
|
155 |
level2Div.classList.remove('hidden');
|
156 |
-
},
|
157 |
} else {
|
158 |
-
level1Feedback.textContent = "That's not the right person.
|
159 |
level1Feedback.classList.remove('success');
|
160 |
level1Feedback.classList.add('error');
|
161 |
}
|
162 |
});
|
163 |
});
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
// Level 2: Conversation initiation
|
166 |
const submitConversationBtn = document.getElementById('submitConversation');
|
167 |
const conversationInput = document.getElementById('conversationInput');
|
@@ -170,24 +231,23 @@
|
|
170 |
|
171 |
submitConversationBtn.addEventListener('click', () => {
|
172 |
const text = conversationInput.value.trim();
|
173 |
-
// Basic validation: message should be long enough and include either a question or narrative trigger
|
174 |
if (text.length < 20) {
|
175 |
level2Feedback.textContent = "Your message is too short. Please provide more detail.";
|
176 |
level2Feedback.classList.remove('success');
|
177 |
level2Feedback.classList.add('error');
|
178 |
-
} else if (!text.includes("?") && !text
|
179 |
-
level2Feedback.textContent = "
|
180 |
level2Feedback.classList.remove('success');
|
181 |
level2Feedback.classList.add('error');
|
182 |
} else {
|
183 |
-
level2Feedback.textContent = "Great conversation starter
|
184 |
level2Feedback.classList.remove('error');
|
185 |
level2Feedback.classList.add('success');
|
186 |
// Proceed to Level 3 after a short delay
|
187 |
setTimeout(() => {
|
188 |
document.getElementById('level2').classList.add('hidden');
|
189 |
level3Div.classList.remove('hidden');
|
190 |
-
},
|
191 |
}
|
192 |
});
|
193 |
|
@@ -212,4 +272,3 @@
|
|
212 |
</script>
|
213 |
</body>
|
214 |
</html>
|
215 |
-
|
|
|
6 |
<style>
|
7 |
/* General Styles */
|
8 |
body {
|
9 |
+
font-family: 'Comic Sans MS', cursive, sans-serif;
|
10 |
+
background: #f7f9fc;
|
11 |
margin: 0;
|
12 |
padding: 0;
|
13 |
+
color: #333;
|
14 |
}
|
15 |
.container {
|
16 |
+
max-width: 600px;
|
17 |
margin: 50px auto;
|
18 |
padding: 20px;
|
19 |
background: #fff;
|
20 |
+
border-radius: 10px;
|
21 |
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
22 |
}
|
23 |
h1, h2 {
|
24 |
text-align: center;
|
25 |
+
color: #2d3436;
|
26 |
}
|
27 |
p {
|
28 |
text-align: center;
|
29 |
+
font-size: 18px;
|
30 |
}
|
31 |
.feedback {
|
32 |
margin-top: 15px;
|
33 |
text-align: center;
|
34 |
+
font-size: 18px;
|
|
|
|
|
|
|
35 |
}
|
36 |
.success {
|
37 |
+
color: #00b894;
|
38 |
+
}
|
39 |
+
.error {
|
40 |
+
color: #d63031;
|
41 |
}
|
42 |
button {
|
43 |
display: block;
|
|
|
64 |
.hidden {
|
65 |
display: none;
|
66 |
}
|
67 |
+
|
68 |
+
/* Duolingo-Like Persona Card Styles for Level 1 */
|
69 |
.persona-list {
|
70 |
display: flex;
|
71 |
flex-wrap: wrap;
|
|
|
73 |
margin: 20px 0;
|
74 |
}
|
75 |
.persona {
|
76 |
+
background: #81ecec;
|
77 |
+
border: 3px solid #00cec9;
|
78 |
+
border-radius: 10px;
|
79 |
+
width: 130px;
|
80 |
padding: 15px;
|
81 |
text-align: center;
|
|
|
82 |
margin: 10px;
|
83 |
transition: transform 0.2s, background 0.2s;
|
84 |
+
cursor: pointer;
|
85 |
+
position: relative;
|
86 |
}
|
87 |
.persona:hover {
|
88 |
+
transform: scale(1.1);
|
89 |
+
background: #74b9ff;
|
90 |
+
}
|
91 |
+
/* Check Mark Animation for Level 1 */
|
92 |
+
.checkmark {
|
93 |
+
position: absolute;
|
94 |
+
top: -10px;
|
95 |
+
right: -10px;
|
96 |
+
background: #00b894;
|
97 |
+
color: #fff;
|
98 |
+
border-radius: 50%;
|
99 |
+
width: 30px;
|
100 |
+
height: 30px;
|
101 |
+
display: flex;
|
102 |
+
align-items: center;
|
103 |
+
justify-content: center;
|
104 |
+
font-size: 20px;
|
105 |
+
animation: pop 0.5s ease-out;
|
106 |
+
opacity: 0;
|
107 |
+
}
|
108 |
+
@keyframes pop {
|
109 |
+
0% {
|
110 |
+
transform: scale(0);
|
111 |
+
opacity: 0;
|
112 |
+
}
|
113 |
+
70% {
|
114 |
+
transform: scale(1.2);
|
115 |
+
opacity: 1;
|
116 |
+
}
|
117 |
+
100% {
|
118 |
+
transform: scale(1);
|
119 |
+
opacity: 1;
|
120 |
+
}
|
121 |
}
|
122 |
</style>
|
123 |
</head>
|
124 |
<body>
|
125 |
<div class="container">
|
126 |
<h1>Networking Practice Game</h1>
|
127 |
+
|
128 |
+
<!-- Level 1: Locate the Mentor (Duolingo Style) -->
|
129 |
<div id="level1">
|
130 |
<h2>Level 1: Find Your Mentor</h2>
|
131 |
<p>Your purpose: <strong>Find a mentor</strong></p>
|
|
|
154 |
<!-- Level 2: Initiate Conversation -->
|
155 |
<div id="level2" class="hidden">
|
156 |
<h2>Level 2: Initiate a Meaningful Conversation</h2>
|
157 |
+
<p>
|
158 |
+
Now that you've identified the mentor, start a conversation by asking an interesting question or sharing a personal story.
|
159 |
+
</p>
|
160 |
+
<p>
|
161 |
+
<em>Success Criteria:</em> Your message should be at least 20 characters long and either include a question (a "?" symbol) or contain a storytelling indicator
|
162 |
+
such as words like "story", "once", "experience", "anecdote", "interesting", or "remember".
|
163 |
+
</p>
|
164 |
<textarea id="conversationInput" rows="4" placeholder="Type your conversation starter here..."></textarea>
|
165 |
<button id="submitConversation">Send Message</button>
|
166 |
<div id="level2Feedback" class="feedback"></div>
|
|
|
169 |
<!-- Level 3: Follow-Up Challenge -->
|
170 |
<div id="level3" class="hidden">
|
171 |
<h2>Level 3: Follow-Up Challenge</h2>
|
172 |
+
<p>
|
173 |
+
Recall a specific detail the mentor mentioned during your conversation. For example, the mentor mentioned they love <strong>sailing</strong>. What was it?
|
174 |
+
</p>
|
175 |
<input type="text" id="followUpInput" placeholder="Enter the detail here...">
|
176 |
<button id="submitFollowUp">Submit Follow-Up</button>
|
177 |
<div id="level3Feedback" class="feedback"></div>
|
|
|
179 |
</div>
|
180 |
|
181 |
<script>
|
182 |
+
// Level 1: Persona selection (Duolingo Style)
|
183 |
const personas = document.querySelectorAll('.persona');
|
184 |
const level1Feedback = document.getElementById('level1Feedback');
|
185 |
const level1Div = document.getElementById('level1');
|
|
|
192 |
level1Feedback.textContent = "Correct! You've found the mentor.";
|
193 |
level1Feedback.classList.remove('error');
|
194 |
level1Feedback.classList.add('success');
|
195 |
+
|
196 |
+
// Add a checkmark icon to the correct card
|
197 |
+
const check = document.createElement('div');
|
198 |
+
check.classList.add('checkmark');
|
199 |
+
check.innerHTML = "✓"; // Unicode checkmark
|
200 |
+
persona.appendChild(check);
|
201 |
+
|
202 |
+
// Trigger animation by ensuring the checkmark becomes visible
|
203 |
+
setTimeout(() => {
|
204 |
+
check.style.opacity = "1";
|
205 |
+
}, 50);
|
206 |
+
|
207 |
+
// After a short delay, progress to Level 2
|
208 |
setTimeout(() => {
|
209 |
level1Div.classList.add('hidden');
|
210 |
level2Div.classList.remove('hidden');
|
211 |
+
}, 1500);
|
212 |
} else {
|
213 |
+
level1Feedback.textContent = "Oops! That's not the right person. Try again!";
|
214 |
level1Feedback.classList.remove('success');
|
215 |
level1Feedback.classList.add('error');
|
216 |
}
|
217 |
});
|
218 |
});
|
219 |
|
220 |
+
// Helper function to check for storytelling keywords
|
221 |
+
function containsStoryKeywords(text) {
|
222 |
+
const keywords = ["story", "once", "experience", "anecdote", "interesting", "remember"];
|
223 |
+
return keywords.some(keyword => text.toLowerCase().includes(keyword));
|
224 |
+
}
|
225 |
+
|
226 |
// Level 2: Conversation initiation
|
227 |
const submitConversationBtn = document.getElementById('submitConversation');
|
228 |
const conversationInput = document.getElementById('conversationInput');
|
|
|
231 |
|
232 |
submitConversationBtn.addEventListener('click', () => {
|
233 |
const text = conversationInput.value.trim();
|
|
|
234 |
if (text.length < 20) {
|
235 |
level2Feedback.textContent = "Your message is too short. Please provide more detail.";
|
236 |
level2Feedback.classList.remove('success');
|
237 |
level2Feedback.classList.add('error');
|
238 |
+
} else if (!text.includes("?") && !containsStoryKeywords(text)) {
|
239 |
+
level2Feedback.textContent = "Your message needs to ask a question or include a personal story. For example, 'I once experienced...' or 'What was it like when...?'.";
|
240 |
level2Feedback.classList.remove('success');
|
241 |
level2Feedback.classList.add('error');
|
242 |
} else {
|
243 |
+
level2Feedback.textContent = "Great job! Your conversation starter feels engaging and natural.";
|
244 |
level2Feedback.classList.remove('error');
|
245 |
level2Feedback.classList.add('success');
|
246 |
// Proceed to Level 3 after a short delay
|
247 |
setTimeout(() => {
|
248 |
document.getElementById('level2').classList.add('hidden');
|
249 |
level3Div.classList.remove('hidden');
|
250 |
+
}, 1500);
|
251 |
}
|
252 |
});
|
253 |
|
|
|
272 |
</script>
|
273 |
</body>
|
274 |
</html>
|
|