Skip to content

Commit b6ec0aa

Browse files
authored
Merge pull request #24 from GTIF-Austria/providers-page-styling
fix: indicator code, multiple providers per narrative support
2 parents 677cb55 + 32fe4ff commit b6ec0aa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

providers/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ layout: page
1919
const narratives = ref([]);
2020

2121
const getIndicatorsForProvider = (providerKey) => indicators.value.filter(i => i.providers?.includes(providerKey));
22-
const getNarrativesForProvider = (providerKey) => narratives.value.filter(n => n.provider === providerKey);
22+
const getNarrativesForProvider = (providerKey) => narratives.value.filter(n => n.provider?.includes(providerKey));
2323

2424
onMounted(async () => {
2525
const cacheBuster = `?t=${new Date().getTime()}`; // Add a timestamp for cache busting
@@ -44,8 +44,8 @@ layout: page
4444
title: provider.id,
4545
content: `
4646
${provider.Description}${provider['NoR Offering'] ? `<br /><br /><a class="primary-text" href='${provider['NoR Offering']}' target='_blank'>NoR Offering</a>` : ''}
47-
${provider.narratives?.length ? `<br /><br />Narratives:<br />${provider.narratives.map(n => `<a class="primary-text" href='${withBase(`/narratives/${n.file.split(/\/|\\/).pop().replace('.md', '')}`)}'>${n.title}</a>`).join('<br />')}` : ''}
48-
${provider.indicators?.length ? `<br /><br />Datasets:<br /> ${provider.indicators.map(i => `<a class="primary-text" href='${withBase(`/explore/?indicator=${i.code}`)}'>${i.title}</a>`).join('<br />')}` : ''}
47+
${provider.narratives?.length ? `<br /><br />Narratives:<br />${provider.narratives.map(n => `<a class="primary-text" href='${withBase(`/narratives/${n.file.split(/\/|\\/).pop().replace('.md', '')}`)}'>· ${n.title}</a>`).join('<br />')}` : ''}
48+
${provider.indicators?.length ? `<br /><br />Datasets:<br /> ${provider.indicators.map(i => `<a class="primary-text" href='${withBase(`/explore/?indicator=${i.id}`)}'>· ${i.title}</a>`).join('<br />')}` : ''}
4949
`,
5050
icon: {
5151
html: `<img src="${provider.Logo}" alt="${provider.id} logo" style="height: 100%; width: auto" />`,
@@ -59,3 +59,4 @@ layout: page
5959
})
6060
</script>
6161
62+

0 commit comments

Comments
 (0)