2020-11-21 15:36:05 +01:00
|
|
|
|
{
|
2022-01-21 14:55:58 +01:00
|
|
|
|
"id": "shared_icons",
|
2021-12-21 18:35:31 +01:00
|
|
|
|
"defaults": {
|
|
|
|
|
"builtin": [
|
|
|
|
|
"phonelink",
|
|
|
|
|
"emaillink",
|
|
|
|
|
"wikipedialink",
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"smokingicon",
|
2021-12-21 18:35:31 +01:00
|
|
|
|
"osmlink",
|
|
|
|
|
"sharelink"
|
|
|
|
|
],
|
|
|
|
|
"override": {}
|
|
|
|
|
},
|
2020-11-24 12:52:01 +01:00
|
|
|
|
"wikipedialink": {
|
2022-05-26 14:22:48 +02:00
|
|
|
|
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank'><img src='./assets/svg/wikipedia.svg' textmode='\uD83D\uDCD6' alt='Wikipedia'/></a>",
|
2021-07-10 19:21:27 +02:00
|
|
|
|
"condition": {
|
|
|
|
|
"or": [
|
|
|
|
|
"wikipedia~*",
|
|
|
|
|
"wikidata~*"
|
|
|
|
|
]
|
|
|
|
|
},
|
2020-11-28 01:43:51 +01:00
|
|
|
|
"mappings": [
|
|
|
|
|
{
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"#": "ignore-image-in-then",
|
2021-07-10 19:21:27 +02:00
|
|
|
|
"if": "wikipedia=",
|
2020-12-02 21:23:23 +01:00
|
|
|
|
"then": "<a href='https://www.wikidata.org/wiki/{wikidata}' target='_blank'><img src='./assets/svg/wikidata.svg' alt='WD'/></a>"
|
2020-11-28 01:43:51 +01:00
|
|
|
|
}
|
|
|
|
|
]
|
2020-11-24 12:52:01 +01:00
|
|
|
|
},
|
2020-12-06 00:20:27 +01:00
|
|
|
|
"isOpen": {
|
|
|
|
|
"#": "Shows a coloured clock if opening hours are parsed. Uses the metatagging, suitable to use as a (badged) overlay",
|
|
|
|
|
"mappings": [
|
|
|
|
|
{
|
|
|
|
|
"if": "_isOpen=yes",
|
|
|
|
|
"then": "clock:#0f0;ring:#0f0"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"if": "_isOpen=no",
|
|
|
|
|
"then": "circle:#f00;clock:#fff"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"#": "Still loading the country",
|
|
|
|
|
"if": {
|
|
|
|
|
"and": [
|
|
|
|
|
"_isOpen=",
|
|
|
|
|
"opening_hours~*"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"then": "clock:#ff0;ring:#ff0"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"#": "Still loading the country",
|
|
|
|
|
"if": {
|
|
|
|
|
"and": [
|
|
|
|
|
"_isOpen=parse_error",
|
|
|
|
|
"opening_hours~*"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"then": "circle:#f0f;clock:#fff"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2020-11-24 12:52:01 +01:00
|
|
|
|
"phonelink": {
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"render": "<a href='tel:{phone}'><img textmode='\uD83D\uDCDE' alt='phone' src='./assets/tagRenderings/phone.svg'/></a>",
|
2020-11-24 12:52:01 +01:00
|
|
|
|
"condition": "phone~*"
|
|
|
|
|
},
|
|
|
|
|
"emaillink": {
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"render": "<a href='mailto:{email}'><img textmode='✉️' alt='email' src='./assets/tagRenderings/send_email.svg'/></a>",
|
2020-11-24 12:52:01 +01:00
|
|
|
|
"condition": "email~*"
|
|
|
|
|
},
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"smokingicon": {
|
|
|
|
|
"mappings": [
|
|
|
|
|
{
|
|
|
|
|
"#": "ignore-image-in-then",
|
|
|
|
|
"if": "smoking=no",
|
|
|
|
|
"then": "<img textmode='\uD83D\uDEAD️' alt='no-smoking' src='./assets/tagRenderings/no_smoking.svg'/>"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"#": "ignore-image-in-then",
|
|
|
|
|
"if": "smoking=yes",
|
|
|
|
|
"then": "<img textmode='\uD83D\uDEAC️' alt='smoking-allowed' src='./assets/tagRenderings/smoking.svg'/>"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2020-11-21 16:44:48 +01:00
|
|
|
|
"osmlink": {
|
2022-05-26 14:22:48 +02:00
|
|
|
|
"render": "<a href='https://openstreetmap.org/{id}' target='_blank'><img alt='on osm' textmode='\uD83D\uDDFA️' src='./assets/svg/osm-logo-us.svg'/></a>",
|
2020-11-21 16:44:48 +01:00
|
|
|
|
"mappings": [
|
|
|
|
|
{
|
2021-07-10 15:52:52 +02:00
|
|
|
|
"if": "id~.*/-.*",
|
|
|
|
|
"then": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
2022-06-20 01:42:30 +02:00
|
|
|
|
"#": "ignore-image-in-then",
|
2021-07-10 15:52:52 +02:00
|
|
|
|
"if": "_backend~*",
|
|
|
|
|
"then": "<a href='{_backend}/{id}' target='_blank'><img src='./assets/svg/osm-logo-us.svg'/></a>"
|
2020-11-21 16:44:48 +01:00
|
|
|
|
}
|
2021-03-21 01:32:21 +01:00
|
|
|
|
],
|
|
|
|
|
"condition": "id~(node|way|relation)/[0-9]*"
|
2020-11-21 16:44:48 +01:00
|
|
|
|
},
|
|
|
|
|
"sharelink": {
|
|
|
|
|
"render": "{share_link()}"
|
|
|
|
|
}
|
2020-11-21 15:36:05 +01:00
|
|
|
|
}
|