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.

93 lines
3.7 KiB

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