forked from MapComplete/MapComplete
More work on the custom theme generator, kindof works now
This commit is contained in:
parent
1fa6a8edfb
commit
ee9c9e201f
24 changed files with 1192 additions and 2265 deletions
|
@ -10,9 +10,15 @@ import {GenerateEmpty} from "./UI/CustomGenerator/GenerateEmpty";
|
|||
import PageSplit from "./UI/Base/PageSplit";
|
||||
import HelpText from "./Customizations/HelpText";
|
||||
import {TagRendering} from "./Customizations/TagRendering";
|
||||
import {FromJSON} from "./Customizations/JSON/FromJSON";
|
||||
import {LayoutConfigJson} from "./Customizations/JSON/LayoutConfigJson";
|
||||
|
||||
|
||||
const es = new UIEventSource(GenerateEmpty.createTestLayout());
|
||||
let layout = GenerateEmpty.createTestLayout();
|
||||
if(window.location.hash.length > 10){
|
||||
layout = JSON.parse(atob(window.location.hash.substr(1))) as LayoutConfigJson;
|
||||
}
|
||||
const es = new UIEventSource(layout);
|
||||
const encoded = es.map(config => btoa(JSON.stringify(config)));
|
||||
const liveUrl = encoded.map(encoded => `./index.html?userlayout=${es.data.id}#${encoded}`)
|
||||
const iframe = liveUrl.map(url => `<iframe src='${url}' width='100%' height='99%' style="box-sizing: border-box" title='Theme Preview'></iframe>`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue