From b3de39a39e7a821d984f7b1f44677307cfe4828c Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 02:13:47 +0000 Subject: [PATCH] Research Gallery: "Back to homepage" leads to the DOXA site by default, in the gallery's language; a host's own home link still wins --- plugin-designs/doxa-maps-spa/EMBED.md | 2 +- plugin-designs/doxa-maps-spa/doxa-maps-spa.vue | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugin-designs/doxa-maps-spa/EMBED.md b/plugin-designs/doxa-maps-spa/EMBED.md index 243b00008..24440d849 100644 --- a/plugin-designs/doxa-maps-spa/EMBED.md +++ b/plugin-designs/doxa-maps-spa/EMBED.md @@ -61,7 +61,7 @@ Add `?tab=` to the `src` to open a specific map. | `token-url` | none | Token endpoint forwarded to each map. | | `tree-base` | derived from the script URL | Pin the tree root explicitly (needed only when the script is re-hosted apart from its tree). | | `heading` | `DX-Maps` | Shell title (shown only when the shell header is enabled). | -| `home-href` | none | Your homepage. Shows a "Back to homepage" link directly above the rail’s Collapse button (at the top of the drawer on a phone). Without it there is no link. `javascript:` and `data:` URLs are ignored. | +| `home-href` | `https://doxa.life` (with `/ar`, `/fr`, … in the gallery's language) | Your homepage, for the "Back to homepage" link directly above the rail 19s Collapse button (at the top of the drawer on a phone). Pass your own to send readers back to your site. `javascript:` and `data:` URLs are ignored. | | `home-label` | "Back to homepage" in the gallery’s language | The link’s text, in your own words. | Tab ids: `dashboard-plus-grid` (Big Picture), `research-map-plus-grid` (Simple Research), diff --git a/plugin-designs/doxa-maps-spa/doxa-maps-spa.vue b/plugin-designs/doxa-maps-spa/doxa-maps-spa.vue index 9ba1093be..76adc17c0 100644 --- a/plugin-designs/doxa-maps-spa/doxa-maps-spa.vue +++ b/plugin-designs/doxa-maps-spa/doxa-maps-spa.vue @@ -60,7 +60,7 @@ :dir="uiDir" :lang="uiLocale" :labels="layoutLabels" - :home-href="homeHref || cfg.homeHref || ''" + :home-href="homeHref || cfg.homeHref || defaultHomeHref" :home-label="homeLabel || cfg.homeLabel || ''" :title="headingText" :nav-label="t('navLabel')" @@ -833,8 +833,8 @@ export default defineComponent({ // link into one map of the gallery. Falls back to ?tab= on the page URL, then the device default. tab: { type: String, default: '' }, // The HOST's homepage: a "Back to homepage" link directly above the rail's Collapse button (a phone - // shows it at the top of the drawer). Also accepted as profile-config.homeHref / homeLabel. No URL, - // no link: the gallery never invents one, because it cannot know whose page it is on. + // shows it at the top of the drawer). Also accepted as profile-config.homeHref / homeLabel. With no URL + // from the host, the link goes to the DOXA site in the gallery's language (defaultHomeHref). homeHref: { type: String, default: '' }, homeLabel: { type: String, default: '' } }, @@ -1062,6 +1062,9 @@ export default defineComponent({ }, // The locale the gallery's OWN words render in: the effective one when it ships, else English. uiLocale() { return LOCALES.includes(this.effectiveLocale) ? this.effectiveLocale : 'en' }, + // "Back to homepage" with no host to name one (a standalone page, the published tree): the DOXA site, in the + // gallery's language. A host's home-href, or profile-config.homeHref, always wins. + defaultHomeHref() { return 'https://doxa.life' + (this.uiLocale && this.uiLocale !== 'en' ? '/' + this.uiLocale : '') }, // Direction FOLLOWS THE GALLERY'S LANGUAGE, set explicitly on the layout root (a fallthrough attr // on VerticalTabsLayout's .vtl): Arabic lays the shell out right-to-left (the layout mirrors its // rail under :dir(rtl)), every other shipped locale left-to-right — including an English gallery