-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
186 lines (162 loc) · 4.48 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>NiftyKit Components</title>
<script type="module" src="/build/components.esm.js"></script>
<script nomodule src="/build/components.js"></script>
<style>
h2,
h3 {
text-align: center;
}
body {
font-family: 'Roboto', sans-serif;
font-size: 14px;
line-height: 1.5;
color: #444;
background: #f5f5f5;
}
.widgets {
text-align: center;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 10px;
}
.widget {
flex-direction: column;
flex-basis: calc(50% - 20px);
}
.widget>* {
margin-bottom: 10px;
}
/* nk-dropkit::part(wallet-btn) {
color: black;
background-color: white;
border-color: black;
border: 2px solid;
box-shadow: none;
font-size: large;
width: 300px;
height: 75px;
border-radius: 40px;
}
nk-dropkit::part(mint-btn) {
color: black;
background-color: white;
border-color: black;
border: 2px solid;
box-shadow: none;
font-size: large;
width: 300px;
height: 75px;
max-height: none !important;
border-radius: 40px;
}
nk-dropkit::part(mint-text) {
color: black;
font-size: large;
}
nk-dropkit::part(mint-dropdown-icon) {
fill: black;
}
nk-dropkit::part(info) {
font-size: large;
} */
nk-supply::part(supply-text) {
font-size: large;
}
</style>
</head>
<body>
<h2>Dropkit</h2>
<div>
<div class="dropkit">
<h3>Mumbai</h3>
<nk-dropkit id="mumbai" apikey="l2jCASkzMpuvg6K7uDuo" dev="true"></nk-dropkit>
</div>
<div class="dropkit">
<h3>Goerli</h3>
<h3 id="supply"></h3>
<nk-dropkit id="goerli" apikey="Kg6JG8nYUQ74IIYq5y6F" dev="true" wallet-text="Hello World" mint-text="Buy">
</nk-dropkit>
</div>
<p style="text-align: center;">
Edit it on <a href="https://codepen.io/jcurbelo/pen/NWwoPYe">Codepen</a>
</p>
</div>
<h2>Child Components</h2>
<div class="widgets">
<div class="widget connect-wallet">
<h3>Connect Wallet Button</h3>
<nk-wallet-button>Connect Wallet</nk-wallet-button>
<nk-wallet-button disabled="true">Connect Wallet</nk-wallet-button>
<nk-wallet-button disabled="true" loading="true">Connect Wallet</nk-wallet-button>
</div>
<div class="widget mint-button">
<h3>Mint Button</h3>
<nk-mint-button max-per-mint="10"></nk-mint-button>
<nk-mint-button selected-value="2" disabled="true" max-per-mint="10"></nk-mint-button>
<nk-mint-button selected-value="2" disabled="true" loading="true" max-per-mint="10"></nk-mint-button>
</div>
<div class="widget message">
<h3>Messages</h3>
<nk-error-message>Alert Content</nk-error-message>
<nk-success-message>Alert Content</nk-success-message>
</div>
<div class="widget loading">
<h3>Progress</h3>
<nk-loading></nk-loading>
</div>
<div class="widget supply">
<h3>Supply</h3>
<nk-supply apikey="Kg6JG8nYUQ74IIYq5y6F" dev="true">
<p>Goerli</p>
</nk-supply>
<nk-supply apikey="l2jCASkzMpuvg6K7uDuo" dev="true">
<p> Mumbai </p>
</nk-supply>
<nk-supply apikey="AHN5MP6tExXVkvNlRaCR">
<p>Mainnet </p>
</nk-supply>
<nk-supply apikey="KSqylc30feNC2ZbssdvO">
<p> Polygon </p>
</nk-supply>
</div>
<div class="widget sold-out">
<h3>Sold Out</h3>
<nk-sold-out>
Sold Out
</nk-sold-out>
</div>
</div>
<script>
const drop = document.getElementById('goerli');
drop.addEventListener('walletConnected', event => {
console.log({
event
});
const collection = event.detail;
console.log({
collection
});
const supply = document.getElementById('supply');
supply.innerHTML = `${collection.totalSupply}/${collection.maxAmount}`;
});
drop.addEventListener('minted', event => {
console.log({
event
});
const collection = event.detail;
console.log({
collection
});
const supply = document.getElementById('supply');
supply.innerHTML = `${collection.totalSupply}/${collection.maxAmount}`;
});
</script>
</body>
</html>