Country click now filters the dashboard's tables too, instead of leaving the page
The language link was fixed last change; the country link had the identical defect and answers the brief's SECOND requirement. "Every resource used in Indonesia" was an <a href="../data-tables/index.html?tab=links&country=IDN">, so inside the composite, clicking a country to see its resources navigated away from the composite to do it. Both controls now split the same way: a button that filters the tables below when they are on screen, an anchor when they are not. Verified against an offline expectation rather than read off the page. Counting the links table for rows whose country_codes contain IDN gives 400. In the dashboard the control is a BUTTON, the URL stays on gospel-dashboard/index.html, and the banner reads "Showing 400 of 6,498 resources for Indonesia" — the same 400. Standalone it is still an <a> to data-tables/index.html?tab=links&country=IDN&label=Indonesia, so nothing changed for the map on its own page. No page errors on either. Screenshot read: the filtered rows are real Indonesian-language resources across five sources — JESUS Film, Faith Comes By Hearing audio and Bible video, Cru's Four Spiritual Laws, eBible and Zume — with a "Show all" escape beside the count.
This commit is contained in:
parent
8fa1051593
commit
ecdf71cdbd
9 changed files with 42 additions and 34 deletions
|
|
@ -1286,8 +1286,16 @@ useShadowStyles(
|
|||
set than the pins, so it is not a share of the numbers above.
|
||||
</p>
|
||||
|
||||
<a class="gm-tablink" :href="tableLink({ country: selected.iso3 || '', label: selected.country || '' })"
|
||||
v-if="selected.iso3">
|
||||
<!-- Same split as the language link above: a filter when the tables are already on
|
||||
screen beneath this map, a link when they are not. This is the brief's SECOND
|
||||
requirement — click a country, see its resources — and in the composite it was
|
||||
answering by leaving the composite. -->
|
||||
<button v-if="selected.iso3 && composed" type="button" class="gm-tablink"
|
||||
@click="filterComposedTables({ country: selected.iso3, label: selected.country || '' })">
|
||||
Every resource used in {{ selected.country }} ↓
|
||||
</button>
|
||||
<a v-else-if="selected.iso3" class="gm-tablink"
|
||||
:href="tableLink({ country: selected.iso3 || '', label: selected.country || '' })">
|
||||
Every resource used in {{ selected.country }} →
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
2
public/doxa-maps/index.html
generated
2
public/doxa-maps/index.html
generated
File diff suppressed because one or more lines are too long
12
public/doxa-maps/manifest.json
generated
12
public/doxa-maps/manifest.json
generated
|
|
@ -591,7 +591,7 @@
|
|||
"bundle": "gospel-resources",
|
||||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"output": "doxa-maps/gospel-resources/gospel-resources.js",
|
||||
"integrity": "sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v",
|
||||
"integrity": "sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+",
|
||||
"elements": [
|
||||
"gospel-resources-map"
|
||||
],
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/charts/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -625,7 +625,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/data-tables/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -639,7 +639,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/gospel-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -653,7 +653,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -667,7 +667,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-vNmX1DM5q5xc3UV7jhe+smRxDkndQf6XWL2N+EFcrJACMDfGOSsIiyCxwXsOeU9v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-dUaNPAlvcB4Bj6qHuoTQ+b+WOzhxz+2Le2WvFMHZkuQwnlinnFZk8/kfVtaYSek+\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue