Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to Wikidata items #254

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Link to Wikidata items #254

wants to merge 3 commits into from

Conversation

Danysan1
Copy link

If a tag links to Wikidata (keys like wikidata=*, subject:wikidata=*, ... described here) the changes in this pull request render the Wikidata ID[s] as link[s] to the relevant Wikidata page.


An example with a single ID is the value of wikidata=* in the node 5476661921 in http://osmlab.github.io/changeset-map/#124509834 :
image
Before:

<td class="diff-property cmap-scroll-styled props-diff-deleted">Q3639645</td>

After:

<td class="diff-property cmap-scroll-styled props-diff-deleted">
  <span>
    <a target="_blank" rel="noopener noreferrer" class="cmap-wikidata-link" href="https://www.wikidata.org/wiki/Q3639645">Q3639645</a>
  </span>
</td>

An example with multiple IDs is the value of name:etymology:wikidata=* in the way 1006286770 in http://osmlab.github.io/changeset-map/#114239576 :
Immagine 2022-08-12 143018
Before:

<td class="diff-property cmap-scroll-styled props-diff-added">Q180350;Q232024;Q867690;Q59631</td>

After:

<td class="diff-property cmap-scroll-styled props-diff-added">
  <span>
    <a target="_blank" rel="noopener noreferrer" class="cmap-wikidata-link" href="https://www.wikidata.org/wiki/Q180350">Q180350</a>
    <span>;</span>
    <a target="_blank" rel="noopener noreferrer" class="cmap-wikidata-link" href="https://www.wikidata.org/wiki/Q232024">Q232024</a>
    <span>;</span>
    <a target="_blank" rel="noopener noreferrer" class="cmap-wikidata-link" href="https://www.wikidata.org/wiki/Q867690">Q867690</a>
    <span>;</span>
    <a target="_blank" rel="noopener noreferrer" class="cmap-wikidata-link" href="https://www.wikidata.org/wiki/Q59631">Q59631</a>
  </span>
</td>

This PR is related to OSMCha/osmcha-frontend#630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant