Browse Source

fitness_trail: better code, list other roles as well

fitness_trail
parent
commit
d5dee37ac3
  1. 32
      fitness_trail.json

32
fitness_trail.json

@ -9,10 +9,13 @@
"members": true,
"feature": {
"body": [
"<h4>Stations</h4><ul>",
"<h4>Route</h4><ul class='overpass-layer-list'>",
"{% for member in members %}",
"{% if member.role == 'station' %}",
"<li data-object='{{ member.id }}' data-sublayer='member'>{{ member.tags.name|default(trans('loading')) }}</li>",
"{% if const.roles[member.role] %}",
"<li data-object='{{ member.id }}' data-sublayer='member'>",
" <span class='markerParent'><div class='marker'>{{ markerCircle({})|raw }}</div><div class='icon'>{{ const.roles[member.role].sign|raw }}</div></span>",
" <span class='title'>{{ member.tags.name|default(trans('loading')) }}</span>",
"</li>",
"{% endif %}",
"{% endfor %}",
"</ul>"
@ -57,7 +60,26 @@
"style:hover": {
"radius": "4"
},
"markerSymbol": "{% if master0.role == 'station' %}{{ markerPointer({})|raw }}{% endif %}",
"markerSign": "{% if master0.role == 'station' %}S{% endif %} "
"markerSymbol": "{% if const.roles[master0.role] %}{{ markerPointer({})|raw }}{% endif %}",
"markerSign": "{% if const.roles[master0.role] %}{{ const.roles[master0.role].sign|raw }}{% endif %} "
},
"const": {
"roles": {
"station": {
"sign": "<img src='maki:pitch'>"
},
"information": {
"sign": "🛈"
},
"start": {
"sign": "⚐"
},
"stop": {
"sign": "🏁"
},
"start_stop": {
"sign": "⚐"
}
}
}
}
Loading…
Cancel
Save