Merge branch 'develop'

This commit is contained in:
Pieter Vander Vennet 2023-02-12 19:10:20 +01:00
commit 9a45ddb352
2 changed files with 26 additions and 6 deletions

View file

@ -24,7 +24,7 @@
},
"minzoom": 12,
"source": {
"osmTags": "amenity=hospital"
"osmTags": {"or": ["amenity=hospital","amenity=clinic"]}
},
"tagRenderings": [
{
@ -47,6 +47,26 @@
"key": "name"
}
},
{
"id": "inpatient",
"question": {
"en": "Does this facility admit inpatients?<br><span class='subtle'>An <i>inpatient</i> is a patient which stays for multiple days in the facility</span>"
},
"mappings": [
{
"if": "amenity=clinic",
"then": {
"en": "This is a clinic - patients can not stay overnight"
}
},
{
"if": "amenity=hospital",
"then": {
"en": "This is a hospital - patients can be admitted here for multiple days"
}
}
]
},
"phone",
"email",
"website"
@ -67,4 +87,4 @@
"width": 1
}
]
}
}

View file

@ -23,8 +23,8 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string
name = name.substr(2)
}
const newname = `public/assets/generated/images/${name.replace(/\//g, "_")}${size}.png`
const newname = `assets/generated/images/${name.replace(/\//g, "_")}${size}.png`
const targetpath = `public/${newname}`
if (alreadyWritten.indexOf(newname) >= 0) {
return newname
}
@ -41,7 +41,7 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string
// We already read to file, in order to crash here if the file is not found
let img = await sharp(iconPath)
let resized = await img.resize(size)
await resized.toFile(newname)
await resized.toFile(targetpath)
console.log("Created png version at ", newname)
} catch (e) {
console.error("Could not read icon", iconPath, " to create a PNG due to", e)
@ -273,7 +273,7 @@ async function createLandingPage(layout: LayoutConfig, manifest, whiteIcons, alr
'<script type="module" src="./index.ts"></script>',
`<script type="module" src='./index_${layout.id}.ts'></script>`
)
0
try {
output = output
.replace(