-
Notifications
You must be signed in to change notification settings - Fork 11
/
xmas.json
121 lines (121 loc) · 4.6 KB
/
xmas.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
"type": "overpass",
"name": {
"ca": "Nadal",
"cs": "Vánoce",
"de": "Weihnachten",
"en": "Christmas",
"es": "Navidades",
"fr": "Noël",
"gl": "Nadal",
"hu": "Karácsony",
"it": "Natale",
"ja": "クリスマス",
"nb": "Jul",
"nl": "Kerstmis",
"oc": "Calendas",
"pl": "Święta",
"pt-br": "Natal",
"ro": "Crăciun",
"ru": "Рождество",
"sr": "Божић",
"tr": "Noel"
},
"query": {
"13": [
"(",
"node[\"xmas:feature\"];",
"way[\"xmas:feature\"];",
"relation[\"xmas:feature\"];",
")"
]
},
"feature": {
"pre": [
"{% set isCurrent = meta.timestamp >= \"now\"|date_modify('-10 month')|date('Y') %}",
"{% set bgColor = isCurrent ? '#f2756a' : 'red' %}"
],
"title": "{{ attribute(tags, \"xmas:name\")|default(tags.name) }}",
"description": "{{ tagTransList(\"xmas:feature\", attribute(tags, \"xmas:feature\")) }}",
"body": [
"{% if not isCurrent %}",
"<div class='warning'>{{ repoTrans('xmas:outdated-warning') }}</div>",
"{% endif %}",
"",
"{% if attribute(tags, 'xmas:location') %}",
"<li class='hasSymbol'>",
" <i class=\"fa fa-globe\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('location') }}:</span>",
" <span class='value'>",
" {{ attribute(tags, 'xmas:location') }}",
" </span>",
"</li>",
"{% endif %}",
"",
"{% if attribute(tags, 'xmas:day_date') %}",
"<li class='hasSymbol'>",
" <i class=\"fa fa-clock-o\" aria-hidden=\"true\"></i>",
" <span class='key'>Open:</span>",
" <span class='value'>",
" {{ attribute(tags, 'xmas:day_date') }}",
" </span>",
"</li>",
"{% endif %}",
"",
"{% if attribute(tags, 'xmas:opening_hours') %}",
"<li class='hasSymbol'>",
" <i class=\"fa fa-clock-o\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('opening_hours') }}:</span>",
" <span class='value'>",
" {{ attribute(tags, 'xmas:opening_hours') }}",
" </span>",
"</li>",
"{% endif %}",
"",
"{% if attribute(tags, 'xmas:url') %}",
"<li class='hasSymbol'>",
" <i class=\"fa fa-globe\" aria-hidden=\"true\"></i>",
" <span class='key'>{{ keyTrans('website') }}:</span>",
" <span class='value'>",
" <a target='_blank' href='{{ attribute(tags, 'xmas:url')|websiteUrl }}'>{{ attribute(tags, 'xmas:url') }}</a>",
" </span>",
"</li>",
"{% endif %}"
],
"markerSign": "{{ attribute(const, attribute(tags, 'xmas:feature'))|raw }}",
"markerSymbol": "{{ markerPointer({\"fillColor\":bgColor})|raw }}",
"listMarkerSymbol": "{{ markerCircle({\"fillColor\":bgColor})|raw }}"
},
"const": {
"market": "<img data-src='maki:commercial?fill=#333333'>",
"shop": "<i class=\"fa fa-shopping-basket\" aria-hidden=\"true\"></i>",
"tree": "<i class=\"fa fa-tree\" aria-hidden=\"true\"></i>",
"crib": "<i class=\"fas fa-bed\"></i>",
"event": "<img data-src='maki:amusement-park?fill=#333333'>",
"lighting": "<i class=\"far fa-star\"></i>",
"pyramid": "𓉴"
},
"filter": {
"type": {
"name": "{{ trans('filter:type') }}",
"show_default": "true",
"query": "nwr[\"xmas:feature\"=\"{{ value }}\"]",
"type": "select",
"values": "{% for k, v in const %}<option value=\"{{ k }}\">{{ tagTrans('xmas:feature', k) }}</option>{% endfor %}<option value=\"other\" query=\"nwr['xmas:feature']{% for k, v in const %}['xmas:feature'!='{{ k }}']{% endfor %}\" weight=\"1\">{{ trans('other') }}</option>"
}
},
"info": [
"<table>",
"{% for value, icon in const %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ icon|raw }}</div></td>",
" <td>{{ tagTrans('xmas:feature', value) }}</td>",
" </tr>",
"{% endfor %}",
" <tr>",
" <td>{{ markerCircle({\"fillColor\":\"red\"})|raw }}</td>",
" <td>{{ repoTrans('outdated feature') }}</td>",
" </tr>",
"</table>"
]
}