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.

95 lines
3.7 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(trans(\"unnamed\")) }}",
  25. "description": "{{ tagTransList(\"xmas:feature\", attribute(tags, \"xmas:feature\")) }}",
  26. "body": [
  27. "{% if not isCurrent %}",
  28. "<div style='border: 1px solid red; padding: 2px; margin-bottom: 2px;'>{{ 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'>",
  77. "tree": "<i class=\"fa fa-tree\" aria-hidden=\"true\"></i>",
  78. "shop": "<i class=\"fa fa-shopping-basket\" aria-hidden=\"true\"></i>",
  79. "event": "<img data-src='maki:amusement-park'>"
  80. },
  81. "info": [
  82. "<table>",
  83. "{% for value, icon in const %}",
  84. " <tr>",
  85. " <td>{{ markerCircle({})|raw }}<div class='sign'>{{ icon|raw }}</div></td>",
  86. " <td>{{ tagTrans('xmas:feature', value) }}</td>",
  87. " </tr>",
  88. "{% endfor %}",
  89. " <tr>",
  90. " <td>{{ markerCircle({\"fillColor\":\"red\"})|raw }}</td>",
  91. " <td>{{ repoTrans('outdated feature') }}</td>",
  92. " </tr>",
  93. "</table>"
  94. ]
  95. }