forked from MapComplete/MapComplete
Merge branch 'develop' of source.mapcomplete.org:MapComplete/MapComplete into develop
This commit is contained in:
commit
c71036d6c6
10 changed files with 206 additions and 15 deletions
|
@ -30,17 +30,20 @@
|
|||
}
|
||||
|
||||
const url = tag2linkData.find((item) => item.key === `Key:${key}`)?.url
|
||||
|
||||
const values: string[] =
|
||||
typeof $tags[key] === "string" ? $tags[key].split(";").map((v: string) => v.trim()) : []
|
||||
</script>
|
||||
|
||||
{#if url}
|
||||
<a
|
||||
href={url.replace("$1", $tags[key])}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="tag-link"
|
||||
>
|
||||
{$tags[key]}
|
||||
</a>
|
||||
{#if url && values.length > 0}
|
||||
{#each values as value, index}
|
||||
<span class="tag-link">
|
||||
{#if index > 0}; {/if}
|
||||
<a href={url.replace("$1", value)} target="_blank" rel="noopener noreferrer" class="tag-link">
|
||||
{value}
|
||||
</a>
|
||||
</span>
|
||||
{/each}
|
||||
{:else}
|
||||
{$tags[key]}
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue