From c5dfc5220128d5c7c2f52d9a8b8c20a205c8cbce Mon Sep 17 00:00:00 2001 From: jainabhishek2004 Date: Fri, 10 Jan 2025 18:04:43 +0530 Subject: [PATCH 1/4] Ai-career -recommendation --- .hintrc | 13 +++ Ai-carrer-recommendation.css | 161 ++++++++++++++++++++++++++++++++++ Ai-carrer-recommendation.html | 66 ++++++++++++++ Ai-carrer-recommendation.js | 60 +++++++++++++ desktop.ini | 2 + 5 files changed, 302 insertions(+) create mode 100644 .hintrc create mode 100644 Ai-carrer-recommendation.css create mode 100644 Ai-carrer-recommendation.html create mode 100644 Ai-carrer-recommendation.js create mode 100644 desktop.ini diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000..1213eef --- /dev/null +++ b/.hintrc @@ -0,0 +1,13 @@ +{ + "extends": [ + "development" + ], + "hints": { + "axe/text-alternatives": [ + "default", + { + "document-title": "off" + } + ] + } +} \ No newline at end of file diff --git a/Ai-carrer-recommendation.css b/Ai-carrer-recommendation.css new file mode 100644 index 0000000..7aa91a7 --- /dev/null +++ b/Ai-carrer-recommendation.css @@ -0,0 +1,161 @@ +* { + margin: 0; + padding: 0; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + box-sizing: border-box; +} + +html, body { + width: 100%; + height: 100%; + background-color: rgb(247, 247, 178); +} + +.container { + padding: 20px; +} + +#nav { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + padding: 30px 50px; + background-color: #f7e2b1ea; +} + +#nav img { + width: 100px; +} + +#nav #right { + display: flex; + align-items: center; + gap: 40px; +} + +#nav a { + text-decoration: none; + font-weight: 400; + color: #000; + font-size: 0.8rem; + letter-spacing: -1px; + transition: font-size 0.3s ; +} + +#nav a:hover{ + font-size: 2vw; +} + +@media (min-width: 768px) { + #nav { + flex-direction: row; + justify-content: space-between; + padding: 30px 50px; + } + + #nav img { + width: 100px; + } + + #nav a { + font-size: 1.5vw; + } + #nav i { + font-size: 1.5vw; + } + +} +#nav i { + font-weight: 100px; + font-size: 1rem; +} + +#right a.login-btn { + padding: 10px 20px; + background-color: #000000; + color: white; + border-radius: 25px; + font-size: 1rem; + text-decoration: none; + font-weight: bold; +} + +#right a.login-btn:hover { + color: black; + background-color: #ffffff; +} + + + +.container h1 { + font-size: 2rem; + margin-bottom: 20px; + text-align: center; +} + +form { + background-color: #f7e2b1; + padding: 20px; + border-radius: 10px; + box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); + max-width: 600px; + margin: 0 auto; +} + +form label { + font-size: 1rem; + margin-top: 10px; + display: block; + color: #333; +} + +form input, +form select, +form textarea { + width: 100%; + padding: 10px; + margin-top: 5px; + margin-bottom: 15px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 1rem; + font-family: inherit; +} + +form button { + width: 100%; + padding: 10px 20px; + font-size: 1rem; + color: white; + background-color: #000; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +form button:hover { + background-color: #444; +} + +.roadmap-container { + padding: 20px; + margin-top: 30px; + text-align: center; + background-color: #fff; + border-radius: 10px; + max-width: 600px; + margin: 30px auto; + box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); +} + +.roadmap-container h2 { + font-size: 1.5rem; + margin-bottom: 20px; +} + +.roadmap-container #roadmap-content { + font-size: 1rem; + color: #333; +} diff --git a/Ai-carrer-recommendation.html b/Ai-carrer-recommendation.html new file mode 100644 index 0000000..2d65942 --- /dev/null +++ b/Ai-carrer-recommendation.html @@ -0,0 +1,66 @@ + + + + + + AI Career Recommendations + + + + + +
+

AI Career Recommendation

+
+ + + + + + + + + + + + + + + + +
+ + + +
+ +
+

Your Career Roadmap

+
+

Submit your details to receive a tailored career roadmap.

