Main categories of OpenStreetBrowser with support for whitewater
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.

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