From ece4118818522947bafd5036c2d1f48cee4064c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 4 Aug 2018 16:17:10 +0200 Subject: [PATCH] New sub category 'outdoor' which includes mtb routes --- index.json | 3 +++ mtb-routes.json | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ outdoor.json | 12 ++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 mtb-routes.json create mode 100644 outdoor.json diff --git a/index.json b/index.json index 53f5edb..2853a80 100644 --- a/index.json +++ b/index.json @@ -43,6 +43,9 @@ }, { "id": "children" + }, + { + "id": "outdoor" } ] }, diff --git a/mtb-routes.json b/mtb-routes.json new file mode 100644 index 0000000..9793a62 --- /dev/null +++ b/mtb-routes.json @@ -0,0 +1,50 @@ +{ + "type": "overpass", + "name": { + "en": "Mountain bike routes" + }, + "query": { + "13": "relation[type=route][route=mtb]" + }, + "members": true, + "feature": { + "description": "{{ tagTrans('route', 'mtb') }}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': '#007fff' })|raw }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "styles": "", + "markerSymbol": "" + }, + "memberFeature": { + "pre": [ + "{% set refs = [] %}", + "", + "{% for master in masters %}", + " {% if master.tags.ref %}", + " {% set refs = refs|merge([ master.tags.ref ]) %}", + " {% endif %}", + "{% endfor %}" + ], + "body": [ + "

Routes

", + "" + ], + "listExclude": "1", + "style": { + "color": "#007fff", + "width": 4, + "opacity": 1, + "text": "{{ refs|join(' ') }} ", + "textRepeat": "1", + "textOffset": "12", + "textFontWeight": "bold" + } + } +} diff --git a/outdoor.json b/outdoor.json new file mode 100644 index 0000000..eee4aca --- /dev/null +++ b/outdoor.json @@ -0,0 +1,12 @@ +{ + "type": "index", + "name": { + "de": "Freiluftaktivitäten", + "en": "Outdoor activities" + }, + "subCategories": [ + { + "id": "mtb-routes" + } + ] +}