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.

91 lines
3.5 KiB

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