forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (54 loc) · 1.59 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<!-- Copyright © SixtyFPS GmbH <[email protected]> -->
<!-- SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial -->
<html>
<head>
<meta charset="UTF-8">
<title>Slint Slide Puzzle Demo (Web Assembly version)</title>
</head>
<link rel="stylesheet" href="https://slint-ui.com/css/demos-v1.css">
<style>
body {
padding: 0px;
margin: 0px;
max-width: none;
}
#container {
display: grid;
justify-items: stretch;
align-content: stretch;
align-items: stretch;
flex-direction: column;
width: 100vw;
height: 100vh;
padding: 0px;
margin: 0px;
grid-template-columns: auto;
grid-template-rows: max-content auto max-content;
}
</style>
<body>
<div id="spinner" style="position: absolute; top: 50%; width: 100%">
<div class="spinner">Loading...</div>
</div>
<div id="container">
<p>This is the <a href="https://slint-ui.com">Slint</a> Slide Puzzle compiled to WebAssembly. Note that the wasm
build is done for demonstration purposes. Native applications are the real target of the toolkit.
</p>
<canvas id="canvas"></canvas>
<p class="links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/slide_puzzle/">
View Source Code on GitHub</a> -
<a href="https://slint-ui.com/editor?load_demo=examples/slide_puzzle/slide_puzzle.slint">
Open in SlintPad
</a>
</p>
</div>
<script type="module">
import init from './pkg/slide_puzzle.js';
init().finally(() => {
document.getElementById("spinner").remove();
});
</script>
</body>
</html>