Skip to content

Commit

Permalink
oxmon and rarible done
Browse files Browse the repository at this point in the history
pagination and readme left
  • Loading branch information
3scava1i3r committed Jul 4, 2021
1 parent ed0c990 commit ef024f9
Show file tree
Hide file tree
Showing 9 changed files with 327 additions and 7 deletions.
17 changes: 15 additions & 2 deletions css/dist/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

#estate-img {
border-radius: 10px;
height: 80%;
width: 80%;
height: 350px;
width: 350px;
margin-top: 20px;
}

Expand Down Expand Up @@ -74,4 +74,17 @@ footer {
font-size: 20px;
color: white;
margin-top: 100px;
}

#oxmon {
text-align: right;
text-decoration: none;
color: white;
font-size: 30px;
margin: 0px;
}

#toast {
text-decoration: none;
color: white;
}
21 changes: 18 additions & 3 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#estate-img {
border-radius: 10px;
height: 80%;
width: 80%;
height: 350px;
width: 350px;
margin-top: 20px;
}

Expand Down Expand Up @@ -82,4 +82,19 @@ footer {
color: white;
margin-top: 100px;

}
}

#oxmon {
text-align:right;
text-decoration: none;
color: white;
font-size: 30px;
margin: 0px;
}
#toast {
text-decoration: none;
color: white;

}

// Oxmon NFT work under
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
</head>
<body id="body">
<div id="head">
<span>Toast <object type="image/svg+xml" data="./assets/s.svg" class="logo">

<span><a href="./index.html" id="toast">Toast</a><object type="image/svg+xml" data="./assets/s.svg" class="logo">
</object></span>
<a href="./oxmon.html" id="oxmon">Oxmon</a>
<a href="./rarible.html" id="oxmon">Rarible</a>
</div>


<div id="main">
</div>
Expand Down
25 changes: 25 additions & 0 deletions js/dist/oxmon.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use strict";

axios.post("https://api.thegraph.com/subgraphs/name/ninjashiroi/oxmons", {
query: "\n {\n monsters(orderBy: number, first: 53) {\n id\n number\n owner\n bits\n tokenUri\n gen\n minterContract\n rarity\n \n \n }\n} \n "
}).then(function (res) {
res.data.data.monsters.map(function (gg) {
var rarity = gg.rarity;
var owner = gg.owner;
var number = gg.number;

if ((gg.tokenUri !== null || undefined) && gg.tokenUri.length !== 0) {
axios.get(gg.tokenUri).then(function (res) {
try {
var content = "\n <div id=\"estate-con\">\n <div id=\"estate-card\">\n <div id=\"estate-content\">\n <img src=\"".concat(res.data.image, "\" alt=\"estate-image\" id=\"estate-img\">\n <p id=\"estate-p\">").concat(res.data.name, "</p>\n <p id=\"estate-p\">owner:").concat(owner, "</p>\n <p id=\"estate-p\">Rarity:").concat(rarity, "</p>\n \n <button id=\"estate-btn\">\n <a href=\"https://opensea.io/assets/0x0427743df720801825a5c82e0582b1e915e0f750/").concat(number, "\" id=\"estate-a\">more info</a>\n </button>\n </div>\n </div>\n </div>\n ");
document.getElementById("main").innerHTML += content;
rarity = null;
number = null;
owner = null;
} catch (e) {
console.log(e);
}
});
}
});
});
53 changes: 53 additions & 0 deletions js/dist/rarible.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"use strict";

