forked from btmills/geopattern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (65 loc) · 2.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>GeoPattern WASM Demo</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.css" />
<style>
html, body {
width: 100%;
height: 100%;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 'Helvetica Neue', Ubuntu, Cantarell, 'Open Sans', sans-serif;
}
#container {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#article {
padding: 20px 60px;
background-color: rgba(255, 255, 255, 0.2);
max-width: 60%;
}
#input {
width: 100%;
font-size: 1.5em;
padding: 0.25em;
}
@media screen and (max-width: 480px) {
#article {
padding: 20px;
max-width: 100%;
}
#input {
font-size: 1em;
padding: 0;
}
}
</style>
</head>
<body>
<div id="container">
<div id="article">
<p>
<input type="text" name="input" id="input" placeholder="type here to generate a pattern in real time">
</p>
<p>
This is a demo of the wasm build of geopattern, a rust crate by me.
<a href="https://crates.io/crates/geopattern">geopattern</a> is a rust implementation of the <a href="https://github.com/jasonlong/geo_pattern">geo_pattern ruby library</a> by <a href="https://github.com/jasonlong">Jason Long</a>
</p>
<p>
This demo is built using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>, a tool to export JavaScript modules for rust crates built using <a href="https://github.com/rustwasm/wasm-bindgen">wasm-bindgen</a>.
</p>
<p>
The example is based on the <a href="https://www.hellorust.com/demos/sha1/index.html">SHA1 digest example at hellorust</a>, except instead of a SHA1 digest, this shows the geopattern.
</p>
</div>
</div>
<script src="./bootstrap.js"></script>
</body>
</html>