Add ToC to generated pages

This commit is contained in:
Pieter Vander Vennet 2021-11-30 22:50:48 +01:00
parent b4529e4f63
commit 752538ec14
18 changed files with 346 additions and 243 deletions

View file

@ -5,8 +5,8 @@
## Table of contents
1. [Special and other useful layers](#Special_and_other_useful_layers)
1. [Priviliged layers](#Priviliged_layers)
1. [Special and other useful layers](#special-and-other-useful-layers)
1. [Priviliged layers](#priviliged-layers)
+ [gps_location](#gps_location)
+ [gps_location_history](#gps_location_history)
+ [home_location](#home_location)
@ -14,17 +14,17 @@
+ [type_node](#type_node)
+ [conflation](#conflation)
+ [left_right_style](#left_right_style)
1. [Frequently reused layers](#Frequently_reused_layers)
1. [Frequently reused layers](#frequently-reused-layers)
+ [bicycle_library](#bicycle_library)
* [Themes using this layer](#Themes_using_this_layer)
* [Themes using this layer](#themes-using-this-layer)
+ [drinking_water](#drinking_water)
* [Themes using this layer](#Themes_using_this_layer)
* [Themes using this layer](#themes-using-this-layer)
+ [food](#food)
* [Themes using this layer](#Themes_using_this_layer)
* [Themes using this layer](#themes-using-this-layer)
+ [map](#map)
* [Themes using this layer](#Themes_using_this_layer)
* [Themes using this layer](#themes-using-this-layer)
+ [all_streets](#all_streets)
* [Themes using this layer](#Themes_using_this_layer)
* [Themes using this layer](#themes-using-this-layer)
MapComplete has a few data layers available in the theme which have special properties through builtin-hooks. Furthermore, there are some normal layers (which are built from normal Theme-config files) but are so general that they get a mention here.

View file

@ -5,21 +5,21 @@
## Table of contents
1. [Metatags](#Metatags)
- [Metatags calculated by MapComplete](#Metatags_calculated_by_MapComplete)
+ [_lat, _lon](#_lat,__lon)
1. [Metatags](#metatags)
- [Metatags calculated by MapComplete](#metatags-calculated-by-mapcomplete)
+ [_lat, _lon](#_lat,-_lon)
+ [_layer](#_layer)
+ [_surface, _surface:ha](#_surface,__surface:ha)
+ [_length, _length:km](#_length,__length:km)
+ [Theme-defined keys](#Theme-defined_keys)
+ [_surface, _surface:ha](#_surface,-_surfaceha)
+ [_length, _length:km](#_length,-_lengthkm)
+ [Theme-defined keys](#theme-defined-keys)
+ [_country](#_country)
+ [_isOpen, _isOpen:description](#_isOpen,__isOpen:description)
+ [_direction:numerical, _direction:leftright](#_direction:numerical,__direction:leftright)
+ [_now:date, _now:datetime, _loaded:date, _loaded:_datetime](#_now:date,__now:datetime,__loaded:date,__loaded:_datetime)
+ [_last_edit:contributor, _last_edit:contributor:uid, _last_edit:changeset, _last_edit:timestamp, _version_number, _backend](#_last_edit:contributor,__last_edit:contributor:uid,__last_edit:changeset,__last_edit:timestamp,__version_number,__backend)
+ [sidewalk:left, sidewalk:right, generic_key:left:property, generic_key:right:property](#sidewalk:left,_sidewalk:right,_generic_key:left:property,_generic_key:right:property)
+ [distanceTo](#distanceTo)
+ [overlapWith](#overlapWith)
+ [_isOpen, _isOpen:description](#_isopen,-_isopendescription)
+ [_direction:numerical, _direction:leftright](#_directionnumerical,-_direction:leftright)
+ [_now:date, _now:datetime, _loaded:date, _loaded:_datetime](#_nowdate,-_now:datetime,-_loaded:date,-_loaded:_datetime)
+ [_last_edit:contributor, _last_edit:contributor:uid, _last_edit:changeset, _last_edit:timestamp, _version_number, _backend](#_last_editcontributor,-_last_edit:contributor:uid,-_last_edit:changeset,-_last_edit:timestamp,-_version_number,-_backend)
+ [sidewalk:left, sidewalk:right, generic_key:left:property, generic_key:right:property](#sidewalkleft,-sidewalk:right,-generic_key:left:property,-generic_key:right:property)
+ [distanceTo](#distanceto)
+ [overlapWith](#overlapwith)
+ [closest](#closest)
+ [closestn](#closestn)
+ [memberships](#memberships)

View file

@ -5,29 +5,59 @@
## Table of contents
1. [Available types for text fields](#Available_types_for_text_fields)
1. [Available types for text fields](#available-types-for-text-fields)
+ [string](#string)
+ [text](#text)
+ [date](#date)
+ [direction](#direction)
+ [length](#length)
+ [wikidata](#wikidata)
+ [int](#int)
+ [nat](#nat)
+ [pnat](#pnat)
+ [float](#float)
+ [pfloat](#pfloat)
+ [email](#email)
+ [url](#url)
+ [phone](#phone)
+ [opening_hours](#opening_hours)
+ [color](#color)
The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to activate them ## string
The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to activate them
A basic string
### string
## text
A string, but allows input of longer strings more comfortably and supports newlines (a text area)
## date
A basic string
A date
### text
## direction
A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)
## length
A string, but allows input of longer strings more comfortably and supports newlines (a text area)
### date
A date
### direction
A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)
### length
A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `["21", "map,photo"]
### wikidata
A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `["21", "map,photo"]
## wikidata
A wikidata identifier, e.g. Q42.
@ -68,41 +98,59 @@ removePostfixes | remove these snippets of text from the end of the passed strin
}
]
}
```
```
## int
### int
A number
## nat
A positive number or zero
A number
## pnat
### nat
A strict positive number
## float
A decimal
A positive number or zero
## pfloat
### pnat
A positive decimal (incl zero)
## email
An email adress
A strict positive number
## url
### float
A url
## phone
A phone number
A decimal
### pfloat
A positive decimal (incl zero)
### email
An email adress
### url
A url
### phone
A phone number
### opening_hours
## opening_hours
Has extra elements to easily input when a POI is opened.
@ -139,9 +187,11 @@ postfix | Piece of text that will always be added to the end of the generated op
}
```
*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
### color
## color
Shows a color picker

View file

@ -5,41 +5,41 @@
## Table of contents
1. [Special tag renderings](#Special_tag_renderings)
1. [Special tag renderings](#special-tag-renderings)
+ [all_tags](#all_tags)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [image_carousel](#image_carousel)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [image_upload](#image_upload)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [wikipedia](#wikipedia)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [minimap](#minimap)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [sided_minimap](#sided_minimap)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [reviews](#reviews)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [opening_hours_table](#opening_hours_table)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [live](#live)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [histogram](#histogram)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [share_link](#share_link)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [canonical](#canonical)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [import_button](#import_button)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [multi_apply](#multi_apply)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [tag_apply](#tag_apply)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [export_as_gpx](#export_as_gpx)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
+ [clear_location_history](#clear_location_history)
* [Example usage](#Example_usage)
* [Example usage](#example-usage)
In a tagrendering, some special values are substituted by an advanced UI-element. This allows advanced features and visualizations to be reused by custom themes or even to query third-party API's. General usage is `{func_name()}`, `{func_name(arg, someotherarg)}` or `{func_name(args):cssStyle}`. Note that you _do not_ need to use quotes around your arguments, the comma is enough to separate them. This also implies you cannot use a comma in your args

View file

@ -5,8 +5,8 @@
## Table of contents
1. [URL-parameters and URL-hash](#URL-parameters_and_URL-hash)
- [What is a URL parameter?](#what_is_a_url_parameter)
1. [URL-parameters and URL-hash](#url-parameters-and-url-hash)
- [What is a URL parameter?](#what-is-a-url-parameter)
- [fs-userbadge](#fs-userbadge)
- [fs-search](#fs-search)
- [fs-background](#fs-background)
@ -24,10 +24,10 @@
- [test](#test)
- [debug](#debug)
- [fake-user](#fake-user)
- [overpassUrl](#overpassUrl)
- [overpassTimeout](#overpassTimeout)
- [overpassMaxZoom](#overpassMaxZoom)
- [osmApiTileSize](#osmApiTileSize)
- [overpassUrl](#overpassurl)
- [overpassTimeout](#overpasstimeout)
- [overpassMaxZoom](#overpassmaxzoom)
- [osmApiTileSize](#osmapitilesize)
- [background](#background)
- [layer-<layer-id>](#layer-<layer-id>)