-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
88 lines (87 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>better-img-nutmeg demos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://nutmeg.tools/favicon.png">
<script src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script>
<script>
function logMe(err) {
console.log('me ', err);
}
</script>
<style>
.container {
align-items: center;
display: flex;
flex-direction: column;
font-family: Helvetica, arial, sans-serif;
}
.demo {
align-items: center;
display: flex;
justify-content: center;
margin: 1em;
width: 80%;
}
figcaption {
font-size: 1.3em;
padding: 1em;
width: 50%;
}
</style>
</head>
<body>
<div class="container">
<h1><better-img-nutmeg></h1>
<div class="demo">
<better-img-nutmeg
url="https://placeimg.com/300/300/animals"
alt="cute animal"
fallback="http://placehold.it/300x300"
log="logMe"
width="300"
height="300">
</better-img-nutmeg>
<figcaption>
<code>
<better-img-nutmeg<br>
url="https://placeimg.com/300/300/animals"<br>
alt="cute animal"<br>
fallback="http://placehold.it/300x300"<br>
log="logMe"<br>
width="300"</br>
height="300"><br>
</better-img-nutmeg>
</code>
</figcaption>
</div>
<div class="demo">
<better-img-nutmeg
url="https://oopsie"
alt="cute animal"
fallback="http://placehold.it/300x300"
log="logMe"
width="300"
height="300">
<div>A caption in the slot</div>
</better-img-nutmeg>
<figcaption>
<code>
<better-img-nutmeg<br>
url="https://oopsie"<br>
alt="cute animal"<br>
fallback=http://placehold.it/300x300"<br>
log="logMe"<br>
width="300"<br>
height="300"><br>
<div>A caption in the slot</div><br>
</better-img-nutmeg>
</code>
</figcaption>
</demo>
</div>
<!-- In development `better-img-nutmeg.bundled.js` will automatically be loaded. -->
</body>
</html>