-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.html
More file actions
174 lines (161 loc) · 4.81 KB
/
Copy pathhelp.html
File metadata and controls
174 lines (161 loc) · 4.81 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Help - Abc Learning</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet"/>
<style>
body {
font-family: 'Poppins', sans-serif;
margin: 0;
background: linear-gradient(to right, #dfe9f3, #ffffff);
color: #333;
}
header {
background-color: #004080;
color: white;
padding: 20px;
text-align: center;
}
section {
max-width: 900px;
margin: 30px auto;
padding: 20px;
background: #f9f9f9;
border-radius: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
h2 {
color: #004080;
}
.chat-box, .discussion-box {
background: #fff;
border: 1px solid #ccc;
border-radius: 10px;
padding: 15px;
margin-top: 15px;
}
.chat-box textarea, .discussion-box textarea {
width: 100%;
padding: 10px;
border-radius: 8px;
margin-top: 10px;
}
.chat-box button, .discussion-box button {
padding: 8px 16px;
margin-top: 10px;
background-color: #004080;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
}
.messages, .answers {
margin-top: 10px;
background: #e6f0ff;
padding: 10px;
border-radius: 8px;
}
footer {
margin-top: 40px;
text-align: center;
padding: 10px;
background-color: #004080;
color: white;
}
.xp-display {
text-align: center;
margin-top: 10px;
}
.xp-display h3 {
color: #004080;
}
</style>
</head>
<body>
<header>
<h1>Help & Support - Abc Learning</h1>
</header>
<div class="xp-display">
<h3>Your XP: <span id="xpScore">0</span></h3>
</div>
<section>
<h2>1. Student Discussion Forum</h2>
<div class="discussion-box">
<textarea id="questionInput" placeholder="Ask your question here..."></textarea>
<button onclick="postQuestion()">Post Question</button>
<div class="answers" id="questionList"></div>
</div>
</section>
<section>
<h2>2. Talk to Mera Bro (AI Support)</h2>
<div class="chat-box">
<textarea id="chatInput" placeholder="Hey Mera Bro, I want to talk..."></textarea>
<button onclick="sendMessage()">Send</button>
<div class="messages" id="chatLog"></div>
</div>
</section>
<section style="text-align:center;">
<h2>3. Child Helpline (India)</h2>
<p>If you're feeling low, unsafe, or need to talk, please call:</p>
<h3 style="color: red;">1098</h3>
<p>It's free, 24/7, and confidential. You’re not alone.</p>
</section>
<footer>
© 2025 Abc Learning. You're never alone here.
</footer>
<script>
let xp = 0;
function updateXP(points) {
xp += points;
document.getElementById("xpScore").textContent = xp;
}
function postQuestion() {
const input = document.getElementById("questionInput");
const question = input.value.trim();
if (question) {
const container = document.getElementById("questionList");
const div = document.createElement("div");
div.innerHTML = `
<strong>Q:</strong> ${question}<br>
<textarea placeholder="Answer this..."></textarea><br>
<button onclick="submitAnswer(this)">Submit Answer</button>
`;
div.style.marginBottom = "15px";
container.appendChild(div);
input.value = "";
updateXP(5); // +5 XP for posting a question
}
}
function submitAnswer(button) {
const answerInput = button.previousElementSibling;
const answer = answerInput.value.trim();
if (answer) {
const answerDiv = document.createElement("div");
answerDiv.innerHTML = `<strong>A:</strong> ${answer}`;
button.parentElement.appendChild(answerDiv);
answerInput.remove(); // Remove textarea after answer submission
button.remove(); // Remove Submit button
updateXP(10); // +10 XP for answering a question
}
}
function sendMessage() {
const input = document.getElementById("chatInput");
const msg = input.value.trim();
if (msg) {
const log = document.getElementById("chatLog");
const userMsg = document.createElement("div");
userMsg.innerHTML = `<strong>You:</strong> ${msg}`;
log.appendChild(userMsg);
const reply = document.createElement("div");
reply.innerHTML = `<strong>Mera Bro:</strong> I'm here for you. Just take a deep breath. We'll figure it out together.`;
reply.style.marginTop = "5px";
log.appendChild(reply);
input.value = "";
log.scrollTop = log.scrollHeight;
}
}
</script>
</body>
</html>