-
Notifications
You must be signed in to change notification settings - Fork 1
/
index2.html
306 lines (281 loc) · 10.6 KB
/
index2.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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ajivika</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body {
font-family: sans-serif;
background-color: antiquewhite;
color: #333;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.content {
padding: 20px;
margin-bottom: 60px; /* Space for the bottom icons */
flex: 1;
}
h1 {
color:rgb(137,79,31);
text-align: center;
background: color 47CACC;
padding: 20px;
margin: 0;
font-family:cursive;
font-size: 50px;
}
form {
margin: 20px 0;
padding: 20px;
background-color:antiquewhite;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
label {
font-size: 18px;
color: #555;
}
input[type="text"] {
padding: 10px;
border: 1px solid antiquewhite;
border-radius: 4px;
width: 100%;
max-width: 600px;
margin: 10px 0;
}
button {
background-color:rgb(137,79,31);
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #3798a3;
}
#results {
display: flex;
flex-direction: column;
margin: 20px 0;
}
#results div {
background-color: #f5f5f5;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
padding: 20px;
margin: 10px 0;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#results div:nth-child(odd) {
background-color: #ffffff;
}
#results div:hover {
transform: translateY(-5px);
box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}
h3 {
color: #47CACC;
}
.background-videos {
display: flex;
flex-direction: row;
gap: 10px;
margin-bottom: 20px;
}
.background-videos video {
width: 100%;
height: 200px; /* Adjust video height */
object-fit: cover;
}
.bottom-icons {
position: fixed;
bottom: 0;
width: 100%;
display: flex;
justify-content: space-between;
padding: 20px;
box-sizing: border-box;
}
.bottom-icons a {
background-color: antiquewhite;
color:rgb(137,79,31);
padding: 15px;
border-radius: 50%;
font-size: 24px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
}
.bottom-icons a:hover {
background-color: #3798a3;
}
.back-button {
position: absolute;
top: 20px;
left: 20px;
background-color: transparent;
border: none;
color: #333;
font-size: 24px;
cursor: pointer;
z-index: 999;
transition: color 0.3s ease;
}
.back-button:hover {
color: #d6a52b;
}
.chatbot-panel {
position: fixed;
top: 0;
right: 0;
width: 100%;
height: 100%;
background-color: #e3f2fd;
box-shadow: -2px 0 5px rgba(0,0,0,0.2);
transform: translateX(100%);
transition: transform 0.3s ease;
padding: 20px;
z-index: 1000;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.chatbot-panel.open {
transform: translateX(0);
}
@media (min-width: 768px) {
.background-videos {
flex-direction: row;
}
}
@media (max-width: 768px) {
.background-videos {
flex-direction: column;
}
.bottom-icons a {
font-size: 20px;
padding: 10px;
}
.background-videos video {
height: 150px;
}
}
</style>
</head>
<body>
<h1>Ajivika ~ At your Service</h1>
<button class="back-button" onclick="window.history.back();">
<i class="fas fa-arrow-left"></i>
</button>
<div class="background-videos">
<video src="https://cdn.pixabay.com/video/2021/01/03/61037-497754241_tiny.mp4" autoplay muted loop></video>
<video src="https://cdn.pixabay.com/video/2023/05/28/164807-831084936_tiny.mp4" autoplay muted loop></video>
<video src="https://cdn.pixabay.com/video/2021/09/11/88231-602915804_tiny.mp4" autoplay muted loop></video>
</div>
<div class="content">
<form onsubmit="event.preventDefault(); useChatbot();">
<label for="skills">Enter Skills:</label>
<input type="text" id="skills" name="skills" required>
<button type="submit">Search Jobs</button>
</form>
<div id="results">
<!-- Iframe for displaying chatbot responses -->
<iframe id="chatbotFrame" style="width: 100%; height: 500px; border: none; display: none;"></iframe>
</div>
</div>
<script>
function useChatbot() {
const skillsInput = document.getElementById('skills').value.trim();
const chatbotFrame = document.getElementById('chatbotFrame');
// Toggle visibility of the chatbot iframe
if (chatbotFrame.style.display === 'block') {
// If iframe is already visible, hide it
chatbotFrame.style.display = 'none';
} else {
if (skillsInput) {
// Construct chatbot link with skills as query parameter
const chatbotURL = `https://cdn.botpress.cloud/webchat/v2.2/shareable.html?configUrl=https://files.bpcontent.cloud/2024/12/23/07/20241223075256-8E9BNGRI.json&skills=${encodeURIComponent(skillsInput)}`;
// Set the iframe source to the chatbot URL
chatbotFrame.src = chatbotURL;
// Make the iframe visible
chatbotFrame.style.display = 'block';
} else {
alert('Please enter some skills before searching.');
}
}
}
</script>
<div class="bottom-icons">
<a href="./index.html"><i class="fas fa-home"></i></a>
<a href="resume.html"><i class="fa-solid fa-pen-nib"></i></i></a>
<a href="https://vwfds2rwkfwfree87eappta.streamlit.app/"><i class="fa-solid fa-list"></i></i></a>
<a href="https://public.tableau.com/views/RecruitmentAnalysisFinalNew/RecruitmentStats?:showVizHome=no"><i class=""></i><i class="fa-solid fa-chart-line"></i></i></a>
<a href="./contact.html" onclick="toggleChatbotPanel()"><i class="fas fa-comment-alt"></i></a>
</div>
<script>
let startIndex = 0; // Tracks the current index for pagination
const pageSize = 10; // Number of jobs to load per page
// Function to get job recommendations
async function getRecommendations() {
const skills = document.getElementById('skills').value; // Get user input from the 'skills' field
// Fetch job recommendations from the backend
const response = await fetch('/predict', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ skills: skills, start_index: startIndex }) // Include the start index for pagination
});
const data = await response.json(); // Parse JSON response
const resultsDiv = document.getElementById('results'); // Job results container
// Handle error in the response
if (data.error) {
resultsDiv.innerHTML = `<p>Error: ${data.error}</p>`;
} else {
// Append new jobs to the results div
data.jobs.forEach(job => {
resultsDiv.innerHTML += `<div class="job-item">
<h3>${job['Job Title']}</h3>
<p>Experience Required: ${job['Job Experience Required']}</p>
<p>Salary: ${job['Job Salary']}</p>
<p>Functional Area: ${job['Functional Area']}</p>
<p>Industry: ${job['Industry']}</p>
<button class="apply-btn"onclick="window.location.href='https://apna.co/jobs/freshers-jobs?sourcePage=Home+Page';">Apply Now</button>
</div>`;
}
);
// Show or hide the "Show More" button based on the number of jobs loaded
const showMoreButton = document.getElementById('showMoreButton');
if (data.jobs.length === pageSize) {
showMoreButton.classList.remove('hidden'); // Show "Show More" button if more jobs are available
} else {
showMoreButton.classList.add('hidden'); // Hide "Show More" button if no more jobs
}
// Update the start index to load the next batch on subsequent clicks
startIndex += pageSize;
}
}
// Function to load more jobs when "Show More" is clicked
function loadMoreJobs() {
getRecommendations(); // Load the next batch of jobs
}
// Function to toggle the chatbot/quiz panel
function toggleChatbotPanel() {
const panel = document.getElementById('chatbotPanel'); // Select the panel element
panel.classList.toggle('open'); // Toggle the 'open' class to show/hide the panel
}
</script>
</body>
</html>