Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
4.6 KiB

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