+
+
+ + + + diff --git a/Ai-carrer-recommendation.js b/Ai-carrer-recommendation.js new file mode 100644 index 0000000..2a3cf34 --- /dev/null +++ b/Ai-carrer-recommendation.js @@ -0,0 +1,60 @@ +const API_KEY = 'AIzaSyAqnedwm6RPYv0OO4Q5FBNDDCIyHWmfyJU'; + +document.getElementById('career-form').addEventListener('submit', async function (event) { + event.preventDefault(); + + // Get form data + const educationLevel = document.getElementById('education-level').value; + const fieldOfStudy = document.getElementById('field-of-study').value; + const careerStage = document.getElementById('career-stage').value; + const goals = document.getElementById('goals').value; + const constraints = document.getElementById('constraints').value; + + // Prepare request data for the Gemini API + const requestData = { + contents: [{ + parts: [{ + text: `Provide career recommendations based on the following details:\n + Education Level: ${educationLevel}\n + Field of Study: ${fieldOfStudy}\n + Career Stage: ${careerStage}\n + Goals: ${goals}\n + Constraints: ${constraints}` + }] + }] + }; + + console.log('Request Data:', requestData); // Log the data being sent to API + + try { + // Make the request to the Gemini API + const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=${API_KEY}`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(requestData), + }); + + // Handle the response + if (response.ok) { + const data = await response.json(); + console.log('API Response:', data); // Log the API response + + // Check if the response contains career recommendations + if (data.candidates && data.candidates.length > 0) { + const recommendationText = data.candidates[0].content.parts[0].text || 'No content available'; + document.getElementById('recommendation-text').textContent = recommendationText; + } else { + document.getElementById('recommendation-text').textContent = 'No recommendations available at this time.'; + } + } else { + const errorData = await response.json(); + console.log('Error Data:', errorData); // Log error details + document.getElementById('recommendation-text').textContent = 'Sorry, we could not fetch recommendations at this time.'; + } + } catch (error) { + console.log('Error:', error); // Log any network error + document.getElementById('recommendation-text').textContent = 'An error occurred while fetching recommendations.'; + } +}); diff --git a/desktop.ini b/desktop.ini new file mode 100644 index 0000000..e2de8e7 --- /dev/null +++ b/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=@Lumina,0 From f577fb00ced2db1902ff6e94ed60cbbc451ec9dd Mon Sep 17 00:00:00 2001 From: jainabhishek2004 Date: Sat, 11 Jan 2025 18:06:45 +0530 Subject: [PATCH 2/4] Remove stars --- Ai-carrer-recommendation.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Ai-carrer-recommendation.js b/Ai-carrer-recommendation.js index 2a3cf34..1bbf00d 100644 --- a/Ai-carrer-recommendation.js +++ b/Ai-carrer-recommendation.js @@ -1,5 +1,4 @@ const API_KEY = 'AIzaSyAqnedwm6RPYv0OO4Q5FBNDDCIyHWmfyJU'; - document.getElementById('career-form').addEventListener('submit', async function (event) { event.preventDefault(); @@ -43,7 +42,13 @@ document.getElementById('career-form').addEventListener('submit', async function // Check if the response contains career recommendations if (data.candidates && data.candidates.length > 0) { - const recommendationText = data.candidates[0].content.parts[0].text || 'No content available'; + // Extract the recommendation text + let recommendationText = data.candidates[0].content.parts[0].text || 'No content available'; + + + recommendationText = recommendationText.replace(/\*/g, ''); // Remove stars + + // Display the sanitized recommendation text document.getElementById('recommendation-text').textContent = recommendationText; } else { document.getElementById('recommendation-text').textContent = 'No recommendations available at this time.'; From 3f61505dccc14b5bda9998e011df019cbd40098e Mon Sep 17 00:00:00 2001 From: jainabhishek2004 Date: Sun, 12 Jan 2025 00:21:23 +0530 Subject: [PATCH 3/4] Added Changes --- .hintrc | 3 ++- .../Ai-carrer-recommendation.css | 0 .../Ai-carrer-recommendation.html | 0 .../Ai-carrer-recommendation.js | 0 public/mentorship.css | 22 +++++++++++++++++++ public/mentorship.html | 13 ++++++----- 6 files changed, 32 insertions(+), 6 deletions(-) rename Ai-carrer-recommendation.css => public/Ai-carrer-recommendation.css (100%) rename Ai-carrer-recommendation.html => public/Ai-carrer-recommendation.html (100%) rename Ai-carrer-recommendation.js => public/Ai-carrer-recommendation.js (100%) diff --git a/.hintrc b/.hintrc index 1213eef..bf69daf 100644 --- a/.hintrc +++ b/.hintrc @@ -8,6 +8,7 @@ { "document-title": "off" } - ] + ], + "no-inline-styles": "off" } } \ No newline at end of file diff --git a/Ai-carrer-recommendation.css b/public/Ai-carrer-recommendation.css similarity index 100% rename from Ai-carrer-recommendation.css rename to public/Ai-carrer-recommendation.css diff --git a/Ai-carrer-recommendation.html b/public/Ai-carrer-recommendation.html similarity index 100% rename from Ai-carrer-recommendation.html rename to public/Ai-carrer-recommendation.html diff --git a/Ai-carrer-recommendation.js b/public/Ai-carrer-recommendation.js similarity index 100% rename from Ai-carrer-recommendation.js rename to public/Ai-carrer-recommendation.js diff --git a/public/mentorship.css b/public/mentorship.css index 538dbeb..e730826 100644 --- a/public/mentorship.css +++ b/public/mentorship.css @@ -253,3 +253,25 @@ html, body { .vertical-logo { font-size: 2.5vw; } +#heading{ + text-align: center; + margin-top: 20px; +} +.airecommendation-btn { + display: inline-block; + background-color: #000000; + color: #fff; + text-decoration: none; + padding: 10px 20px; + border-radius: 5px; + font-size: 16px; + font-weight: bold; + transition: background-color 0.3s ease, color 0.3s ease; +} + +.airecommendation-btn:hover { + background-color: #fff; + color: #013D4D; + border: 1px solid #013D4D; +} + diff --git a/public/mentorship.html b/public/mentorship.html index f2b9943..9351cad 100644 --- a/public/mentorship.html +++ b/public/mentorship.html @@ -20,14 +20,17 @@ Resources Events/Webinars - + +

Available Mentorships

+ +
+ AI Mentorship +
-

Available Mentorships

+

Data Science Mentorship

@@ -111,4 +114,4 @@

Get in Touch

- + \ No newline at end of file From aad2828b7c5eba32f4be4f67a8c1b45642c7e3d9 Mon Sep 17 00:00:00 2001 From: jainabhishek2004 Date: Sun, 12 Jan 2025 00:26:28 +0530 Subject: [PATCH 4/4] Corrected logo --- public/Ai-carrer-recommendation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/Ai-carrer-recommendation.html b/public/Ai-carrer-recommendation.html index 2d65942..4ebd9e5 100644 --- a/public/Ai-carrer-recommendation.html +++ b/public/Ai-carrer-recommendation.html @@ -8,7 +8,7 @@