Merge branch 'master' into add-tailwind-for-homepage

This commit is contained in:
pietervdvn 2021-01-18 01:52:37 +01:00
commit 6864ba4fd6
4 changed files with 8 additions and 9 deletions

View file

@ -35,11 +35,11 @@ export default class Ornament extends UIElement {
} }
InnerRender(): string { InnerRender(): string {
if(this._index.data == "0"){ const svg = Svg.All[`Ornament-Horiz-${Number(this._index.data) - 1}.svg`];
if (this._index.data == "0" || svg === undefined) {
return "<svg></svg>" return "<svg></svg>"
} }
console.log(this._index.data) return svg;
return Svg.All[`Ornament-Horiz-${Number(this._index.data) - 1}.svg`]
} }
} }

View file

@ -133,8 +133,7 @@
"then": "Schwalbe tubes are sold here" "then": "Schwalbe tubes are sold here"
} }
], ],
"multiAnswer": true, "multiAnswer": true
"condition": "operator!=Schwalbe"
}, },
{ {
"question": "Who maintains this vending machine?", "question": "Who maintains this vending machine?",

View file

@ -18,7 +18,7 @@
"generate": "npm run generate:images && npm run generate:translations", "generate": "npm run generate:images && npm run generate:translations",
"build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", "build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*",
"prepare-deploy": "npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache", "prepare-deploy": "npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache",
"deploy:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "deploy:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/Staging/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/Staging/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean",
"deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/mapcomplete.github.io/* && cp -r dist/* /home/pietervdvn/git/mapcomplete.github.io/ && cd /home/pietervdvn/git/mapcomplete.github.io/ && echo \"mapcomplete.osm.be\" > CNAME && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/mapcomplete.github.io/* && cp -r dist/* /home/pietervdvn/git/mapcomplete.github.io/ && cd /home/pietervdvn/git/mapcomplete.github.io/ && echo \"mapcomplete.osm.be\" > CNAME && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean",
"clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(index\\|land\\|test\\|preferences\\|customGenerator\\).html\" | xargs rm) && rm *.webmanifest" "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(index\\|land\\|test\\|preferences\\|customGenerator\\).html\" | xargs rm) && rm *.webmanifest"
}, },

View file

@ -127,7 +127,7 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
/* /*
// We already read to file, in order to crash here if the file is not found // We already read to file, in order to crash here if the file is not found
readFileSync(iconPath); readFileSync(iconPath);
svg2img(iconPath, /* svg2img(iconPath,
// @ts-ignore // @ts-ignore
{width: size, height: size, preserveAspectRatio: true}) {width: size, height: size, preserveAspectRatio: true})
.then((buffer) => { .then((buffer) => {