Browse Source

Merge remote-tracking branch 'gitea/master'

pedestrian
parent
commit
e545e389f2
  1. 28
      xmas.json

28
xmas.json

@ -2,10 +2,11 @@
"type": "overpass", "type": "overpass",
"name": { "name": {
"en": "Christmas", "en": "Christmas",
"fr": "Noël"
"fr": "Noël",
"de": "Weihnachten"
}, },
"query": { "query": {
"14": [
"13": [
"(", "(",
"node[\"xmas:feature\"];", "node[\"xmas:feature\"];",
"way[\"xmas:feature\"];", "way[\"xmas:feature\"];",
@ -14,9 +15,17 @@
] ]
}, },
"feature": { "feature": {
"pre": [
"{% set isCurrent = meta.timestamp > now|date_modify('-1 month')|date('Y') %}",
"{% set bgColor = isCurrent ? '#f2756a' : 'red' %}"
],
"title": "{{ attribute(tags, \"xmas:name\")|default(trans(\"unnamed\")) }}", "title": "{{ attribute(tags, \"xmas:name\")|default(trans(\"unnamed\")) }}",
"description": "{{ tagTransList(\"xmas:feature\", attribute(tags, \"xmas:feature\")) }}", "description": "{{ tagTransList(\"xmas:feature\", attribute(tags, \"xmas:feature\")) }}",
"body": [ "body": [
"{% if not isCurrent %}",
"<div style='border: 1px solid red; padding: 2px; margin-bottom: 2px;'>Feature has not been updated for the current season! Please check and set the tag 'xmas:lastcheck' to the current date.</div>",
"{% endif %}",
"",
"{% if attribute(tags, 'xmas:location') %}", "{% if attribute(tags, 'xmas:location') %}",
"<li class='hasSymbol'>", "<li class='hasSymbol'>",
" <i class=\"fa fa-globe\" aria-hidden=\"true\"></i>", " <i class=\"fa fa-globe\" aria-hidden=\"true\"></i>",
@ -57,16 +66,15 @@
"</li>", "</li>",
"{% endif %}" "{% endif %}"
], ],
"markerSign": [
"{{ attribute(const, attribute(tags, 'xmas:feature'))|raw }}",
""
]
"markerSign": "{{ attribute(const, attribute(tags, 'xmas:feature'))|raw }}",
"markerSymbol": "{{ markerPointer({\"fillColor\":bgColor})|raw }}",
"listMarkerSymbol": "{{ markerCircle({\"fillColor\":bgColor})|raw }}"
}, },
"const": { "const": {
"market": "<img src='maki:commercial'>",
"market": "<img data-src='maki:commercial'>",
"tree": "<i class=\"fa fa-tree\" aria-hidden=\"true\"></i>", "tree": "<i class=\"fa fa-tree\" aria-hidden=\"true\"></i>",
"shop": "<i class=\"fa fa-shopping-basket\" aria-hidden=\"true\"></i>", "shop": "<i class=\"fa fa-shopping-basket\" aria-hidden=\"true\"></i>",
"event": "<img src='maki:amusement-park'>"
"event": "<img data-src='maki:amusement-park'>"
}, },
"info": [ "info": [
"<table>", "<table>",
@ -76,6 +84,10 @@
" <td>{{ tagTrans('xmas:feature', value) }}</td>", " <td>{{ tagTrans('xmas:feature', value) }}</td>",
" </tr>", " </tr>",
"{% endfor %}", "{% endfor %}",
" <tr>",
" <td>{{ markerCircle({\"fillColor\":\"red\"})|raw }}</td>",
" <td>outdated feature</td>",
" </tr>",
"</table>" "</table>"
] ]
} }
Loading…
Cancel
Save