-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.html
198 lines (173 loc) · 8.65 KB
/
result.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Career Quiz Results</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">
</head>
<script src="auth.js"></script>
<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>
<section class="career-paths">
<h1 style="text-align:center" style="color: brown; margin-bottom: 50px;">Top 5 Career Paths for you</h1><br><br>
<div id="careerPaths"></div>
</section>
<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>
<script src="cscript.js"></script>
<script>
function getQueryVariable(variable) {
const query = window.location.search.substring(1);
const vars = query.split('&');
for (let i = 0; i < vars.length; i++) {
const pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) === variable) {
return decodeURIComponent(pair[1]);
}
}
console.log('Query variable %s not found', variable);
}
function suggestCareerPaths(selectedOptions) {
const careerPaths = {
"Yes, I like": [,"FullStack Developer", "Project Manager", "Graphic Designer","Sales Executive", "Social Media Manager"],
"Not sure about it.": ["Accountant", "Data Analyst", "Financial Planner"],
"No, I dont like.": ["UI/UX designer","Graphic Designer", "Art Director", "Marketing Specialist"],
"Yeah, I am interested.": ["FullStack Developer", "Project Manager"],
"I dont have an idea.": ["UI/UX designer","FullStack Developer", "DevOps Engineer", "Cybersecurity Analyst"],
"No, I am not intersted.": ["Film Director", "Music Producer", "Game Designer"],
"Yes, I love to learn new tech.": ["FullStack Developer","Project Manager","Doctor", "Nurse", "Pharmacist"],
"Sometimes.": ["FullStack Developer","Project Manager","Investment Banker", "Financial Analyst", "Management Consultant"],
"No,I dont enjoy.": ["Mechanical Engineer", "Industrial Designer", "Manufacturing Engineer"],
"Yes, I find it fascinating.": ["Teacher", "Trainer", "Instructional Designer"],
"Not really,my area of Interest.": ["Hotel Manager", "Event Planner", "Travel Agent"],
"Yes, I do have interest.": ["UI/UX designer","FullStack Developer", "Sustainability Consultant", "Renewable Energy Engineer"],
"Not sure if I have interest.": ["Lawyer", "Paralegal", "Police Officer"],
"Not really.": ["Journalist", "Public Relations Specialist", "Social Media Manager"],
};
let pathFrequency = {};
selectedOptions.forEach(option => {
const paths = careerPaths[option];
if (paths) {
paths.forEach(path => {
if (pathFrequency[path]) {
pathFrequency[path]++;
} else {
pathFrequency[path] = 1;
}
});
}
});
const sortedPaths = Object.keys(pathFrequency).sort((a, b) => pathFrequency[b] - pathFrequency[a]);
const careerPathsDiv = document.getElementById('careerPaths');
sortedPaths.slice(0, 5).forEach((path, index) => {
const p = document.createElement('p');
p.textContent = `${index + 1}. ${path}`;
p.style.textAlign = 'center';
p.style.backgroundColor = '#f0dbaa';
p.style.color = 'brown';
p.style.fontSize = '20px';
p.style.padding = '20px';
p.style.marginBottom = '5px';
p.style.fontWeight = 'bold';
careerPathsDiv.appendChild(p);
const btnContainer = document.createElement('div');
btnContainer.style.textAlign = 'center';
btnContainer.style.paddingTop='10px';
btnContainer.style.paddingBottom='10px';
careerPathsDiv.appendChild(btnContainer);
});
}
const selectedOptionsString = getQueryVariable('selectedOptions');
if (selectedOptionsString) {
const selectedOptions = selectedOptionsString.split(',');
suggestCareerPaths(selectedOptions);
} else {
console.log('No selected options found');
}
</script>
<div id="google_translate_element"></div>
<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>
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>