-
Notifications
You must be signed in to change notification settings - Fork 0
/
mquiz.html
268 lines (227 loc) · 10.4 KB
/
mquiz.html
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mental Health Quiz</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="chat.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=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Plus Jakarta Sans", sans-serif;
}
.header {
min-height: 70vh;
}
.header,
.cta,
.sub-header {
background-image: url('tempbg.png');
background-position: center;
background-size: cover;
}
.sub-header,
.light-mode .sub-header {
background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
url('tempbg.png');
}
.dark-mode .sub-header {
background-image: linear-gradient(rgba(4, 9, 30, 0.7), rgba(4, 9, 30, 0.7)),
url('tempbg.png');
}
.footer {
width: 100%;
text-align: center;
padding: 30px 0;
background-color: #3e2c02;
}
.footer h4 {
margin-bottom: 25px;
margin-top: 20px;
font-weight: 600;
}
.icons i {
color: #f0dbaa;
margin: 0 13px;
cursor: pointer;
padding: 18px 0;
}
.quiz-card {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
padding: 20px;
margin: 20px auto;
max-width: 600px;
}
.quiz-card h2 {
margin-bottom: 15px;
font-size: 20px;
}
.quiz-card label {
display: block;
margin-bottom: 10px;
}
.quiz-card input[type="radio"] {
margin-right: 10px;
}
.quiz-card button[type="submit"] {
background-color: #ad8a38;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 20px;
}
</style>
</head>
<body>
<section class="header">
<nav style="padding-top: 30px;">
<img style="width: 250px; margin-left: 85px;" src="nvt1.png">
<a href="index.html"></a>
<div class="nav-links" id="navLinks">
<i class="fa fa-times" onclick="hidemenu()"></i>
<ul>
<li><a href="home2.html" style="font-size: 18px;">Home</a></li>
<li><a href="career.html" style="font-size: 18px;">Career</a></li>
<li><a href="mquiz.html" style="font-size: 18px;">Mental Health</a></li>
<li><a href="explore.html" style="font-size: 18px;">Explore</a></li>
<li><a href="ideahub.html" style="font-size: 18px;">IdeaHub</a></li>
<li><a href="community.html" style="font-size: 18px;">Community</a></li>
<li><a href="article.html"
style="font-size: 18px;">Articles</a></li>
<li><a href="profile.html"
style="font-size: 18px;background-color: #ad8a38; font-weight: bold; padding: 10px; border-radius: 5px;">Profile</a>
</li>
</ul>
</div>
<i class="fa fa-bars" onclick="showMenu()"></i>
</nav>
<br><br><br><br>
<div class="text-box">
<h1 style="padding-top: 20px; font-size: 50px;">Discover your mental health status</h1>
<h1 style="font-size: 50px;"> through a quick, personalized quiz.</h1>
</div>
<button class="chatbot-toggler">
<span class="material-symbols-rounded"><i class="fa-solid fa-message"></i></span>
<span class="material-symbols-outlined"><i class="fa-solid fa-xmark"></i></span>
</button>
<div class="chatbot">
<header>
<h2>Chatbot</h2>
<span class="close-btn material-symbols-outlined"><i class="fa-solid fa-xmark"></i></span>
</header>
<ul class="chatbox">
<li class="chat incoming">
<span class="material-symbols-outlined"><i class="fa-regular fa-paper-plane"></i></span>
<p>Hi there 👋<br>How can I help you today?</p>
</li>
</ul>
<div class="chat-input">
<textarea placeholder="Enter a message..." spellcheck="false" required></textarea>
<span id="send-btn" class="material-symbols-rounded"><i class="fa-solid fa-share"></i></span>
</div>
</div>
</section>
<div class="quiz-card">
<form action="mresult.php" method="post">
<h2>Question 1: How would you describe your overall mood today?</h2>
<label><input type="radio" name="mood" value="content"> Content</label>
<label><input type="radio" name="mood" value="tense"> Tense</label>
<label><input type="radio" name="mood" value="unsettled"> Unsettled</label>
<label><input type="radio" name="mood" value="low"> Low</label>
<h2>Question 2: Have you been feeling physically well lately?</h2>
<label><input type="radio" name="physical_wellness" value="yes"> Yes</label>
<label><input type="radio" name="physical_wellness" value="no"> No</label>
<h2>Question 3: How would you describe the quality of your sleep recently?</h2>
<label><input type="radio" name="sleep_quality" value="restful"> Restful</label>
<label><input type="radio" name="sleep_quality" value="disturbed"> Disturbed</label>
<h2>Question 4: Are you finding it challenging to manage daily tasks?</h2>
<label><input type="radio" name="task_management" value="manageable"> Manageable</label>
<label><input type="radio" name="task_management" value="overwhelming"> Overwhelming</label>
<h2>Question 5: How connected do you feel to your support network?</h2>
<label><input type="radio" name="support_network" value="strong"> Strongly Connected</label>
<label><input type="radio" name="support_network" value="distant"> Distant</label>
<h2>Question 6: Do you often experience racing thoughts or difficulty concentrating?</h2>
<label><input type="radio" name="concentration_issues" value="yes"> Yes</label>
<label><input type="radio" name="concentration_issues" value="no"> No</label>
<h2>Question 7: How satisfied are you with your current relationships?</h2>
<label><input type="radio" name="relationship_satisfaction" value="satisfied"> Satisfied</label>
<label><input type="radio" name="relationship_satisfaction" value="unsatisfied"> Unsatisfied</label>
<h2>Question 8: Are you experiencing changes in appetite or weight?</h2>
<label><input type="radio" name="appetite_changes" value="yes"> Yes</label>
<label><input type="radio" name="appetite_changes" value="no"> No</label>
<h2>Question 9: How often do you engage in activities that bring you joy?</h2>
<label><input type="radio" name="joyful_activities" value="frequently"> Frequently</label>
<label><input type="radio" name="joyful_activities" value="rarely"> Rarely</label>
<h2>Question 10: Do you feel overwhelmed by your emotions?</h2>
<label><input type="radio" name="emotional_overwhelm" value="sometimes"> Sometimes</label>
<label><input type="radio" name="emotional_overwhelm" value="often"> Often</label>
<button type="submit">Submit</button>
</form>
</div>
<script src="chello.js"></script>
<div id="google_translate_element"></div>
<script src="https://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate"></script>
<script>
function loadGoogleTranslate() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
}
</script>
<script src="cscript.js"></script>
<section class="footer">
<h3 style="color:#f0dbaa; font-weight: bold;">Contact Us</h3>
<div class="icons">
<i class="fab fa-facebook"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin"></i>
</div>
</section>
<script src="cscript.js"></script>
<script>
var navlinks = document.getElementById("navLinks");
function showMenu() {
navlinks.style.right = "0";
}
function hidemenu() {
navlinks.style.right = "-200px";
}
function toggleMode() {
document.body.classList.toggle('dark-mode');
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const currentUser = getCurrentUser();
if (currentUser) {
if (currentUser.role === 'admin') {
document.getElementById('reviews').contentEditable = true;
} else {
document.getElementById('reviews').contentEditable = false;
}
}
});
</script>
<script src="chello.js"></script>
<script src="https://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate"></script>
<script>
function loadGoogleTranslate() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script>
</body>
</html>