Consolidate to a single map output location (per Driver): remove the stale flat public/js/*.js bundles and move the drop-in to public/js/doxa-maps-build/. Rewired useDoxaMap to /js/doxa-maps-build/doxa-maps/<bundle>/<bundle>.js and fixed page comments.
62 lines
2.3 KiB
Vue
62 lines
2.3 KiB
Vue
<script setup lang="ts">
|
|
// Port of marketing-theme/page-uupgs.php.
|
|
// Matches the PHP markup verbatim: container page-content uupgs-page stack
|
|
// stack--3xl + a highlighted h1 + the <UupgsList> component. The
|
|
// `initialSearchTerm` is taken from the `uupg_search` query parameter
|
|
// (PHP equivalent: `get_query_var('uupg_search')`).
|
|
//
|
|
// Below the UupgsList we embed the 5-tab `research-map` IIFE built from
|
|
// the upstream DOXA-MAPS module — exposes Engagement / Prayer
|
|
// / Adoption (clones of doxa-simple-map) plus Language Families. The
|
|
// the doxa-maps build now publishes /js/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (canonical name).
|
|
// via the publishToDoxaLife() plugin.
|
|
|
|
import { buildUupgListTranslations } from '~/utils/uupgListTranslations'
|
|
|
|
const { t, locale } = useI18n()
|
|
const localePath = useLocalePath()
|
|
const route = useRoute()
|
|
|
|
const initialSearchTerm = computed(() =>
|
|
(Array.isArray(route.query.uupg_search) ? route.query.uupg_search[0] : route.query.uupg_search) ?? ''
|
|
)
|
|
|
|
const translations = computed(() => buildUupgListTranslations(t))
|
|
|
|
const runtimeConfig = useRuntimeConfig()
|
|
const researchProfileConfig = computed(() => JSON.stringify({
|
|
profile: 'research-map',
|
|
tk: (runtimeConfig.public as { mapboxToken?: string }).mapboxToken || '',
|
|
dataSource: 'pray-tools',
|
|
instanceId: 'research-page'
|
|
}))
|
|
|
|
useTextHighlight()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="container page-content uupgs-page stack stack--3xl">
|
|
<div class="stack stack--xs text-center">
|
|
<h1 class="highlight" data-highlight-last>{{ t('Find a UUPG') }}</h1>
|
|
<p><NuxtLink class="light-link" :to="localePath('/regions')">{{ t('By Region') }} →</NuxtLink></p>
|
|
</div>
|
|
|
|
<!-- Research map embed — sits directly under the H1, above the UUPG
|
|
search bar. Loads /js/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (auto-published from
|
|
the upstream module on every research-mfe build). -->
|
|
<DoxaMapSlot
|
|
map-id="research-page-map"
|
|
bundle="research-map"
|
|
:profile-config="researchProfileConfig"
|
|
class="rounded-xlg"
|
|
/>
|
|
|
|
<UupgsList
|
|
:language-code="locale"
|
|
:research-url="localePath('/research') + '/'"
|
|
:t="translations"
|
|
:initial-search-term="initialSearchTerm"
|
|
hide-see-all-link
|
|
/>
|
|
</div>
|
|
</template>
|