From c26ac0e636a71b850fa316f5bead6ba263b55492 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Mon, 14 May 2018 22:45:56 -0500 Subject: Turn it into a node package to use GoldenLayout --- src/ui.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/ui.js (limited to 'src') diff --git a/src/ui.js b/src/ui.js new file mode 100644 index 0000000..ecbdb45 --- /dev/null +++ b/src/ui.js @@ -0,0 +1,38 @@ +import GoldenLayout from "./golden/js/goldenlayout.js"; + +var config = { + settings: { + showPopoutIcon: false + }, + content: [ + { + type: "row", + content: [ + { + type: "component", + componentName: "template", + componentState: { id: "client_wrapper" } + }, + { + type: "column", + content: [ + { + type: "component", + componentName: "template", + componentState: { id: "ooc" } + }, + { + type: "component", + componentName: "template", + componentState: { id: "music" } + }] + }] + }] +}; + +var golden = new GoldenLayout(config); +golden.registerComponent("template", function(container, componentState) { + container.getElement().html(document.querySelector("#" + componentState.id).content); +}); +golden.init(); +console.log("initializing"); \ No newline at end of file -- cgit