diff --git a/Styles/auth.css b/Styles/auth.css index 2900de3..ffc69e8 100644 --- a/Styles/auth.css +++ b/Styles/auth.css @@ -115,6 +115,38 @@ margin-top: 0.25rem; } +/* Password Visibility Toggle */ +.password-wrapper { + position: relative; + display: flex; + align-items: center; +} + +.password-wrapper input { + width: 100%; + padding-right: 2.5rem; +} + +.password-toggle { + position: absolute; + right: 0.5rem; + background: none; + border: none; + cursor: pointer; + color: var(--text); + padding: 0.25rem; + font-size: 1.1rem; + display: flex; + align-items: center; + justify-content: center; + opacity: 0.6; + transition: opacity 0.2s; +} + +.password-toggle:hover { + opacity: 1; +} + /* Responsive Design */ @media (max-width: 480px) { .auth-card { diff --git a/Styles/main.css b/Styles/main.css index 83dd353..9ab1144 100644 --- a/Styles/main.css +++ b/Styles/main.css @@ -1138,6 +1138,40 @@ ul li i.fa-check { color: var(--light-text); } +/* Scroll to Top Button */ +#scrollToTop { + position: fixed; + bottom: 2rem; + right: 2rem; + width: 44px; + height: 44px; + background: var(--secondary-color); + color: white; + border: none; + border-radius: 50%; + cursor: pointer; + font-size: 1.25rem; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 2px 10px rgba(0,0,0,0.2); + opacity: 0; + visibility: hidden; + transform: translateY(10px); + transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease; + z-index: 999; +} + +#scrollToTop.visible { + opacity: 1; + visibility: visible; + transform: translateY(0); +} + +#scrollToTop:hover { + background: var(--primary-color); +} + /* Responsive Modal */ @media (max-width: 768px) { .modal-content { diff --git a/admin.html b/admin.html index aa0c2b7..1067321 100644 --- a/admin.html +++ b/admin.html @@ -3,7 +3,7 @@ - EduBridge Admin Dashboard + EduBridge | Admin @@ -317,8 +317,24 @@

Follow Us

+ + + diff --git a/ai.html b/ai.html index b185ae7..6b9ccbd 100644 --- a/ai.html +++ b/ai.html @@ -3,7 +3,7 @@ - AI & Machine Learning - EduBridge + EduBridge | AI Assistant @@ -474,6 +474,21 @@

Follow Us

closeVideo(); } } + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file diff --git a/backend/app b/backend/app index eff349f..bf17ec8 100644 --- a/backend/app +++ b/backend/app @@ -1,8 +1,9 @@ +import os from flask import Flask, request, jsonify import openai -# Set up your OpenAI API key -openai.api_key = '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' +# Set up your OpenAI API key using environment variable +openai.api_key = os.getenv('OPENAI_API_KEY') app = Flask(__name__) diff --git a/career.html b/career.html index 0a840e8..f798815 100644 --- a/career.html +++ b/career.html @@ -3,7 +3,7 @@ - Career Guidance - EduBridge + EduBridge | Career Guidance @@ -516,6 +516,21 @@

Follow Us

closeVideo(); } } + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file diff --git a/forgot-password.html b/forgot-password.html new file mode 100644 index 0000000..d67cd18 --- /dev/null +++ b/forgot-password.html @@ -0,0 +1,158 @@ + + + + + + EduBridge | Forgot Password + + + + + +
+ +
+ +
+
+

Forgot Password

+

Enter your registered email address and we'll send you a link to reset your password.

+
+
+ + +
+ +
+ +
+
+ + + + + + + + diff --git a/index.html b/index.html index edf7b35..d8f91c9 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - EduBridge - Learn Tech Skills + EduBridge | Home @@ -243,7 +243,24 @@

Follow Us

// Load chatbot when the page is ready document.addEventListener('DOMContentLoaded', loadChatbot); + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + if (scrollBtn) { + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + } + + diff --git a/login.html b/login.html index 6b8d607..183fed0 100644 --- a/login.html +++ b/login.html @@ -3,7 +3,7 @@ - Login - EduBridge + EduBridge | Login @@ -51,7 +51,12 @@

Login to EduBridge

- +
+ + +
@@ -133,6 +138,38 @@

