Skip to content

Commit

Permalink
(add) index.html for github pages WASM preview
Browse files Browse the repository at this point in the history
  • Loading branch information
GaspardCulis committed May 1, 2023
1 parent c435aed commit f022e5a
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="center">
<h1> Tetris game made with Slint </h1>
<canvas id="canvas"></canvas>
<script type="module">
// import the generated file.
import init from './pkg/tetris_slint.js';

document.getElementById("canvas").focus();

init();
</script>
<footer>
<a href="https://github.com/GaspardCulis/slint-tetris">
View Source Code on GitHub</a>
</footer>
</div>
</body>
<style>
body {
padding: 0px;
margin: 0px;
max-width: none;

background-color: whitesmoke;
}

canvas {
border-radius: 10px;
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.2);

align-self: center;
}

#center {
display: flex;
justify-content: space-between;
align-content: stretch;
align-items: stretch;
flex-direction: column;
width: 100vw;
height: 100vh;
padding: 0px;
margin: 0px;
}

h1 {
text-align: center;
}

footer {
display: flex;
align-items: center;
justify-content: center;

padding: 2rem;

background-color: black;
}

a {
color: yellow;
}

</style>
</html>

0 comments on commit f022e5a

Please sign in to comment.