Better tag rewriting, add icons, add bicycle rental theme

This commit is contained in:
Pieter Vander Vennet 2022-01-29 02:45:59 +01:00
parent 1dcb3897e4
commit 9594868e83
23 changed files with 389 additions and 117 deletions

View file

@ -2975,32 +2975,14 @@
},
{
"id": "payment-options",
"builtin": "payment-options",
"builtin": "payment-options-advanced",
"override": {
"condition": {
"or": [
"fee=yes",
"charge~*"
]
},
"mappings+": [
{
"if": "payment:app=yes",
"ifnot": "payment:app=no",
"then": {
"en": "Payment is done using a dedicated app",
"nl": "Betalen via een app van het netwerk"
}
},
{
"if": "payment:membership_card=yes",
"ifnot": "payment:membership_card=no",
"then": {
"en": "Payment is done using a membership card",
"nl": "Betalen via een lidkaart van het netwerk"
}
}
]
}
}
},
{

View file

@ -260,32 +260,14 @@
},
{
"id": "payment-options",
"builtin": "payment-options",
"builtin": "payment-options-advanced",
"override": {
"condition": {
"or": [
"fee=yes",
"charge~*"
]
},
"mappings+": [
{
"if": "payment:app=yes",
"ifnot": "payment:app=no",
"then": {
"en": "Payment is done using a dedicated app",
"nl": "Betalen via een app van het netwerk"
}
},
{
"if": "payment:membership_card=yes",
"ifnot": "payment:membership_card=no",
"then": {
"en": "Payment is done using a membership card",
"nl": "Betalen via een lidkaart van het netwerk"
}
}
]
}
}
},
{

View file

@ -31,6 +31,7 @@
"de": "Die Ebene zeigt Picknicktische an"
},
"tagRenderings": [
"images",
{
"question": {
"en": "What material is this picnic table made of?",

7
assets/svg/cash.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -141,6 +141,16 @@
"https://commons.wikimedia.org/wiki/File:Camera_font_awesome.svg"
]
},
{
"path": "cash.svg",
"license": "CC-BY 3.0",
"authors": [
"Online Web Fonts"
],
"sources": [
"https://www.onlinewebfonts.com/icon/464494"
]
},
{
"path": "checkbox-empty.svg",
"license": "CC0",
@ -1109,6 +1119,16 @@
"authors": [],
"sources": []
},
{
"path": "smartphone.svg",
"license": "CC-BY 3.0",
"authors": [
"To Uyen"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Smartphone_icon_-_Noun_Project_283536.svg"
]
},
{
"path": "speech_bubble.svg",
"license": "CC-BY 4.0",

View file

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<path d="m33.975 95h32.05c5.565 0 10.08-4.279 10.08-9.569v-70.855c0-5.285-4.513-9.576-10.07-9.576h-32.05c-5.564 0-10.08 4.291-10.08 9.576v70.854c0 5.288 4.513 9.57 10.08 9.57m16.03-3.257c-2.493 0-4.506-2.02-4.506-4.498 0-2.489 2.01-4.502 4.506-4.502 2.487 0 4.494 2.01 4.494 4.502 0 2.481-2.01 4.498-4.494 4.498m-6.868-80.911h13.727c.556 0 1.01.383 1.01.852 0 .471-.452.854-1.01.854h-13.727c-.55 0-1.01-.383-1.01-.854-.0001-.469.454-.852 1.01-.852m-15.289 10.798c0-.794.675-1.438 1.508-1.438h41.29c.835 0 1.507.641 1.507 1.438v56.49c0 .791-.672 1.433-1.507 1.433h-41.29c-.833 0-1.508-.642-1.508-1.433v-56.49"/>
</svg>

After

Width:  |  Height:  |  Size: 702 B

View file

@ -558,6 +558,7 @@
{
"if": "payment:cash=yes",
"ifnot": "payment:cash=no",
"icon": "./assets/svg/cash.svg",
"then": {
"en": "Cash is accepted here",
"nl": "Cash geld wordt hier aanvaard",
@ -579,6 +580,7 @@
{
"if": "payment:cards=yes",
"ifnot": "payment:cards=no",
"icon": "./assets/svg/payment_card.svg",
"then": {
"en": "Payment cards are accepted here",
"nl": "Betalen met bankkaarten kan hier",
@ -599,6 +601,31 @@
}
]
},
"payment-options-advanced": {
"builtin": "payment-options",
"override": {
"mappings+": [
{
"if": "payment:app=yes",
"ifnot": "payment:app=no",
"icon": "./assets/svg/smartphone.svg",
"then": {
"en": "Payment is done using a dedicated app",
"nl": "Betalen via een app van het netwerk"
}
},
{
"if": "payment:membership_card=yes",
"ifnot": "payment:membership_card=no",
"icon": "./assets/svg/nfc_card.svg",
"then": {
"en": "Payment is done using a membership card",
"nl": "Betalen via een lidkaart van het netwerk"
}
}
]
}
},
"last_edit": {
"#": "Gives some metainfo about the last edit and who did edit it - rendering only",
"condition": "_last_edit:contributor~*",

View file

@ -171,19 +171,36 @@
{
"if": "rental=city_bike",
"then": {
"en": "Normal city bikes can be rented here"
"en": "Normal city bikes can be rented here",
"nl": "Gewone stadsfietsen kunnen hier gehuurd worden"
}
},
{
"if": "rental=ebike",
"then": {
"en": "Electrical bikes can be rented here"
"en": "Electrical bikes can be rented here",
"nl": "Elektrische fietsen kunnen hier gehuurd worden"
}
},
{
"if": "rental=bmx",
"then": {
"en": "BMX bikes can be rented here"
"en": "BMX bikes can be rented here",
"nl": "BMX-fietsen kunnen hier gehuurd worden"
}
},
{
"if": "rental=mtb",
"then": {
"en": "Mountainbikes can be rented here",
"nl": "Mountainbikes kunnen hier gehuurd worden"
}
},
{
"if": "rental=kid_bike",
"then": {
"en": "Bikes for childs can be rented here",
"nl": "Kinderfietsen kunnen hier gehuurd worden"
}
}
]
@ -192,26 +209,70 @@
"rewrite": {
"sourceString": [
"bicycle_type",
"bicycle_types"
"type_plural"
],
"into": [
[
"city_bike",
"city bikes"
{
"en": "city bikes",
"nl": "Stadsfietsen"
}
],
[
"ebike",
"electrical bikes"
{
"en": "electrical bikes",
"nl": "elektrische fietsen"
}
],
"bmx"
[
"kid_bike",
{
"en": "bikes for children",
"nl": "Kinderfietsen"
}
],
[
"bmx",
{
"en": "BMX bikes",
"nl": "BMX-fietsen"
}
],
[
"mtb",
{
"en": "mountainbike",
"nl": "mountainbike"
}
],
[
"bicycle_pannier",
{
"en": "bicycle panniers",
"nl": "Fietstassen"
}
]
]
},
"renderings": [
{
"id": "rental-capacity-bicycle-type",
"group": "",
"question": {
"en": "How much bicycle_type ",
"nl": "Hoeveel "
}
"en": "How much type_plural can be rented here? ",
"nl": "Hoeveel type_plural kunnen hier uitgeleend worden?"
},
"render": {
"en": "{capacity:bicycle_type} type_plural can be rented here",
"nl": "{capacity:bicycle_type} type_plural kunnen hier uitgeleend worden"
},
"freeform": {
"key": "capacity:bicycle_type",
"type": "pnat"
},
"condition": "rental~.*bicycle_type.*"
}
]
}

View file

@ -95,6 +95,10 @@
"if": "theme=benches",
"then": "./assets/themes/benches/bench_poi.svg"
},
{
"if": "theme=bicycle_rental",
"then": "./assets/themes/bicycle_rental/logo.svg"
},
{
"if": "theme=bicyclelib",
"then": "./assets/themes/bicyclelib/logo.svg"

View file

@ -62,10 +62,16 @@
},
{
"rewrite": {
"sourceString": "left|right",
"sourceString": [
"left|right"
],
"into": [
"left",
"right"
[
"left"
],
[
"right"
]
]
},
"renderings": [