Add Open Toilet Map, fix #34

This commit is contained in:
Pieter Vander Vennet 2020-08-22 16:00:33 +02:00
parent 2df565dc50
commit a55767c1e9
11 changed files with 188 additions and 188 deletions

View file

@ -44,14 +44,17 @@ export class MoreScreen extends UIElement {
const currentLocation = State.state.locationControl.data;
const linkText =
`https://pietervdvn.github.io/MapComplete/${layout.name}.html?z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}`
let description = Translations.W(layout.description);
if(description !== undefined){
description = new Combine(["<br/>", description]);
}
const link =
new SubtleButton(layout.icon,
new Combine([
"<b>",
Translations.W(layout.title),
"</b>",
"<br/>",
Translations.W(layout.description),
description ?? "",
]), {url: linkText, newTab: false});
els.push(link)