Browse Source

commonBody: better layout

master
parent
commit
7db9d45bde
  1. 52
      commonBody.html
  2. 2
      gastro.json

52
commonBody.html

@ -1,35 +1,39 @@
<dl>
<ul>
{% set address = tagsPrefix(tags, 'addr:') %}
{% if address %}
<dt>
<i class="fa fa-map-marker symbol" aria-hidden="true"></i>
{{ keyTrans('addr') }}:
</dt><dd>
{{ attribute(tags, 'addr:street') }} {{ attribute(tags, 'addr:housenumber') }}, {{ attribute(tags, 'addr:postcode') }} {{ attribute(tags, 'addr:city') }}
</dd>
<li>
<i class="fa fa-map-marker symbol" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('addr') }}</span>
<span class='value'>
{{ attribute(tags, 'addr:street') }}
{{ attribute(tags, 'addr:housenumber') }},
{{ attribute(tags, 'addr:postcode') }}
{{ attribute(tags, 'addr:city') }}
</span>
</li>
{% endif %}
{% if tags.phone %}
<dt>
<i class="fa fa-phone symbol" aria-hidden="true"></i>
{{ keyTrans('phone') }}:
</dt>
<dd>
<a href='tel:{{ tags.phone }}'>{{ tags.phone }}</a>
</dd>
<li>
<i class="fa fa-phone symbol" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('phone') }}</span>
<span class='value'>
<a href='tel:{{ tags.phone }}'>{{ tags.phone }}</a>
</span>
</li>
{% endif %}
{% set payment = tagsPrefix(tags, 'payment:') %}
{% if payment %}
<dt>
<i class="fa fa-money symbol" aria-hidden="true"></i>
{{ keyTrans('payment') }}:
</dt><dd>
{% for k, tag in payment %}
{% if tags[tag] == 'no' %}<s>{{ k }}</s> {% else %}{{ k }} {% endif %}
{% endfor %}
</dd>
<li>
<i class="fa fa-money symbol" aria-hidden="true"></i>
<span class='key'>{{ keyTrans('payment') }}</span>
<span class='value'>
{% for k, tag in payment %}
{% if tags[tag] == 'no' %}<s>{{ k }}</s> {% else %}{{ k }} {% endif %}
{% endfor %}
</span>
</li>
{% endif %}
</dl>
</ul>

2
gastro.json

@ -21,7 +21,7 @@
},
"feature": {
"markerSign": "{% if tags.amenity=='bar' %}&#127864;{% elseif tags.amenity=='biergarten'%}&#127867;{% elseif tags.amenity=='cafe' %}&#9749;{% elseif tags.amenity=='fast_food' %}&#127828;{% elseif tags.amenity=='ice_cream' %}&#127848;{% elseif tags.amenity=='pub' %}&#127866;{% else %}&#127860;{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{{ keyTrans('cuisine') }}: {{ tagTransList('cuisine', tags.cuisine)|default(trans('unknown')) }}",
"body": "<span class='description'>\n{{ tagTrans('amenity', tags.amenity) }}\n</span>\n<ul>\n <li>\n <i class=\"fa fa-cutlery symbol\" aria-hidden=\"true\"></i>\n <span class='key'>{{ keyTrans('cuisine') }}</span>\n <span class='value'>{{ tagTransList('cuisine', tags.cuisine)|default(trans('unknown')) }}</span>\n </li>\n</ul>",
"description": "{{ tagTrans('amenity', tags.amenity) }}"
}
}
Loading…
Cancel
Save