From f5e2c7245b381d3423c5acdbe2b81bd467c6e88a Mon Sep 17 00:00:00 2001 From: Hritwik Tripathi Date: Sun, 4 Jul 2021 18:39:00 +0530 Subject: [PATCH] almost all frontend done --- assets/toast.png | Bin 0 -> 2071 bytes css/dist/main.css | 58 +++++++++++++++++++++++++++++ css/main.scss | 62 ++++++++++++++++++++++++++++++ index.html | 28 ++++++++++++++ js/dist/index.dev.js | 48 ++++++++++++++++++++++++ js/index.js | 87 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 283 insertions(+) create mode 100644 assets/toast.png create mode 100644 css/dist/main.css create mode 100644 css/main.scss create mode 100644 index.html create mode 100644 js/dist/index.dev.js create mode 100644 js/index.js diff --git a/assets/toast.png b/assets/toast.png new file mode 100644 index 0000000000000000000000000000000000000000..ca344c4d35958a533914b81b0b8f86c5658a7514 GIT binary patch literal 2071 zcmV+y2 zOxV~{vxiz4PE9ptHZnGin%UFL8K-7SMiG-JriV|WLPdlEvZ#P0K!IO>tb6*MbM86! zchBYC%MYgS%%0yp`|Q2;TI=k+_F8N2AODA^V=dNUPJ?#6cn}X^dKdWW8s3k-TKN}V zT+pT$e^0f$q-)%D7(E!1dLEBkWtGs2+b}UzH@fqzbqB)=>JlZ)$K&dSKdMlq0741N zYrm@sKL#Jff3Qp}nL&;7^snuoU`y&bDLZg|>iN9qXNCAWrdhu+{3l9qlXr6=N_yTUn)LQ*SjH*DpBPcV1t>O&@b#KQEF&omj2Y+kx z_?1yM16sjQv0M^tsr?Lf8^>-LJ=l9QV693_VILi`(FOVzE^SOG~{rQfq`3Ef-*W!Q?R;(*vK4u~c2PCOvK z_BbKv>+lZQ5PcI)6t?Av#0A(TjASzyfzM)}{+Y14Gpr46oQOyDE8&%`5IK^K$Y1aT z5n>ZN%ZjQ*+7%2XfzY?{3)vh%Cz1YuEp3a3Y6NHE-8dajOV!^dlBxq?Jf10B<_RKi zutT`hzZbTl48ugwHL3ReYTQwQ_m(jQAI05@x2A*mNI}1$VrE<*BEiii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>(2lH002ovPDHLkV1h{D B<=g-O literal 0 HcmV?d00001 diff --git a/css/dist/main.css b/css/dist/main.css new file mode 100644 index 0000000..133a4ed --- /dev/null +++ b/css/dist/main.css @@ -0,0 +1,58 @@ +@import url("https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"); +* { + margin: 0px; + font-family: "Share Tech", sans-serif; +} + +#body { + background-color: #34333ac9; +} + +#estate-con { + margin-top: 100px; +} + +#estate-card { + background-color: rgba(43, 43, 65, 0.685); + width: 420px; + border-radius: 20px; + height: 620px; + flex-direction: column; + float: left; + margin-left: 30px; + margin-right: 25px; + display: flex; + align-items: center; + text-align: center; + margin-top: 30px; +} + +#estate-content { + font-size: 26px; + width: 410px; +} + +#estate-img { + border-radius: 10px; + height: 80%; + width: 80%; + margin-top: 20px; +} + +#estate-p { + color: white; + margin: 0px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +#estate-a { + text-decoration: none; +} + +#estate-btn { + border-radius: 10px; + color: cornflowerblue; + width: 130px; +} \ No newline at end of file diff --git a/css/main.scss b/css/main.scss new file mode 100644 index 0000000..58c1273 --- /dev/null +++ b/css/main.scss @@ -0,0 +1,62 @@ +@import url('https://fonts.googleapis.com/css2?family=Share+Tech&display=swap'); + +*{ + margin: 0px; + font-family: 'Share Tech',sans-serif; + +} + +#body { + background-color: #34333ac9; +} + +#estate-con { + margin-top: 100px; +} + +#estate-card { + background-color: rgba(43, 43, 65, 0.685); + width: 420px; + border-radius: 20px; + height: 620px; + flex-direction: column; + float: left; + margin-left: 30px; + margin-right: 25px; + display: flex; + align-items: center; + text-align: center; + margin-top: 30px; + +} + +#estate-content { + font-size: 26px; + + width: 410px; +} + +#estate-img { + border-radius: 10px; + height: 80%; + width: 80%; + margin-top: 20px; +} + +#estate-p { + color: white; + margin: 0px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +#estate-a { + text-decoration: none; +} + +#estate-btn { + border-radius: 10px; + color: cornflowerblue; + width: 130px; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..6da93b2 --- /dev/null +++ b/index.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + Toast + + +

dflhnvsdjv

+ + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/js/dist/index.dev.js b/js/dist/index.dev.js new file mode 100644 index 0000000..39380ea --- /dev/null +++ b/js/dist/index.dev.js @@ -0,0 +1,48 @@ +"use strict"; + +/* const getlast10txn = async () => { + const options = { method: "GET" }; + fetch( + `https://api.covalenthq.com/v1/31/address/${selectedACC}/transactions_v2/?no-logs=true&key=ckey_62dc169a991f4d7ebe7dd52afef:`, + options + ) + .then((response) => response.json()) + .then((char) => { + if (char.data.chain_id == 31) { + char.data.items.map((res, i) => { + if (i + 1 <= 10) { + try { + content = ` +
+
+
+

from address:${res.from_address}

+

txn hash:${res.tx_hash}

+ more info +
+
+
+ `; + document.getElementById("last10txn").innerHTML += content; + } catch (error) { + console.log(error); + } + } + }); + } + }); +}; + */ +axios.post("https://api.thegraph.com/subgraphs/name/decentraland/marketplace", { + query: "\n {\n estates(first:100){\n owner{\n id\n },\n size,\n data{\n id,\n name,\n ipns,\n description\n }\n nft{\n id,\n tokenId,\n contractAddress,\n name,\n image\n }\n }\n } \n " +}).then(function (res) { + res.data.data.estates.map(function (gg) { + try { + console.log(gg); + var content = "\n
\n
\n
\n \"estate-image\"\n

").concat(gg.nft.name, "

\n

owner:").concat(gg.owner.id, "

\n

contract address:").concat(gg.size, "

\n \n \n
\n
\n
\n "); + document.getElementById("main").innerHTML += content; + } catch (e) { + console.log(e); + } + }); +}); \ No newline at end of file diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..8fa4259 --- /dev/null +++ b/js/index.js @@ -0,0 +1,87 @@ +/* const getlast10txn = async () => { + const options = { method: "GET" }; + fetch( + `https://api.covalenthq.com/v1/31/address/${selectedACC}/transactions_v2/?no-logs=true&key=ckey_62dc169a991f4d7ebe7dd52afef:`, + options + ) + .then((response) => response.json()) + .then((char) => { + if (char.data.chain_id == 31) { + char.data.items.map((res, i) => { + if (i + 1 <= 10) { + try { + content = ` +
+
+
+

from address:${res.from_address}

+

txn hash:${res.tx_hash}

+ more info +
+
+
+ `; + document.getElementById("last10txn").innerHTML += content; + } catch (error) { + console.log(error); + } + } + }); + } + }); +}; + */ + +axios + .post("https://api.thegraph.com/subgraphs/name/decentraland/marketplace", { + query: ` + { + estates(first:100){ + owner{ + id + }, + size, + data{ + id, + name, + ipns, + description + } + nft{ + id, + tokenId, + contractAddress, + name, + image + } + } + } + `, + }) + .then((res) => { + res.data.data.estates.map((gg) => { + try { + console.log(gg) + let content = ` +
+
+
+ estate-image +

${gg.nft.name}

+

owner:${gg.owner.id}

+

contract address:${gg.size}

+ + +
+
+
+ `; + document.getElementById("main").innerHTML += content; + } catch (e) { + console.log(e) + } + }) + }) +