-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
84 lines (74 loc) · 2.96 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
<!doctype html>
<html lang="en">
<head>
<title><component-anatomy> example page</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Prompt&display=swap" rel="stylesheet">
<style>
:root {
}
body {
font-family: Prompt, sans-serif;
font-size: 1.5rem;
color: black;
}
a { color: inherit !important; }
p { max-width: 900px; margin: 1em auto}
h1 { text-align: center; }
section {
max-width: 900px;
margin: 1rem auto;
border-top: 1px solid #ddd;
display: flex;
flex-direction: column;
align-items: center;
}
</style>
<script src="dist/index.iife.js" defer></script>
</head>
<body>
<h1>
<a href="https://github.com/ddamato/component-anatomy"><component-anatomy/></a>
</h1>
<p>A native web-component which can identify parts of a figure; expected to be used in documentation pages to name pieces of a component.</p>
<section>
<h2>Use with an image (edit off)</h2>
<component-anatomy definitions="W3sieCI6IjIwJSIsInkiOiIyNSUiLCJ0ZXJtIjoiVG9wIGxlZnQifSx7IngiOiI3MSUiLCJ5IjoiNTYlIiwidGVybSI6IkJvdHRvbSByaWdodCJ9XQ==">
<img src="https://picsum.photos/500/300"/>
</component-anatomy>
</section>
<section>
<h2>Use with a component (edit off)</h2>
<component-anatomy definitions="W3sieCI6IjY0JSIsInkiOiI1MyUiLCJ0ZXJtIjoiQnV0dG9uIHRleHQifV0=">
<div style="padding: 2rem">
<button type="button">Click me</button>
</div>
</component-anatomy>
</section>
<section>
<h2>Use with a link (edit off)</h2>
<component-anatomy definitions="W3sieCI6IjIwJSIsInkiOiIyNSUiLCJ0ZXJtIjoiSGVyZSBpcyBhIFtsaW5rIHRvIHNvbWV3aGVyZV0oI3NvbWV3aGVyZSkifSx7IngiOiI3MSUiLCJ5IjoiNTYlIiwidGVybSI6IltKdXN0IGEgbGlua10oI2xpbmspIn1d">
<img src="https://picsum.photos/500/300"/>
</component-anatomy>
</section>
<section>
<h2>Turn on editing</h2>
<component-anatomy edit definitions="W3sieCI6IjQ5JSIsInkiOiIxMiUiLCJ0ZXJtIjoiVG9wIGNlbnRlciJ9LHsieCI6IjQ5JSIsInkiOiI4MSUiLCJ0ZXJtIjoiQm90dG9tIGNlbnRlciJ9XQ==">
<img src="https://picsum.photos/500/300"/>
</component-anatomy>
</section>
<section>
<h2>Change orientation (edit on)</h2>
<component-anatomy edit orientation="vertical" definitions="W3sieCI6IjQwJSIsInkiOiIyMSUiLCJ0ZXJtIjoiUG9pbnQgMSJ9LHsieCI6IjYzJSIsInkiOiI0OSUiLCJ0ZXJtIjoiUG9pbnQgMiJ9LHsieCI6IjIxJSIsInkiOiI2MiUiLCJ0ZXJtIjoiUG9pbnQgMyJ9XQ">
<img src="https://picsum.photos/500/300"/>
</component-anatomy>
</section>
<section>
<h2>Change placeholder (edit on)</h2>
<component-anatomy edit placeholder="My example">
<img src="https://picsum.photos/500/300"/>
</component-anatomy>
</section>
</body>
</html>