forked from MapComplete/MapComplete
Butchering the UI framework
This commit is contained in:
parent
8d404b1ba9
commit
6415e195d1
90 changed files with 1012 additions and 3101 deletions
|
@ -14,7 +14,7 @@ import ValidatedTextField from "../UI/Input/ValidatedTextField";
|
|||
const TurndownService = require('turndown')
|
||||
|
||||
function WriteFile(filename, html: UIElement) : void {
|
||||
const md = new TurndownService().turndown(html.InnerRender());
|
||||
const md = new TurndownService().turndown(html.InnerRenderAsString());
|
||||
writeFileSync(filename, md);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,8 +88,8 @@ async function createManifest(layout: LayoutConfig) {
|
|||
console.log(icon)
|
||||
throw "Icon is not an svg for " + layout.id
|
||||
}
|
||||
const ogTitle = Translations.W(layout.title).InnerRender();
|
||||
const ogDescr = Translations.W(layout.description ?? "").InnerRender();
|
||||
const ogTitle = Translations.W(layout.title).InnerRenderAsString();
|
||||
const ogDescr = Translations.W(layout.description ?? "").InnerRenderAsString();
|
||||
|
||||
return {
|
||||
name: name,
|
||||
|
@ -109,8 +109,8 @@ async function createLandingPage(layout: LayoutConfig, manifest) {
|
|||
|
||||
Locale.language.setData(layout.language[0]);
|
||||
|
||||
const ogTitle = Translations.W(layout.title)?.InnerRender();
|
||||
const ogDescr = Translations.W(layout.shortDescription ?? "Easily add and edit geodata with OpenStreetMap")?.InnerRender();
|
||||
const ogTitle = Translations.W(layout.title)?.InnerRenderAsString();
|
||||
const ogDescr = Translations.W(layout.shortDescription ?? "Easily add and edit geodata with OpenStreetMap")?.InnerRenderAsString();
|
||||
const ogImage = layout.socialImage;
|
||||
|
||||
let customCss = "";
|
||||
|
|
|
@ -20,7 +20,7 @@ function generateWikiEntry(layout: LayoutConfig) {
|
|||
|region= Worldwide
|
||||
|lang= ${languages}
|
||||
|descr= A MapComplete theme: ${Translations.W(layout.description)
|
||||
.InnerRender()
|
||||
.InnerRenderAsString()
|
||||
.replace("<a href='", "[[")
|
||||
.replace(/'>.*<\/a>/, "]]")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue