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.

107 lines
4.2 KiB

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