Renaming dashboard to home
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s

This commit is contained in:
Tudor
2026-01-08 22:59:55 +00:00
parent 1d19c88e49
commit 34f40c0c1c
2 changed files with 9 additions and 9 deletions

View File

@@ -203,13 +203,13 @@ function renderLoadingSkeleton(count, type = "card") {
// =============================================================================
const routes = {
"/": "dashboard",
"/": "home",
"/compare": "compare",
"/rankings": "rankings",
};
const pageTitles = {
dashboard: "SchoolCompare | Compare Primary School Performance",
home: "SchoolCompare | Compare Primary School Performance",
compare: "Compare Schools | SchoolCompare",
rankings: "School Rankings | SchoolCompare",
};
@@ -222,10 +222,10 @@ function navigateTo(path) {
function handleRoute() {
const path = window.location.pathname;
const view = routes[path] || "dashboard";
const view = routes[path] || "home";
// Update page title for SEO
document.title = pageTitles[view] || pageTitles.dashboard;
document.title = pageTitles[view] || pageTitles.home;
// Update navigation
document.querySelectorAll(".nav-link").forEach((link) => {
@@ -280,7 +280,7 @@ async function init() {
}
function populateFilters(data) {
// Populate local authority filter (dashboard)
// Populate local authority filter (home page)
data.local_authorities.forEach((la) => {
const option = document.createElement("option");
option.value = la;
@@ -1171,7 +1171,7 @@ function setupEventListeners() {
link.addEventListener("click", (e) => {
e.preventDefault();
const view = link.dataset.view;
const path = view === "dashboard" ? "/" : `/${view}`;
const path = view === "home" ? "/" : `/${view}`;
navigateTo(path);
});
});

View File

@@ -80,7 +80,7 @@
</div>
</a>
<nav class="nav">
<a href="/" class="nav-link active" data-view="dashboard">Dashboard</a>
<a href="/" class="nav-link active" data-view="home">Home</a>
<a href="/compare" class="nav-link" data-view="compare">Compare</a>
<a href="/rankings" class="nav-link" data-view="rankings">Rankings</a>
</nav>
@@ -88,8 +88,8 @@
</header>
<main class="main">
<!-- Dashboard View -->
<section id="dashboard-view" class="view active">
<!-- Home View -->
<section id="home-view" class="view active">
<div class="hero">
<h1 class="hero-title">Compare Primary School Performance</h1>
<p class="hero-subtitle">Search and compare KS2 results across England's primary schools</p>