axios.post("https://api.thegraph.com/subgraphs/name/nikolaymalmal/rarible", {
query: "\n {\n \n rarities(first: 100) {\n id\n Link\n Owner {\n id\n }\n }\n}\n \n "
}).then(function (res) {
res.data.data.rarities.map(function (_char) {
var owner = _char.Owner.id;
axios.get("https://ipfs.io/".concat(_char.Link)).then(function (t) {
try {
var image = t.data.image.slice(6);
console.log(image);
var content = "\n <div id=\"estate-con\">\n <div id=\"estate-card\">\n <div id=\"estate-content\">\n <img src=\"https://ipfs.io".concat(image, "\" alt=\"estate-image\" id=\"estate-img\">\n <p id=\"estate-p\"></p>\n <p id=\"estate-p\">owner:").concat(owner, "</p>\n <p id=\"estate-p\">Rarity:</p>\n \n <button id=\"estate-btn\">\n <a href=\"").concat(t.data.external_url, "\" id=\"estate-a\">more info</a>\n </button>\n </div>\n </div>\n </div>\n ");
document.getElementById("main").innerHTML += content;
owner = null;
} catch (e) {
console.log(e);
}
});
});
/* res.data.data.monsters.map((gg) => {
let rarity = gg.rarity;
let owner = gg.owner;
let number = gg.number;
if ((gg.tokenUri !== null || undefined) && gg.tokenUri.length !== 0) {
axios.get(gg.tokenUri).then((res) => {
try {
let content = `
<div id="estate-con">
<div id="estate-card">
<div id="estate-content">
<img src="${res.data.image}" alt="estate-image" id="estate-img">
<p id="estate-p">${res.data.name}</p>
<p id="estate-p">owner:${owner}</p>
<p id="estate-p">Rarity:${rarity}</p>
<button id="estate-btn">
<a href="https://opensea.io/assets/0x0427743df720801825a5c82e0582b1e915e0f750/${number}" id="estate-a">more info</a>
</button>
</div>
</div>
</div>
`;
document.getElementById("main").innerHTML += content;
rarity = null;
number = null;
owner = null;
} catch (e) {
console.log(e);
}
});
}
}); */
});
58 changes: 58 additions & 0 deletions js/oxmon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
axios
.post("https://api.thegraph.com/subgraphs/name/ninjashiroi/oxmons", {
query: `
{
monsters(orderBy: number, first: 53) {
id
number
owner
bits
tokenUri
gen
minterContract
rarity
}
}
`,
})
.then((res) => {

res.data.data.monsters.map((gg) => {
let rarity = gg.rarity
let owner = gg.owner
let number = gg.number

if((gg.tokenUri !== null || undefined ) && gg.tokenUri.length !== 0){
axios.get(gg.tokenUri).then((res) => {
try {
let content = `
<div id="estate-con">
<div id="estate-card">
<div id="estate-content">
<img src="${res.data.image}" alt="estate-image" id="estate-img">
<p id="estate-p">${res.data.name}</p>
<p id="estate-p">owner:${owner}</p>
<p id="estate-p">Rarity:${rarity}</p>
<button id="estate-btn">
<a href="https://opensea.io/assets/0x0427743df720801825a5c82e0582b1e915e0f750/${number}" id="estate-a">more info</a>
</button>
</div>
</div>
</div>
`;

document.getElementById("main").innerHTML += content;
rarity = null
number = null
owner= null
} catch (e) {
console.log(e);
}
});
}

});
});
90 changes: 90 additions & 0 deletions js/rarible.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
axios
.post("https://api.thegraph.com/subgraphs/name/nikolaymalmal/rarible", {
query: `
{
rarities(first: 100) {
id
Link
Owner {
id
}
}
}
`,
})
.then((res) => {

res.data.data.rarities.map((char) => {
let owner = char.Owner.id

axios.get(
`https://ipfs.io/${char.Link}`
).then((t) => {
try {
let image = t.data.image.slice(6)

console.log(image)
let content = `
<div id="estate-con">
<div id="estate-card">
<div id="estate-content">
<img src="https://ipfs.io${image}" alt="estate-image" id="estate-img">
<p id="estate-p"></p>
<p id="estate-p">owner:${owner}</p>
<p id="estate-p">Rarity:</p>
<button id="estate-btn">
<a href="${t.data.external_url}" id="estate-a">more info</a>
</button>
</div>
</div>
</div>
`;

document.getElementById("main").innerHTML += content;
owner = null


} catch (e) {
console.log(e)
}
});
})
/* res.data.data.monsters.map((gg) => {
let rarity = gg.rarity;
let owner = gg.owner;
let number = gg.number;
if ((gg.tokenUri !== null || undefined) && gg.tokenUri.length !== 0) {
axios.get(gg.tokenUri).then((res) => {
try {
let content = `
<div id="estate-con">
<div id="estate-card">
<div id="estate-content">
<img src="${res.data.image}" alt="estate-image" id="estate-img">
<p id="estate-p">${res.data.name}</p>
<p id="estate-p">owner:${owner}</p>
<p id="estate-p">Rarity:${rarity}</p>
<button id="estate-btn">
<a href="https://opensea.io/assets/0x0427743df720801825a5c82e0582b1e915e0f750/${number}" id="estate-a">more info</a>
</button>
</div>
</div>
</div>
`;
document.getElementById("main").innerHTML += content;
rarity = null;
number = null;
owner = null;
} catch (e) {
console.log(e);
}
});
}
}); */
});
32 changes: 32 additions & 0 deletions oxmon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./js/oxmon.js" type="module"></script>
<link rel="stylesheet" type="text/css" href="./css/dist/main.css" media="screen" />
<link rel="shortcut icon" type="image/jpg" href="./assets/toast.png"/>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<title>Toast</title>
</head>
<body id="body">
<div id="head">
<span><a href="./index.html" id="toast">Toast</a><object type="image/svg+xml" data="./assets/s.svg" class="logo">
</object></span>
<a href="./oxmon.html" id="oxmon">Oxmon</a>
<a href="./rarible.html" id="oxmon">Rarible</a>
</div>


<div id="main">
</div>



<footer>Made with &#129293 by 3scava1i3r</footer>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

</body>
</html>
32 changes: 32 additions & 0 deletions rarible.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./js/rarible.js" type="module"></script>
<link rel="stylesheet" type="text/css" href="./css/dist/main.css" media="screen" />
<link rel="shortcut icon" type="image/jpg" href="./assets/toast.png"/>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<title>Toast</title>
</head>
<body id="body">
<div id="head">
<span><a href="./index.html" id="toast">Toast</a><object type="image/svg+xml" data="./assets/s.svg" class="logo">
</object></span>
<a href="./oxmon.html" id="oxmon">Oxmon</a>
<a href="./rarible.html" id="oxmon">Rarible</a>
</div>


<div id="main">
</div>



<footer>Made with &#129293 by 3scava1i3r</footer>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

</body>
</html>

0 comments on commit ef024f9

Please sign in to comment.