Subdomain: every in-page link to /research or /regions goes to the Research Gallery subdomain
This commit is contained in:
parent
0a0bfdf8b3
commit
50dcf627ad
9 changed files with 34 additions and 8 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Per-country page body: a map that highlights the country and plots its
|
||||
// people groups (plus surrounding ones, muted), alongside the people-group list
|
||||
// locked to this country. The summary (name, code, count, region, map
|
||||
|
|
@ -34,7 +35,7 @@ const mapNote = computed(() =>
|
|||
<template>
|
||||
<div class="container page-content uupgs-page stack stack--3xl">
|
||||
<div class="stack stack--xs text-center">
|
||||
<NuxtLink class="light-link" :to="localePath('/regions')">← {{ t('All Regions') }}</NuxtLink>
|
||||
<NuxtLink class="light-link" :to="researchGallery('regions-dashboard')" external>← {{ t('All Regions') }}</NuxtLink>
|
||||
<h1 class="highlight" data-highlight-last>{{ country.name }}</h1>
|
||||
<p class="color-brand-lighter">
|
||||
{{ country.count }} {{ t('People Groups') }} ·
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Region dashboard body: headline figures, a map of the region's countries
|
||||
// with its people groups coloured by prayer coverage, progress toward the DOXA
|
||||
// goals — prayer coverage, adoption, engagement — and a per-country breakdown
|
||||
|
|
@ -45,7 +46,7 @@ const mapNote = computed(() =>
|
|||
<template>
|
||||
<div class="container page-content uupgs-page stack stack--3xl">
|
||||
<div class="stack stack--xs text-center">
|
||||
<NuxtLink class="light-link" :to="localePath('/regions')">← {{ t('All Regions') }}</NuxtLink>
|
||||
<NuxtLink class="light-link" :to="researchGallery('regions-dashboard')" external>← {{ t('All Regions') }}</NuxtLink>
|
||||
<h1 class="highlight" data-highlight-last>{{ label }}</h1>
|
||||
<p class="color-brand-lighter">{{ summaryLine }}</p>
|
||||
</div>
|
||||
|
|
|
|||
18
app/composables/useResearchGalleryUrl.ts
Normal file
18
app/composables/useResearchGalleryUrl.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// The Research Gallery lives on its own subdomain (the Plugin Studio container), so every link that
|
||||
// went to this site's /research or /regions page goes there instead (NUXT_PUBLIC_RESEARCH_GALLERY_URL).
|
||||
// A view is opened with ?tab=<view id> (for example 'regions-dashboard'). The /research and /regions
|
||||
// pages themselves are kept; nothing links to them any more.
|
||||
export function useResearchGalleryUrl() {
|
||||
const config = useRuntimeConfig()
|
||||
const base = String((config.public as { researchGalleryUrl?: string }).researchGalleryUrl || '')
|
||||
return (tab?: string): string => {
|
||||
if (!tab) return base
|
||||
try {
|
||||
const u = new URL(base)
|
||||
u.searchParams.set('tab', tab)
|
||||
return u.toString()
|
||||
} catch {
|
||||
return base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/404.php. Nuxt's `error.vue` replaces the root
|
||||
// app when an error is thrown (including nuxt's built-in 404). Wraps the
|
||||
// message in the public default layout so header/footer still render.
|
||||
|
|
@ -24,7 +25,7 @@ const localePath = useLocalePath()
|
|||
<li><NuxtLink :to="localePath('/')">{{ t('Home') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="localePath('/pray')">{{ t('Pray') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="localePath('/adopt')">{{ t('Adopt') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="localePath('/research')">{{ t('Research') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="researchGallery()" external>{{ t('Research') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="localePath('/about')">{{ t('About') }}</NuxtLink></li>
|
||||
<li><NuxtLink :to="localePath('/contact')">{{ t('Contact') }}</NuxtLink></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/page-adopt.php.
|
||||
|
||||
import { buildUupgListTranslations } from '~/utils/uupgListTranslations'
|
||||
|
|
@ -89,7 +90,7 @@ useTextHighlight()
|
|||
</div>
|
||||
<DoxaMapSlot map-id="adopt-map" :profile-config="adoptMapConfig" class="rounded-md" />
|
||||
<NuxtLink
|
||||
:to="localePath('/research')"
|
||||
:to="researchGallery()" external
|
||||
class="research-map-link"
|
||||
>
|
||||
Explore our research maps →
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/front-page.php.
|
||||
// Each <section> mirrors the PHP source in the same order with the same
|
||||
// CUBE classes, data attributes, asset paths, and strings. Dynamic bits
|
||||
|
|
@ -116,7 +117,7 @@ useTextHighlight()
|
|||
</div>
|
||||
<DoxaMapSlot map-id="home-map" :profile-config="homeMapConfig" class="rounded-xlg" />
|
||||
<NuxtLink
|
||||
:to="localePath('/research')"
|
||||
:to="researchGallery()" external
|
||||
class="research-map-link"
|
||||
>
|
||||
Explore our research maps →
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/page-pray.php.
|
||||
|
||||
import { buildUupgListTranslations } from '~/utils/uupgListTranslations'
|
||||
|
|
@ -121,7 +122,7 @@ useTextHighlight()
|
|||
<h2>{{ t('Prayer Progress') }}</h2>
|
||||
<DoxaMapSlot map-id="pray-map" :profile-config="prayMapConfig" class="rounded-md" />
|
||||
<NuxtLink
|
||||
:to="localePath('/research')"
|
||||
:to="researchGallery()" external
|
||||
class="research-map-link"
|
||||
>
|
||||
Explore our research maps →
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/template-uupg-detail.php.
|
||||
// Fetches the people group by slug from
|
||||
// `{prayBaseUrl}/api/people-groups/detail/{slug}?lang={locale}` and renders
|
||||
|
|
@ -155,7 +156,7 @@ const mapSrc = computed(() => {
|
|||
<div class="stack stack--lg">
|
||||
<h1>{{ t('People Group Not Found') }}</h1>
|
||||
<p>{{ t('The people group you are looking for could not be found. Please try again.') }}</p>
|
||||
<NuxtLink :to="localePath('/research')" class="button font-size-lg">
|
||||
<NuxtLink :to="researchGallery()" external class="button font-size-lg">
|
||||
<span class="sr-only">{{ t('Back') }}</span>
|
||||
<svg class="icon | rotate-270" viewBox="0 0 489.67 289.877">
|
||||
<path d="M439.017,211.678L263.258,35.919c-3.9-3.9-8.635-6.454-13.63-7.665-9.539-2.376-20.051.161-27.509,7.619L46.361,211.632c-11.311,11.311-11.311,29.65,0,40.961h0c11.311,11.311,29.65,11.311,40.961,0L242.667,97.248l155.39,155.39c11.311,11.311,29.65,11.311,40.961,0h0c11.311-11.311,11.311-29.65,0-40.961Z" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const researchGallery = useResearchGalleryUrl() // /research and /regions moved to the gallery's subdomain
|
||||
// Port of marketing-theme/template-uupg-resources.php (WP rewrite
|
||||
// /research/{slug}/resources/ → template-uupg-resources.php). Fetches
|
||||
// the people group by slug from
|
||||
|
|
@ -127,7 +128,7 @@ async function handleDownloadClick(e: MouseEvent) {
|
|||
<div class="stack stack--lg">
|
||||
<h1>{{ t('People Group Not Found') }}</h1>
|
||||
<p>{{ t('The people group you are looking for could not be found. Please try again.') }}</p>
|
||||
<NuxtLink :to="localePath('/research')" class="button font-size-lg">
|
||||
<NuxtLink :to="researchGallery()" external class="button font-size-lg">
|
||||
<span class="sr-only">{{ t('Back') }}</span>
|
||||
<svg class="icon | rotate-270" viewBox="0 0 489.67 289.877">
|
||||
<path d="M439.017,211.678L263.258,35.919c-3.9-3.9-8.635-6.454-13.63-7.665-9.539-2.376-20.051.161-27.509,7.619L46.361,211.632c-11.311,11.311-11.311,29.65,0,40.961h0c11.311,11.311,29.65,11.311,40.961,0L242.667,97.248l155.39,155.39c11.311,11.311,29.65,11.311,40.961,0h0c11.311-11.311,11.311-29.65,0-40.961Z" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue