-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
38 lines (35 loc) · 1.26 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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="./src/a-avataaar.js"></script>
<script type="module" src="node_modules/@vaadin/vaadin-text-field/vaadin-text-field.js"></script>
<script type="module" src="node_modules/j-elements/elements.js"></script>
<script type="module" src="node_modules/github-corner/index.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
j-card::part(content) {
display: flex;
align-items: center;
}
</style>
</head>
<body>
<github-corner><a
href="https://github.com/Artur-/a-avataaar"></a></github-corner>
<j-card>
<span slot="header">[email protected]</span>
<a-avataaar identifier="[email protected]"></a-avataaar>
</j-card>
<j-card>
<a-avataaar id="avataaar" identifier="Your name"></a-avataaar>
<vaadin-text-field id="input" value="Your name" slot="header"></vaadin-text-field>
</j-card>
<script>
const field = document.querySelector("#input");
field.addEventListener("value-changed", e => {
document.querySelector("#avataaar").setAttribute("identifier", field.value);
});
</script>
</body>