Remove .html extensions from all links and URLs

- Updated all navigation links in HTML files
- Updated all hrefs and window.location redirects in JavaScript
- All links now use clean URLs without .html extensions
- Improves SEO and provides cleaner user experience
This commit is contained in:
Mikael Westöö
2026-01-23 22:40:26 +01:00
parent 2d6b2eece2
commit 61269bb9a4
11 changed files with 103 additions and 103 deletions

View File

@@ -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() {
</div>
</div>
<p class="job-description">${escapeHtml(job.description.substring(0, 200))}...</p>
<a href="/apply.html?job=${job.id}" class="btn btn-primary">Apply Now</a>
<a href="/apply?job=${job.id}" class="btn btn-primary">Apply Now</a>
</div>
`).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);
}