-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathindex2.html
454 lines (408 loc) · 16.1 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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<!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;
}
/* Style the scrollbar container */
::-webkit-scrollbar {
width: 12px; /* Width of the scrollbar */
height: 12px; /* Height for horizontal scrollbar */
}
/* Style the scrollbar track (background of the scrollbar) */
::-webkit-scrollbar-track {
background: #2d2d2d; /* Dark background */
border-radius: 10px;
}
/* Style the scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #f7e8b6, #f0d48c); /* Gradient using different yellow shades */
border-radius: 10px; /* Rounded corners */
border: 3px solid #1a1a1a; /* Border around the thumb */
}
/* Hover effect for the thumb */
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #f0d48c, #e6c85b); /* Lighter gradient on hover */
}
/* Optional: Style for the scrollbar corner */
::-webkit-scrollbar-corner {
background: #2d2d2d; /* Dark background for corner */
}
/* Style for horizontal scrollbar */
::-webkit-scrollbar-horizontal {
height: 12px; /* Height for horizontal scrollbar */
}
::-webkit-scrollbar-thumb-horizontal {
background: linear-gradient(90deg, #f7e8b6, #f0d48c); /* Horizontal gradient */
border-radius: 10px;
}
::-webkit-scrollbar-thumb-horizontal:hover {
background: linear-gradient(90deg, #f0d48c, #e6c85b);
}
.content {
padding: 20px;
margin-bottom: 60px; /* Space for the bottom icons */
flex: 1;
}
h1 {
color: #ffffff;
text-align: center;
background-color: rgba(0, 0, 0, 0.75); /* Black color with 50% transparency */
backdrop-filter: blur(15px);
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;
margin-bottom: 8px;
}
label:hover {
color: #3798a3; /* Change color */
}
input[type="text"] {
padding: 10px;
border: 2px solid #ccc; /* Default border */
border-radius: 4px;
width: 100%;
max-width: 600px;
margin: 10px 0;
box-sizing: border-box;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
font-size: 16px;
outline: none; /* Remove the default outline */
}
input[type="text"]:hover {
border-color: #3798a3; /* Change border color on hover */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}
input[type="text"]:focus {
border-color: #90dcde; /* Highlight border on focus */
box-shadow: 0 0 10px #47CACC; /* Add glowing effect */
background-color: #f9f9f9; /* Slightly change background color */
}
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, transform 0.2s ease;
}
button:hover {
background-color: #3798a3;
transform: translateY(-3px);
}
button:active {
background-color: #2a6f6e;
transform: translateY(0);
}
#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;
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: #fff;
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;
}
}
/* CSS for Scroll to Top Button */
#scrollBtn {
position: fixed;
bottom: 93px; /* Place closer to the bottom */
bottom: 88px; /* Place closer to the bottom */
right: 30px; /* Place closer to the right */
display: none; /* Initially hidden */
background-color: #d6a52b;
color: white;
border: none;
border-radius: 50%;
padding: 15px;
font-size: 18px;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 1000; /* Ensure visibility above other elements */
transition: background-color 0.3s ease, transform 0.3s ease;
}
#scrollBtn:hover {
background-color: #000; /* Change color on hover */
transform: scale(1.2); /* Slightly enlarge */
}
</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" placeholder="Enter 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>
<!-- script for checking if user is logged in or not -->
<!-- <script type="module">
import { createClient } from "https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm";
// Supabase configuration
const supabaseUrl = "https://gomhoxkucvpajjvkkeda.supabase.co"; // Replace with your Supabase URL
const supabaseKey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdvbWhveGt1Y3ZwYWpqdmtrZWRhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzYwNzU1OTUsImV4cCI6MjA1MTY1MTU5NX0.FdcK0Vmws-kxuL4fxXYNBTBBjDFaK44lY4b-jGcA6FE"; // Replace with your Supabase anon key
const supabase = createClient(supabaseUrl, supabaseKey);
// Check authentication state
async function checkAuthState() {
const { data: { session }, error } = await supabase.auth.getSession();
if (error) {
console.error("Error fetching session:", error);
return;
}
if (session && session.user) {
console.log("User is signed in:", session.user);
} else {
console.log("No user signed in. Redirecting to login page...");
window.location.href = "/login.html"; // Redirect to login page
}
}
// Run the auth state check on page load
checkAuthState();
</script> -->
<!-- Top scroll button -->
<button id="scrollBtn" title="Go to top">
<i class="fa-solid fa-arrow-up fa-lg"></i>
</button>
<script>
// Get the button element
const scrollBtn = document.getElementById('scrollBtn');
// Show the button when the user scrolls down 100px from the top
window.onscroll = function () {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
};
// Scroll to the top of the page when the button is clicked
scrollBtn.onclick = function () {
window.scrollTo({
top: 0,
behavior: "smooth"
});
};
</script>
</body>
</html>