-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (74 loc) · 1.92 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<html>
<head>
<meta charset="UTF-8" />
<style>
body {
margin: 0;
background: linear-gradient(-45deg, #a6a6a6, #5ac05a, #666565, #a6a6a6);
background-size: 400% 400%;
animation: gradient 15s ease infinite;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
canvas {
background-color: white;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
/* example from https://getcssscan.com/css-buttons-examples */
.button-89 {
--b: 3px;
/* border thickness */
--s: .45em;
/* size of the corner */
--color: #373B44;
padding: calc(.5em + var(--s)) calc(.9em + var(--s));
color: var(--color);
--_p: var(--s);
background:
conic-gradient(from 90deg at var(--b) var(--b), #0000 90deg, var(--color) 0) var(--_p) var(--_p)/calc(100% - var(--b) - 2*var(--_p)) calc(100% - var(--b) - 2*var(--_p));
transition: .3s linear, color 0s, background-color 0s;
outline: var(--b) solid #0000;
outline-offset: .6em;
font-size: 16px;
border: 0;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
.button-89:hover,
.button-89:focus-visible {
--_p: 0px;
outline-color: var(--color);
outline-offset: .05em;
}
.button-89:active {
background: var(--color);
color: #fff;
}
</style>
</head>
<script type="module">
import init from "./out/alchemist_apprentice.js"
async function myFunction() {
const ele = document.getElementById("play")
ele.style.display = "none"
init()
}
window.myFunction = myFunction
</script>
<body>
<button id="play" class="button-89" onclick="myFunction()">Play</button>
</body>
</html>