gluworld: rewrite to use new Gluon window object
This commit is contained in:
parent
79c8ea9997
commit
d873e8cc84
@ -8,7 +8,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>
|
<h1>
|
||||||
Gluon <code id="gluon_version"></code> <br>
|
Gluon <code id="gluon_version"></code> <br>
|
||||||
built with <code id="glugun_version"></code>
|
built with <code id="builder"></code>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div id="versions">
|
<div id="versions">
|
||||||
@ -24,7 +24,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Roboto:ital,wght@0,400;0,700;1,500&display=swap'); */
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800;900');
|
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800;900');
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
@ -74,5 +73,12 @@
|
|||||||
margin-top: 20vh;
|
margin-top: 20vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
chromium_version.textContent = Gluon.versions.chromium;
|
||||||
|
node_version.textContent = Gluon.versions.node;
|
||||||
|
gluon_version.textContent = Gluon.versions.gluon;
|
||||||
|
builder.textContent = Gluon.versions.builder;
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -6,17 +6,6 @@ import { join, dirname } from 'path';
|
|||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = dirname(__filename);
|
const __dirname = dirname(__filename);
|
||||||
|
|
||||||
Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, () => {
|
const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, undefined, {
|
||||||
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 ]
|
windowSize: [ 800, 450 ]
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user