-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (49 loc) · 1.21 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
<!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>@small-tech/spinners JavaScript example</title>
<style>
body {
font-family: sans-serif;
}
pre {
background: black;
color: white;
font-size: 1.25em;
padding: 1em;
}
</style>
</head>
<body>
<main>
<h1>@small-tech/spinners JavaScript example</h1>
<h2>Lines</h2>
<div id='lines'></div>
<h2>Dots</h2>
<span id='dots'></span>
<script type='module'>
import { Lines, Dots } from 'https://unpkg.com/@small-tech/spinners@1.0.0/dist/index.mjs'
const lines = new Lines({
target: document.getElementById('lines'),
props: {
size: '3em',
colour: 'SlateGrey'
}
})
const dots = new Dots({
target: document.getElementById('dots'),
props: {
size: '3em'
}
})
</script>
</main>
<details open>
<summary>View Source</summary>
<pre><code><script>document.write(document.getElementsByTagName('main')[0].outerHTML.replace(/\</g, '<').replace(/\>/g, '>'))</script></code></pre>
</details>
</body>
</html>