Renaming dashboard to home
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user