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 --- .babelrc | 9 +++++ .gitignore | 1 + client.html | 124 +++++++++++++++++++++++++++++++---------------------------- package.json | 29 ++++++++++++++ src/ui.js | 38 ++++++++++++++++++ 5 files changed, 143 insertions(+), 58 deletions(-) create mode 100644 .babelrc create mode 100644 package.json create mode 100644 src/ui.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..5d36355 --- /dev/null +++ b/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": [ + ["env", { + "targets": { + "browsers": ["last 2 versions", "ie >= 11"] + } + }] + ] + } \ No newline at end of file diff --git a/.gitignore b/.gitignore index cd2946a..a9c1763 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ $RECYCLE.BIN/ Network Trash Folder Temporary Items .apdisk +node_modules \ No newline at end of file diff --git a/client.html b/client.html index a9cec08..9db9c37 100644 --- a/client.html +++ b/client.html @@ -3,11 +3,74 @@ Attorney Online session + + + + + + + + + + + + + + + + + +

Loading

@@ -16,64 +79,9 @@
-
-
-
-
- Courtroom background - Character sprite - Bench overlay - Various overlay -
-

Dolan

-
-
-

-
-
- -
-
-
-
- Hold it! - OBJECTION! - Take That! -
- - -
-
-
-
Music
-
SFX
-
Blip
- -
-
-
-
-
-
- - Defense health - - - Prosecution health - -
-
-
- - -
- -
- - \ No newline at end of file + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..508a968 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "webao", + "version": "2.0.0", + "description": "Web-based Attorney Online client", + "main": "client.js", + "scripts": { + "babel": "babel ui.js -o ui.b.js", + "webpack": "webpack", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stonedDiscord/stonedDiscord.github.io.git" + }, + "author": "stonedDiscord", + "bugs": { + "url": "https://github.com/stonedDiscord/stonedDiscord.github.io/issues" + }, + "homepage": "https://github.com/stonedDiscord/stonedDiscord.github.io#readme", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-core": "^6.26.3", + "babel-preset-env": "^1.7.0", + "babel-preset-es2015": "^6.24.1", + "webpack": "^4.8.3", + "webpack-cli": "^2.1.3", + "uglify-es": "3.3.9" + } +} 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