-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
215 lines (184 loc) · 7.37 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<html>
<head>
<meta charset="UTF-8"/>
<title>TE Token Marketplace</title>
<favicon href="./images/favicon.ico" />
<style>
body {
width: 98%;
height: 92%;
background-image: url('./images/bg.png');
background-repeat: no-repeat;
background-size: cover;
}
h1 {color: rgb(198, 79, 214);}
h3, p {color: #5934c7; font-family: "Arial Unicode MS", Arial, sans-serif;}
#left-arrow {background: url('./images/left-arrow-49.png') no-repeat center center;}
#right-arrow {background: url('./images/right-arrow-49.png') no-repeat center center;}
#listing-selector {
display: flex;
width: 60%;
height: 9%;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 612px;
}
#listingid-selector {
display: flex;
width: 100%;
height: 100%;
}
#left-arrow, #right-arrow {
height: 100%;
width: 70px;
border: none;
cursor: pointer;
outline: none;
text-indent: -9999;
}
#left-arrow:hover, #right-arrow:hover {
color: #121212;
}
#left-arrow:active, #right-arrow:active {
background-color: #e6e6e6;
color: #121212;
}
#listing-id {
width: 90%;
height: 98%;
font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 3em;
text-align: center;
border: none;
color: gold;
background-color: black;
outline: white;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
#listing-iframe {
width: 60%;
height: 500px;
border-color: #121212;
position: absolute;
top: 100px;
left: 20%;
}
.leftmenu {
display: block;
width: 98%;
background: none;
position: absolute;
top: 15px;
text-align: center;
}
.tagline {
position: absolute;
top: 39px;
left: 50%;
transform: translateX(-50%);
}
.footer {
position: absolute;
bottom: 3.5em;
width: 98%;
height: 2.5rem;
color: #e6e6e6;
text-align: center;
}
@media screen and (max-width: 580px) {
/* styles for devices with a maximum width of 580px */
.listing-selector, .leftmenu, #listing-iframe {
width: 86%;
margin: 0 auto;
}
.leftmenu {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
}
}
</style>
</head>
<body>
<div align="center" width="98%">
<!-- Include the jQuery library -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<div id="listing-selector">
<img id = "logo" src="./images/te-logo.png" alt="Logo" />
<div id="listingid-selector">
<button id="left-arrow">←</button>
<input type="number" id="listing-id" min="0" max="4294967295">
<button id="right-arrow">→</button>
</div>
<div><h3>Browse by Listing</h3></div>
</div>
<leftmenu>
<div class="leftmenu">
<header>
<h1>Welcome to Tech Enterprises' NFT Markeplace</h1>
<div class="tagline"><p>1% os all transactions go to Tech Enterprises at 0x7cd396e9db879fda515ae946f99d91444e3f714b</p></div>
</header>
</div>
</leftmenu>
<script>
$(document).ready(function() {
// Initialize the listing ID input field with a default value
const maxListingID = 2;
$("#listing-id").val(0);
$("#chain-id").val("Polygon+Mainnet%22%2C%22chain%22%3A%22Polygon%22%2C%22rpc%22%3A%5B%22https%3A%2F%2Fpolygon.rpc.thirdweb.com%2F5a9bc94b87f7cbbbfbbc234bf1e07f0adf5f3cf3012c9f26f9fc9820d64df93a%22%5D%2C%22nativeCurrency%22%3A%7B%22name%22%3A%22MATIC%22%2C%22symbol%22%3A%22MATIC%22%2C%22decimals%22%3A18%7D%2C%22shortName%22%3A%22matic%22%2C%22chainId%22%3A137%2C%22testnet%22%3Afalse%2C%22slug%22%3A%22polygon%22%7D");
updateIFrameSrc();
// Define a function to update the iframe src with the new listingId
function updateIFrameSrc() {
var listingId = $("#listing-id").val();
var src="https://ipfs.thirdwebcdn.com/ipfs/QmfK9mw9eQKE9vCbtZht9kygpkNWffdwibsJPnCo7MBN4M/marketplace-v3.html?contract=0xE6Bf94D584e09636A39622286f3934E4815F05b9&chain=%7B%22name%22%3A%22Polygon+Mainnet%22%2C%22chain%22%3A%22Polygon%22%2C%22rpc%22%3A%5B%22https%3A%2F%2Fpolygon.rpc.thirdweb.com%2F5a9bc94b87f7cbbbfbbc234bf1e07f0adf5f3cf3012c9f26f9fc9820d64df93a%22%5D%2C%22nativeCurrency%22%3A%7B%22name%22%3A%22MATIC%22%2C%22symbol%22%3A%22MATIC%22%2C%22decimals%22%3A18%7D%2C%22shortName%22%3A%22matic%22%2C%22chainId%22%3A137%2C%22testnet%22%3Afalse%2C%22slug%22%3A%22polygon%22%7D&directListingId=" + listingId;
$("iframe").attr("src", src);
}
// Listen for clicks on the left arrow button
$("#left-arrow").click(function() {
var listingID = parseInt($("#listing-id").val());
if (listingID > 0) {
listingID--;
$("#listing-id").val(listingID);
updateIFrameSrc();
}
});
// Listen for clicks on the right arrow button
$("#right-arrow").click(function() {
var listingID = parseInt($("#listing-id").val());
if (listingID < maxListingID) {
listingID++;
$("#listing-id").val(listingID);
updateIFrameSrc();
} else {
console.log("Attempting to exceed max listing_id value");
}
});
// Listen for changes to the listing ID input field
$("#listing-id").change(function() {
var listingID = parseInt($("#listing-id").val());
if (isNaN(listingID) || listingID < 0 || listingID > 4294967295) {
$("#listing-id").val(0);
updateIFrameSrc();
}
});
});
</script>
<iframe id="listing-iframe"
src="https://ipfs.thirdwebcdn.com/ipfs/QmfK9mw9eQKE9vCbtZht9kygpkNWffdwibsJPnCo7MBN4M/marketplace-v3.html?contract=0xE6Bf94D584e09636A39622286f3934E4815F05b9&chain=%7B%22name%22%3A%22Polygon+Mainnet%22%2C%22chain%22%3A%22Polygon%22%2C%22rpc%22%3A%5B%22https%3A%2F%2Fpolygon.rpc.thirdweb.com%2F5a9bc94b87f7cbbbfbbc234bf1e07f0adf5f3cf3012c9f26f9fc9820d64df93a%22%5D%2C%22nativeCurrency%22%3A%7B%22name%22%3A%22MATIC%22%2C%22symbol%22%3A%22MATIC%22%2C%22decimals%22%3A18%7D%2C%22shortName%22%3A%22matic%22%2C%22chainId%22%3A137%2C%22testnet%22%3Afalse%2C%22slug%22%3A%22polygon%22%7D&directListingId=0"
></iframe>
<footer>
<div class="footer">
<p>© 2021 Tech Enterprises<br/>
Special thanks to Zodiach.com and thirdweb.com<br/>
DeFi (<em>Decentralized Finance</em>) secured by the Polygon Network</p>
</div>
</footer>
</div>
</body>
</html>