From d605f783af52adbcb8f828e3af1c1079d9039028 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Fri, 9 Dec 2022 18:00:55 +0000 Subject: [PATCH] gluworld: rewrite into cool app --- gluworld/index.html | 72 +++++++++++++++++++++++++++++++++++++++++-- gluworld/index.js | 15 ++++++++- gluworld/package.json | 1 + 3 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 gluworld/package.json diff --git a/gluworld/index.html b/gluworld/index.html index 3e71e95..c73bdb8 100644 --- a/gluworld/index.html +++ b/gluworld/index.html @@ -2,9 +2,77 @@ - Welcome to Gluon! + + Gluworld -

Welcome to Gluon!

+

+ Gluon
+ built with +

+ +
+

+ Chromium
+ +

+ +

+ Node
+ +

+
+ + \ No newline at end of file diff --git a/gluworld/index.js b/gluworld/index.js index fbb8eab..9d9ffe2 100644 --- a/gluworld/index.js +++ b/gluworld/index.js @@ -6,4 +6,17 @@ import { join, dirname } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href); \ No newline at end of file +Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, () => { + const setVersions = () => { + if (typeof chromium_version === 'undefined') return setTimeout(setVersions, 100); + + chromium_version.textContent = CHROMIUM_VERSION; + node_version.textContent = NODE_VERSION; + gluon_version.textContent = GLUON_VERSION; + glugun_version.textContent = 'GLUGUN_VERSION' === 'G\LUGUN_VERSION' ? 'nothing' : 'Glugun GLUGUN_VERSION'; + }; + + setVersions(); +}, { + windowSize: [ 800, 450 ] +}); \ No newline at end of file diff --git a/gluworld/package.json b/gluworld/package.json new file mode 100644 index 0000000..bb34440 --- /dev/null +++ b/gluworld/package.json @@ -0,0 +1 @@ +{ "type": "module" } \ No newline at end of file