SEO improvements
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m0s

This commit is contained in:
Tudor
2026-01-08 11:47:38 +00:00
parent 71b05769ae
commit 0aafdfa382
5 changed files with 98 additions and 0 deletions

View File

@@ -208,6 +208,12 @@ const routes = {
"/rankings": "rankings",
};
const pageTitles = {
dashboard: "SchoolCompare | Compare Primary School Performance",
compare: "Compare Schools | SchoolCompare",
rankings: "School Rankings | SchoolCompare",
};
function navigateTo(path) {
// Update URL without reload
window.history.pushState({}, "", path);
@@ -218,6 +224,9 @@ function handleRoute() {
const path = window.location.pathname;
const view = routes[path] || "dashboard";
// Update page title for SEO
document.title = pageTitles[view] || pageTitles.dashboard;
// Update navigation
document.querySelectorAll(".nav-link").forEach((link) => {
link.classList.toggle("active", link.dataset.view === view);