-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.html
107 lines (105 loc) · 2.5 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script type="module" src="./example/dist/index.js"></script>
<title>ENS Avatar Resolver Library Demo</title>
</head>
<body>
<div class="container">
<div id="avatars"></div>
<div class="queryContainer">
<div id="headerContainer">
<h2>Query ENS Avatar</h2>
<div>
<img
class="queryImage"
id="queryImage"
width="300"
height="300"
src="./example/ens.png"
/>
<div>
<input
class="queryInput"
id="queryInput"
type="text"
placeholder="vitalik.eth"
autofocus
autocomplete="off"
/>
<div class="hint">
(type ENS name and hit the enter button)
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<style>
body {
font-family: 'Helvetica', serif;
}
#avatars {
position: absolute;
inset: 0;
display: grid;
background: black;
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
grid-template-rows: repeat(auto-fill, minmax(20rem, 1fr));
align-items: center;
justify-items: center;
transition: 0.2 grid-template-columns;
opacity: 0.3;
overflow: hidden;
pointer-events: none;
user-select: none;
}
#headerContainer {
height: 100%;
background-position: 0 55px;
background-repeat: no-repeat;
background-size: contain;
}
.hint {
margin-top: 0.5rem;
color: #aaa;
}
.queryContainer {
position: absolute;
inset: 0;
margin: auto;
opacity: 1;
width: 50%;
min-width: 20rem;
height: 30rem;
background-color: white;
border-radius: 1.5rem;
border: 1px solid #eee;
box-shadow: 0.2rem 0.4rem 1rem #ccc;
padding: 3rem 2.5rem;
/* text */
text-align: center;
}
.queryImage,
.queryInput {
border-radius: 0.3rem;
}
.queryImage {
object-fit: contain;
border: 5px solid white;
border-radius: 5px;
outline: #d6d6d6 solid 2px;
}
.queryInput {
width: 19rem;
box-sizing: border-box;
padding: 0.5rem 0.5rem;
margin-top: 10px;
text-align: center;
font-size: 1.4rem;
border: 1px solid #bbb;
}
</style>
</html>