Add wikidata fallback if wikipedia is missing
This commit is contained in:
parent
926149cbcb
commit
08c4ba8dd9
2 changed files with 15 additions and 1 deletions
6
assets/svg/wikidata.svg
Normal file
6
assets/svg/wikidata.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.2" width="1050" height="590">
|
||||
<path d="m 120,545 h 30 V 45 H 120 V 545 z m 60,0 h 90 V 45 H 180 V 545 z M 300,45 V 545 h 90 V 45 h -90 z" style="fill:#990000" />
|
||||
<path d="m 840,545 h 30 V 45 H 840 V 545 z M 900,45 V 545 h 30 V 45 H 900 z M 420,545 h 30 V 45 H 420 V 545 z M 480,45 V 545 h 30 V 45 h -30 z" style="fill:#339966" />
|
||||
<path d="m 540,545 h 90 V 45 h -90 V 545 z m 120,0 h 30 V 45 H 660 V 545 z M 720,45 V 545 h 90 V 45 H 720 z" style="fill:#006699" />
|
||||
</svg>
|
After Width: | Height: | Size: 621 B |
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"wikipedialink": {
|
||||
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank'><img src='./assets/svg/wikipedia.svg' alt='WP'/></a>",
|
||||
"condition": "wikipedia~*"
|
||||
"condition": "wikipedia~*",
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": ["wikipedia=","wikidata~*"],
|
||||
"then": "<a href='https://www.wikidata.org/wiki/{wikidata}' target='_blank'><img src='./assets/svg/wikidata.svg' alt='WD'/></a>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"phonelink": {
|
||||
"render": "<a href='tel:{phone}'><img src='./assets/svg/phone.svg'/></a>",
|
||||
|
|
Loading…
Reference in a new issue