Follow Us

} }); } + + // Password Visibility Toggle + document.querySelectorAll('.password-toggle').forEach(btn => { + btn.addEventListener('click', () => { + const input = btn.closest('.password-wrapper').querySelector('input'); + const icon = btn.querySelector('i'); + if (input.type === 'password') { + input.type = 'text'; + icon.classList.replace('fa-eye', 'fa-eye-slash'); + } else { + input.type = 'password'; + icon.classList.replace('fa-eye-slash', 'fa-eye'); + } + }); + }); + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + if (scrollBtn) { + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + } + + \ No newline at end of file diff --git a/profile.html b/profile.html index cc0143b..d6636b4 100644 --- a/profile.html +++ b/profile.html @@ -3,7 +3,7 @@ - My Profile - EduBridge + EduBridge | Profile @@ -296,6 +296,21 @@

${course.name}

messageDiv.remove(); }, 3000); } + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file diff --git a/quiz.html b/quiz.html index beb7c9d..8b94cde 100644 --- a/quiz.html +++ b/quiz.html @@ -3,7 +3,7 @@ - EduBridge - Course Quizzes + EduBridge | Quiz @@ -227,6 +227,21 @@

Follow Us

authButtons.style.display = 'block'; } }); + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file diff --git a/register.html b/register.html index 4947545..9858d25 100644 --- a/register.html +++ b/register.html @@ -3,7 +3,7 @@ - Register - EduBridge + EduBridge | Register @@ -55,11 +55,21 @@

Create an Account

- +
+ + +
- +
+ + +
@@ -148,6 +158,36 @@

Follow Us

} }); } + + // Password Visibility Toggle + document.querySelectorAll('.password-toggle').forEach(btn => { + btn.addEventListener('click', () => { + const input = btn.closest('.password-wrapper').querySelector('input'); + const icon = btn.querySelector('i'); + if (input.type === 'password') { + input.type = 'text'; + icon.classList.replace('fa-eye', 'fa-eye-slash'); + } else { + input.type = 'password'; + icon.classList.replace('fa-eye-slash', 'fa-eye'); + } + }); + }); + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file diff --git a/scripts/auth.js b/scripts/auth.js index 2dacc5b..a98f2c5 100644 --- a/scripts/auth.js +++ b/scripts/auth.js @@ -66,6 +66,21 @@ class Auth { getCurrentUser() { return this.currentUser; } + + // Update user data + updateUser(userId, updates) { + const index = this.users.findIndex(user => user.id === userId); + if (index === -1) { + return { success: false, message: 'User not found' }; + } + this.users[index] = { ...this.users[index], ...updates }; + localStorage.setItem('users', JSON.stringify(this.users)); + if (this.currentUser && this.currentUser.id === userId) { + this.currentUser = this.users[index]; + localStorage.setItem('currentUser', JSON.stringify(this.currentUser)); + } + return { success: true, message: 'User updated successfully' }; + } } // Initialize auth instance diff --git a/server/index.js b/server/index.js index b79154e..a611e97 100644 --- a/server/index.js +++ b/server/index.js @@ -2,7 +2,6 @@ const express = require('express'); const bodyParser = require('body-parser'); const dotenv = require('dotenv'); const path = require('path'); -const chatbotRouter = require('./chatbot'); // Load environment variables dotenv.config(); @@ -15,7 +14,6 @@ app.use(bodyParser.json()); app.use(express.static(path.join(__dirname, '..'))); // Routes -app.use('/api', chatbotRouter); // Start server app.listen(PORT, () => { diff --git a/server/server.js b/server/server.js index 926e5f4..0a34f6b 100644 --- a/server/server.js +++ b/server/server.js @@ -25,7 +25,7 @@ app.post('/chat', async (req, res) => { temperature: 0.7 }, { headers: { - 'Authorization': `Bearer YOUR_OPENAI_API_KEY` // Replace with your actual OpenAI API Key + 'Authorization': `Bearer ${OPENAI_API_KEY}` } }); diff --git a/webdev.html b/webdev.html index 701d3a5..71bbdcb 100644 --- a/webdev.html +++ b/webdev.html @@ -3,7 +3,7 @@ - Web Development - EduBridge + EduBridge | Web Development @@ -414,6 +414,21 @@

Follow Us

closeVideo(); } } + + // Scroll to Top + const scrollBtn = document.getElementById('scrollToTop'); + window.addEventListener('scroll', () => { + if (window.scrollY > 300) { + scrollBtn.classList.add('visible'); + } else { + scrollBtn.classList.remove('visible'); + } + }); + scrollBtn.addEventListener('click', () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + + \ No newline at end of file