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.

94 lines
3.7 KiB

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