Main categories of OpenStreetBrowser with public transport zoom level
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.

166 lines
5.2 KiB

  1. <ul>
  2. {% set hasDescription = tagsPrefix(tags, 'description:') %}
  3. {% if tags.description or hasDescription %}
  4. <li class='hasSymbol'>
  5. <i class="fa fa-info" aria-hidden="true"></i>
  6. <span class='value'>{{ localizedTag(tags, 'description')|default(attribute(tags, 'description:' ~ hasDescription|keys[0])) }}</span>
  7. </li>
  8. {% endif %}
  9. {% set address = tagsPrefix(tags, 'addr:') %}
  10. {% if address %}
  11. <li class='hasSymbol'>
  12. <i class="fa fa-map-marker" aria-hidden="true"></i>
  13. <span class='key'>{{ keyTrans('address') }}:</span>
  14. <span class='value'>
  15. {{ attribute(tags, 'addr:street') }}
  16. {{ attribute(tags, 'addr:housenumber') }},
  17. {{ attribute(tags, 'addr:postcode') }}
  18. {{ attribute(tags, 'addr:city') }}
  19. </span>
  20. </li>
  21. {% endif %}
  22. {% if tags.website %}
  23. <li class='hasSymbol'>
  24. <i class="fa fa-globe" aria-hidden="true"></i>
  25. <span class='key'>{{ keyTrans('website') }}:</span>
  26. <span class='value'>
  27. <a target='_blank' href='{{ tags.website|websiteUrl }}'>{{ tags.website }}</a>
  28. </span>
  29. </li>
  30. {% endif %}
  31. {% if attribute(tags, 'contact:website') %}
  32. <li class='hasSymbol'>
  33. <i class="fa fa-globe" aria-hidden="true"></i>
  34. <span class='key'>{{ keyTrans('website') }}:</span>
  35. <span class='value'>
  36. <a target='_blank' href='{{ attribute(tags, 'contact:website')|websiteUrl }}'>{{ attribute(tags, 'contact:website') }}</a>
  37. </span>
  38. </li>
  39. {% endif %}
  40. {% if tags.phone %}
  41. <li class='hasSymbol'>
  42. <i class="fa fa-phone" aria-hidden="true"></i>
  43. <span class='key'>{{ keyTrans('phone') }}:</span>
  44. <span class='value'>
  45. <a target='_blank' href='tel:{{ tags.phone }}'>{{ tags.phone }}</a>
  46. </span>
  47. </li>
  48. {% endif %}
  49. {% if attribute(tags, 'contact:phone') %}
  50. <li class='hasSymbol'>
  51. <i class="fa fa-phone" aria-hidden="true"></i>
  52. <span class='key'>{{ keyTrans('phone') }}:</span>
  53. <span class='value'>
  54. <a target='_blank' href='tel:{{ attribute(tags, 'contact:phone') }}'>{{ attribute(tags, 'contact:phone') }}</a>
  55. </span>
  56. </li>
  57. {% endif %}
  58. {% if attribute(tags, 'contact:email') or tags.email %}
  59. <li class='hasSymbol'>
  60. <i class="fa fa-user-circle" aria-hidden="true"></i>
  61. <span class='key'>{{ keyTrans('contact') }}:</span>
  62. <span class='value'>
  63. {% if attribute(tags, 'contact:email') %}
  64. <a target='_blank' href='mailto:{{ attribute(tags, 'contact:email') }}'>
  65. <i class="fa fa-envelope" aria-hidden="true"></i>
  66. </a>
  67. {% endif %}
  68. {% if attribute(tags, 'email') %}
  69. <a target='_blank' href='mailto:{{ attribute(tags, 'email') }}'>
  70. <i class="fa fa-envelope" aria-hidden="true"></i>
  71. </a>
  72. {% endif %}
  73. </span>
  74. </li>
  75. {% endif %}
  76. {% if tags.opening_hours %}
  77. <li class='hasSymbol'>
  78. <i class="fa fa-clock-o" aria-hidden="true"></i>
  79. <span class='key'>{{ keyTrans('opening_hours') }}:</span>
  80. <span class='value'>
  81. {{ tags.opening_hours }}
  82. </span>
  83. </li>
  84. {% endif %}
  85. {% set payment = tagsPrefix(tags, 'payment:') %}
  86. {% if payment %}
  87. <li class='hasSymbol'>
  88. <i class="fa fa-money" aria-hidden="true"></i>
  89. <span class='key'>{{ keyTrans('payment') }}:</span>
  90. <span class='value'>
  91. {% set i = 0 %}
  92. {% for k, tag in payment %}
  93. {%- if i > 0 %},{% endif %}
  94. <span title="{{ tagTrans(k, tags[tag]) }}">{% if tags[tag] == 'no' %}<s>{{ keyTrans(tag, { default: k }) }}</s>{% else %}{{ keyTrans(tag, { default: k }) }}{% endif -%}</span>
  95. {% set i = i + 1 -%}
  96. {% endfor %}
  97. </span>
  98. </li>
  99. {% endif %}
  100. {% if attribute(tags, 'wheelchair') %}
  101. <li class='hasSymbol'>
  102. <i class="fa fa-info-circle" aria-hidden="true"></i>
  103. <span class='key'>{{ trans('facilities') }}:</span>
  104. <span class='value'>
  105. {% if attribute(tags, 'wheelchair') %}
  106. <i class="fa fa-wheelchair-alt {{ tags.wheelchair }}" aria-hidden="true" title='{{ keyTrans('wheelchair') }}: {{ tagTrans('wheelchair', tags.wheelchair) }}'></i>
  107. {% if attribute(tags, 'toilets:wheelchair') %}
  108. (<span class='{{ attribute(tags, 'toilets:wheelchair') }}' title='{{ keyTrans('toilets:wheelchair') }}: {{ tagTrans('toilets:wheelchair', attribute(tags, 'toilets:wheelchair')) }}'>&#128701;</span>)
  109. {% endif %}
  110. {% endif %}
  111. </span>
  112. </li>
  113. {% endif %}
  114. {% set wikipedia = null %}
  115. {% if attribute(tags, 'wikipedia') %}
  116. {% set wikipedia = tags.wikipedia|matches("^([^:]+):(.*)$") %}
  117. {% endif %}
  118. {% if not wikipedia %}
  119. {% for k, v in tags %}
  120. {% set m = k|matches("^wikipedia:(.*)$") %}
  121. {% if m %}
  122. {% set wikipedia = [ 0, m[1], v ] %}
  123. {% endif %}
  124. {% endfor %}
  125. {% endif %}
  126. {% if wikipedia %}
  127. <li class='hasSymbol'>
  128. <i class="fa fa-wikipedia-w" aria-hidden="true"></i>
  129. <span class='key'>{{ keyTrans('wikipedia') }}:</span>
  130. <span class='value'><a href="https://{{ wikipedia[1] }}.wikipedia.org/wiki/{{ wikipedia[2]|replace({ ' ': '_' }) }}">{{ wikipedia[2] }}</a></span>
  131. {% endif %}
  132. {% if tags.start_date %}
  133. <li class='hasSymbol'>
  134. <i class="fa fa-clock-o" aria-hidden="true"></i>
  135. <span class='key'>{{ keyTrans('start_date') }}:</span>
  136. <span class='value'>{{ tags.start_date|osmFormatDate }}</span>
  137. </li>
  138. {% endif %}
  139. {% if tags.opening_date %}
  140. <li class='hasSymbol'>
  141. <i class="fa fa-clock-o" aria-hidden="true"></i>
  142. <span class='key'>{{ keyTrans('opening_date') }}:</span>
  143. <span class='value'>{{ tags.opening_date|osmFormatDate }}</span>
  144. </li>
  145. {% endif %}
  146. </ul>