From eae6143be1ee6c11643a9262eb0ecd6ca888b99f Mon Sep 17 00:00:00 2001 From: corsacca Date: Mon, 7 Sep 2026 11:49:24 +0100 Subject: [PATCH] Replace country pages with region dashboards (#23) * replace country pages with region dashboards - move /countries to /regions, with 301 redirects from the old URLs in every locale - add a region dashboard: a map of the region's countries with pins coloured by prayer coverage, headline figures, and prayer, adoption and engagement progress against the DOXA goals, plus a per-country table - roll up progress stats per country and region in the shared summary and serve them from /api/regions - frame region maps with antimeridian-aware bounds - add Regions to the hamburger menu and translate the new strings in all eight locales * put each region on the regions index in a card with a header band The region name links to its dashboard with the site's chevron icon, and the people-group and country counts sit centred beside it on a brand-green header; the country list is the padded white card body. --- app/components/public/CountryDetail.vue | 69 ++++++ app/components/public/CountryMap.vue | 171 +++++++++++--- app/components/public/RegionDetail.vue | 285 ++++++++++++++++++++++++ app/components/public/UupgsList.vue | 4 +- app/pages/countries/[country].vue | 90 -------- app/pages/countries/index.vue | 79 ------- app/pages/regions/[slug].vue | 65 ++++++ app/pages/regions/index.vue | 156 +++++++++++++ app/pages/research/index.vue | 2 +- app/utils/nav.ts | 1 + config/countries-meta.ts | 254 +++++++++++++++++---- i18n/locales/ar/common.json | 16 +- i18n/locales/de/common.json | 16 +- i18n/locales/en/common.json | 16 +- i18n/locales/es/common.json | 16 +- i18n/locales/fr/common.json | 16 +- i18n/locales/hi/common.json | 16 +- i18n/locales/pt/common.json | 16 +- i18n/locales/ru/common.json | 16 +- modules/country-routes.ts | 47 ---- modules/region-routes.ts | 49 ++++ nuxt.config.ts | 24 +- server/api/countries.get.ts | 7 +- server/api/regions.get.ts | 23 ++ server/utils/countries.ts | 49 ++-- 25 files changed, 1141 insertions(+), 362 deletions(-) create mode 100644 app/components/public/CountryDetail.vue create mode 100644 app/components/public/RegionDetail.vue delete mode 100644 app/pages/countries/[country].vue delete mode 100644 app/pages/countries/index.vue create mode 100644 app/pages/regions/[slug].vue create mode 100644 app/pages/regions/index.vue delete mode 100644 modules/country-routes.ts create mode 100644 modules/region-routes.ts create mode 100644 server/api/regions.get.ts diff --git a/app/components/public/CountryDetail.vue b/app/components/public/CountryDetail.vue new file mode 100644 index 00000000..24c56831 --- /dev/null +++ b/app/components/public/CountryDetail.vue @@ -0,0 +1,69 @@ + + + diff --git a/app/components/public/CountryMap.vue b/app/components/public/CountryMap.vue index 2f4f39e4..ec25d4f6 100644 --- a/app/components/public/CountryMap.vue +++ b/app/components/public/CountryMap.vue @@ -1,33 +1,42 @@ diff --git a/app/components/public/UupgsList.vue b/app/components/public/UupgsList.vue index 4393db41..a8d31ced 100644 --- a/app/components/public/UupgsList.vue +++ b/app/components/public/UupgsList.vue @@ -607,7 +607,7 @@ const showMore = computed(() => hasMore())