gluworld: rewrite to use new Gluon window object
This commit is contained in:
parent
79c8ea9997
commit
d873e8cc84
@ -8,7 +8,7 @@
|
||||
<body>
|
||||
<h1>
|
||||
Gluon <code id="gluon_version"></code> <br>
|
||||
built with <code id="glugun_version"></code>
|
||||
built with <code id="builder"></code>
|
||||
</h1>
|
||||
|
||||
<div id="versions">
|
||||
@ -24,7 +24,6 @@
|
||||
</div>
|
||||
|
||||
<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');
|
||||
|
||||
html, body {
|
||||
@ -74,5 +73,12 @@
|
||||
margin-top: 20vh;
|
||||
}
|
||||
</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>
|
||||
</html>
|
@ -6,17 +6,6 @@ import { join, dirname } from 'path';
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
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();
|
||||
}, {
|
||||
const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, undefined, {
|
||||
windowSize: [ 800, 450 ]
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user