Fix icons

This commit is contained in:
pietervdvn 2022-03-10 16:26:25 +01:00
parent 56e850316e
commit 7acaafae1f
13 changed files with 92 additions and 92 deletions

View file

@ -15,16 +15,16 @@
<meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it." <meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it."
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<style> <style>

View file

@ -27,7 +27,6 @@ export default class LanguagePicker {
const allTranslations = (language_translations["default"] ?? language_translations) const allTranslations = (language_translations["default"] ?? language_translations)
const translation = {} const translation = {}
const trans = allTranslations[lang] const trans = allTranslations[lang]
console.log("Generating a hybrid for "+lang, trans)
if(trans === undefined){ if(trans === undefined){
return new Translation({"*": nativeText}) return new Translation({"*": nativeText})
} }

View file

@ -121,7 +121,7 @@ export default class MultiApply extends Toggle {
const p = params const p = params
const t = Translations.t.multi_apply const t = Translations.t.multi_apply
const featureId = p.tagsSource.data.id const featureId = p.tagsSource.data.id
if (featureId === undefined) { if (featureId === undefined) {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View file

@ -140,7 +140,7 @@
"id": "etymology_multi_apply", "id": "etymology_multi_apply",
"render": { "render": {
"en": "{multi_apply(_same_name_ids, name:etymology:wikidata;name:etymology, Auto-applying data on all segments with the same name, true)}", "en": "{multi_apply(_same_name_ids, name:etymology:wikidata;name:etymology, Auto-applying data on all segments with the same name, true)}",
"nl": "{multi_apply(_same_name_ids, name:etymology:wikidata,name:etymology, Wijzigingen worden automatisch gedaan op alle segmenten met dezelfde naam, true)}" "nl": "{multi_apply(_same_name_ids, name:etymology:wikidata;name:etymology, Wijzigingen worden automatisch gedaan op alle segmenten met dezelfde naam, true)}"
} }
}, },
{ {

View file

@ -21,16 +21,16 @@
<meta content="Page to perform automatic actions with MapComplete" <meta content="Page to perform automatic actions with MapComplete"
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<style> <style>
#decoration-desktop img { #decoration-desktop img {

View file

@ -21,16 +21,16 @@
<meta content="Page to 'import' data as notes'" <meta content="Page to 'import' data as notes'"
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<style> <style>
#decoration-desktop img { #decoration-desktop img {

View file

@ -16,16 +16,16 @@
<meta content="Page to 'import' data as notes'" <meta content="Page to 'import' data as notes'"
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<style> <style>
#decoration-desktop img { #decoration-desktop img {

View file

@ -24,16 +24,16 @@
<meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it." <meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it."
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<!-- THEME-SPECIFIC-END--> <!-- THEME-SPECIFIC-END-->

View file

@ -9,52 +9,52 @@
"orientation": "portrait-primary, landscape-primary", "orientation": "portrait-primary, landscape-primary",
"icons": [ "icons": [
{ {
"src": "assets/generated/images/mapcomplete_logo72.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo72.png",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo96.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo96.png",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo120.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo120.png",
"sizes": "120x120", "sizes": "120x120",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo128.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo128.png",
"sizes": "128x128", "sizes": "128x128",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo144.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo144.png",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo152.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo152.png",
"sizes": "152x152", "sizes": "152x152",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo180.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo180.png",
"sizes": "180x180", "sizes": "180x180",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo192.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo192.png",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo384.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo384.png",
"sizes": "384x384", "sizes": "384x384",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "assets/generated/images/mapcomplete_logo512.png", "src": "assets/generated/images/assets_svg_mapcomplete_logo512.png",
"sizes": "512x512", "sizes": "512x512",
"type": "image/png" "type": "image/png"
}, },

View file

@ -3056,7 +3056,7 @@
"name": "Heeft etymology info", "name": "Heeft etymology info",
"tagRenderings": { "tagRenderings": {
"etymology_multi_apply": { "etymology_multi_apply": {
"render": "{multi_apply(_same_name_ids, name:etymology:wikidata,name:etymology, Wijzigingen worden automatisch gedaan op alle segmenten met dezelfde naam, true)}" "render": "{multi_apply(_same_name_ids, name:etymology:wikidata;name:etymology, Wijzigingen worden automatisch gedaan op alle segmenten met dezelfde naam, true)}"
}, },
"simple etymology": { "simple etymology": {
"mappings": { "mappings": {

View file

@ -25,7 +25,7 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string
name = name.substr(2) name = name.substr(2)
} }
const newname = `assets/generated/images${name.substring(name.lastIndexOf("/"))}${size}.png`; const newname = `assets/generated/images/${name.replace(/\//g,"_")}${size}.png`;
if (alreadyWritten.indexOf(newname) >= 0) { if (alreadyWritten.indexOf(newname) >= 0) {
return newname; return newname;
@ -44,7 +44,7 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string
let img = await sharp(iconPath) let img = await sharp(iconPath)
let resized = await img.resize(size) let resized = await img.resize(size)
await resized.toFile(newname) await resized.toFile(newname)
console.log("Written", newname) console.log("Created png version at ", newname)
} catch (e) { } catch (e) {
console.error("Could not read icon", iconPath, " to create a PNG due to", e) console.error("Could not read icon", iconPath, " to create a PNG due to", e)
} }
@ -59,7 +59,7 @@ async function createSocialImage(layout: LayoutConfig, template: "" | "Wide"): P
} }
const path = `./assets/generated/images/social_image_${layout.id}_${template}.svg` const path = `./assets/generated/images/social_image_${layout.id}_${template}.svg`
if(existsSync(path)){ if(existsSync(path)){
// return path; return path;
} }
const svg = await ScriptUtils.ReadSvg(layout.icon) const svg = await ScriptUtils.ReadSvg(layout.icon)
let width: string = svg.$.width; let width: string = svg.$.width;
@ -98,7 +98,7 @@ async function createSocialImage(layout: LayoutConfig, template: "" | "Wide"): P
const builder = new xml2js.Builder(); const builder = new xml2js.Builder();
const xml = builder.buildObject({svg: templateSvg}); const xml = builder.buildObject({svg: templateSvg});
writeFileSync(path, xml) writeFileSync(path, xml)
console.log("Written", path) console.log("Created social image at ", path)
return path return path
} }

View file

@ -24,16 +24,16 @@
<meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it." <meta content="MapComplete is a platform to visualize OpenStreetMap on a specific topic and to easily contribute data back to it."
property="og:description"> property="og:description">
<link href="./assets/generated/images/mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo512.png" rel="apple-touch-icon" sizes="512x512">
<link href="./assets/generated/images/mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo384.png" rel="apple-touch-icon" sizes="384x384">
<link href="./assets/generated/images/mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo192.png" rel="apple-touch-icon" sizes="192x192">
<link href="./assets/generated/images/mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo180.png" rel="apple-touch-icon" sizes="180x180">
<link href="./assets/generated/images/mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo152.png" rel="apple-touch-icon" sizes="152x152">
<link href="./assets/generated/images/mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo144.png" rel="apple-touch-icon" sizes="144x144">
<link href="./assets/generated/images/mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo128.png" rel="apple-touch-icon" sizes="128x128">
<link href="./assets/generated/images/mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo120.png" rel="apple-touch-icon" sizes="120x120">
<link href="./assets/generated/images/mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo96.png" rel="apple-touch-icon" sizes="96x96">
<link href="./assets/generated/images/mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72"> <link href="./assets/generated/images/assets_svg_mapcomplete_logo72.png" rel="apple-touch-icon" sizes="72x72">
<!-- THEME-SPECIFIC-END--> <!-- THEME-SPECIFIC-END-->