Browse Source

* routes: improve popup display

pedestrian
parent
commit
03dd673a74
  1. 10
      cycle_routes.json
  2. 10
      hiking_routes.json
  3. 8
      pt.json
  4. 6
      railway-routes.json

10
cycle_routes.json

@ -42,12 +42,12 @@
"title": "", "title": "",
"body": [ "body": [
"<h4>Routes</h4>", "<h4>Routes</h4>",
"<ul>",
"<ul class='overpass-layer-list'>",
"{% for master in masters %}", "{% for master in masters %}",
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
" {{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}",
" {% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}",
" <i style='color: #707070'>{{ tagTrans('network', master.tags.network) }}</i>",
" <li data-object=\"{{ master.id }}\">",
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
" <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
" </li>", " </li>",
"{% endfor %}", "{% endfor %}",
"</ul>" "</ul>"

10
hiking_routes.json

@ -41,12 +41,12 @@
], ],
"body": [ "body": [
"<h4>Routes</h4>", "<h4>Routes</h4>",
"<ul>",
"<ul class='overpass-layer-list'>",
"{% for master in masters %}", "{% for master in masters %}",
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
" {{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}",
" {% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}",
" <i style='color: #707070'>{{ tagTrans('network', master.tags.network) }}</i>",
" <li data-object=\"{{ master.id }}\">",
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
" <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
" </li>", " </li>",
"{% endfor %}", "{% endfor %}",
"</ul>" "</ul>"

8
pt.json

@ -137,10 +137,14 @@
"listStopsDescription": "{{ refs|join(' ') }}", "listStopsDescription": "{{ refs|join(' ') }}",
"body": [ "body": [
"<h4>Routes</h4>", "<h4>Routes</h4>",
"<ul>",
"<ul class='overpass-layer-list'>",
"{% for master in masters %}", "{% for master in masters %}",
" {% if master.tags.public_transport != 'stop_area' %}", " {% if master.tags.public_transport != 'stop_area' %}",
" <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</li>",
" <li data-object=\"{{ master.id }}\">",
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.route].color })|raw }}</div></span>",
" <span class='title'>{{ master.tags.name|default(master.tags.ref) }}</a></span>",
" <span class='description'>{{ tagTrans('route', master.tags.route) }}</span>",
" </li>",
" {% endif %}", " {% endif %}",
"{% endfor %}", "{% endfor %}",
"</ul>" "</ul>"

6
railway-routes.json

@ -36,9 +36,9 @@
"{% for master in masters %}", "{% for master in masters %}",
" {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}", " {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>", " <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
" {{ markerLine({ width: 4, color: _color })|raw }}",
" {% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}",
" <i style='color: #707070'>{{ master.tags.operator }}</i>",
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>",
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
" <span class='description'>{{ master.tags.operator }}</span>",
" </li>", " </li>",
"{% endfor %}", "{% endfor %}",
"</ul>" "</ul>"

Loading…
Cancel
Save