diff --git a/public/about.html b/public/about.html index 55cc741..635f547 100644 --- a/public/about.html +++ b/public/about.html @@ -12,11 +12,11 @@ @@ -122,8 +122,8 @@ Whether you're looking for your next career move or seeking top talent for your company

- Browse Jobs - Contact Us + Browse Jobs + Contact Us
@@ -142,19 +142,19 @@

Quick Links

diff --git a/public/admin/applicants.html b/public/admin/applicants.html index db3a0cd..82eb797 100644 --- a/public/admin/applicants.html +++ b/public/admin/applicants.html @@ -15,9 +15,9 @@

Ryans Recruit Admin

@@ -26,8 +26,8 @@

Your Career Success Is Our Mission

Connecting talented professionals with leading companies worldwide

- Browse Jobs - Get in Touch + Browse Jobs + Get in Touch
@@ -176,7 +176,7 @@
- View Open Positions + View Open Positions
@@ -188,8 +188,8 @@ Join thousands of professionals who have found their dream jobs through Ryans Recruit Firm

- Browse Jobs - Contact Us + Browse Jobs + Contact Us
@@ -208,19 +208,19 @@

Quick Links

diff --git a/public/jobs.html b/public/jobs.html index eb6a5c0..0b96068 100644 --- a/public/jobs.html +++ b/public/jobs.html @@ -12,11 +12,11 @@ @@ -55,19 +55,19 @@

Quick Links

diff --git a/public/js/admin.js b/public/js/admin.js index bd6e744..4798236 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -1,7 +1,7 @@ // Admin JavaScript for Ryans Recruit Firm // Check authentication on all admin pages except login -if (!window.location.pathname.includes('login.html')) { +if (!window.location.pathname.includes('login')) { checkAuth(); } @@ -11,7 +11,7 @@ async function checkAuth() { const data = await response.json(); if (!data.loggedIn) { - window.location.href = '/admin/login.html'; + window.location.href = '/admin/login'; return; } @@ -22,12 +22,12 @@ async function checkAuth() { } } catch (err) { console.error('Auth check failed:', err); - window.location.href = '/admin/login.html'; + window.location.href = '/admin/login'; } } // Login page handlers -if (window.location.pathname.includes('login.html')) { +if (window.location.pathname.includes('login')) { checkFirstAdmin(); document.getElementById('login-form')?.addEventListener('submit', handleLogin); } @@ -71,7 +71,7 @@ async function handleLogin(e) { if (response.ok) { showAlert('Login successful!', 'success'); - setTimeout(() => window.location.href = '/admin/dashboard.html', 500); + setTimeout(() => window.location.href = '/admin/dashboard', 500); } else { showAlert(result.error || 'Login failed', 'error'); } @@ -85,7 +85,7 @@ async function handleLogin(e) { } // Dashboard page -if (window.location.pathname.includes('dashboard.html')) { +if (window.location.pathname.includes('dashboard')) { loadDashboardStats(); } @@ -109,7 +109,7 @@ async function loadDashboardStats() { } // Applications page -if (window.location.pathname.includes('applicants.html')) { +if (window.location.pathname.includes('applicants')) { loadApplications(); } @@ -153,7 +153,7 @@ async function loadApplications(filters = {}) { ${new Date(app.applied_at).toLocaleDateString()} ${escapeHtml(app.status)} - View + View CV @@ -169,7 +169,7 @@ async function loadApplications(filters = {}) { } // Jobs management page -if (window.location.pathname.includes('jobs.html') && window.location.pathname.includes('admin')) { +if (window.location.pathname.includes('jobs') && window.location.pathname.includes('admin')) { loadAdminJobs(); } @@ -246,10 +246,10 @@ async function toggleJobStatus(jobId, isActive) { async function logout() { try { await fetch('/api/admin/logout', { method: 'POST' }); - window.location.href = '/admin/login.html'; + window.location.href = '/admin/login'; } catch (err) { console.error('Logout error:', err); - window.location.href = '/admin/login.html'; + window.location.href = '/admin/login'; } } diff --git a/public/js/main.js b/public/js/main.js index ed65ee5..20d763c 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,7 +1,7 @@ // Main JavaScript for Ryans Recruit Firm // Load jobs on jobs.html page -if (window.location.pathname.includes('jobs.html')) { +if (window.location.pathname.includes('jobs')) { loadJobs(); } @@ -34,7 +34,7 @@ async function loadJobs() {

${escapeHtml(job.description.substring(0, 200))}...

- Apply Now + Apply Now `).join(''); } catch (err) { @@ -45,7 +45,7 @@ async function loadJobs() { } // Handle application form on apply.html -if (window.location.pathname.includes('apply.html')) { +if (window.location.pathname.includes('apply')) { loadJobDetails(); document.getElementById('application-form')?.addEventListener('submit', handleApplicationSubmit); } @@ -96,7 +96,7 @@ async function handleApplicationSubmit(e) { if (response.ok) { showAlert('Application submitted successfully! We\'ll be in touch soon.', 'success'); form.reset(); - setTimeout(() => window.location.href = '/jobs.html', 2000); + setTimeout(() => window.location.href = '/jobs', 2000); } else { showAlert(result.error || 'Failed to submit application', 'error'); } @@ -110,7 +110,7 @@ async function handleApplicationSubmit(e) { } // Handle contact form on contact.html -if (window.location.pathname.includes('contact.html')) { +if (window.location.pathname.includes('contact')) { document.getElementById('contact-form')?.addEventListener('submit', handleContactSubmit); } diff --git a/public/services.html b/public/services.html index e99b7e6..8f79998 100644 --- a/public/services.html +++ b/public/services.html @@ -12,11 +12,11 @@ @@ -85,10 +85,10 @@

Quick Links